diff --git a/.gitignore b/.gitignore index de0cb06f..b108edd7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .DS_Store *.sublime* + +/public \ No newline at end of file diff --git a/assets/fonts/PT Free Font License_eng_1.2.txt b/assets/fonts/PT Free Font License_eng_1.2.txt new file mode 100644 index 00000000..b5023afb --- /dev/null +++ b/assets/fonts/PT Free Font License_eng_1.2.txt @@ -0,0 +1,44 @@ +Copyright (c) 2009, ParaType Ltd. All Rights Reserved. + +LICENSING AGREEMENT +for the fonts with Original Name: PT Sans, PT Serif +Version 1.2 - December 23, 2010 + +GRANT OF LICENSE +ParaType Ltd grants you the right to use, copy, modify the fonts and distribute +modified and unmodified copies of the fonts by any means, including placing +on Web servers for free downloading, embedding in documents and Web pages, +bundling with commercial and non commercial products, if it does not conflict +with the conditions listed below: + +- You may bundle the font with commercial software, but you may not sell the +fonts by themselves. They are free. + +- You may distribute the fonts in modified or unmodified version only together +with this Licensing Agreement and with above copyright notice. You have no +right to modify the text of Licensing Agreement. It can be placed in a separate +text file or inserted into the font file, but it must be easily viewed by users. + +- You may not distribute modified version of the font under the Original name +or à combination of Original name with any other words without explicit written +permission from ParaType. + +TERMINATION & TERRITORY +This license has no limits on time and territory, but it becomes null and void +if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, +OR OTHER RIGHT. IN NO EVENT SHALL PARATYPE BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER +DEALINGS IN THE FONT SOFTWARE. + +ParaType Ltd +http://www.paratype.ru + diff --git a/assets/fonts/PT Free Font License_rus_1.2.txt b/assets/fonts/PT Free Font License_rus_1.2.txt new file mode 100644 index 00000000..fc7b8d38 Binary files /dev/null and b/assets/fonts/PT Free Font License_rus_1.2.txt differ diff --git a/assets/fonts/PTC55F_W.eot b/assets/fonts/PTC55F_W.eot new file mode 100644 index 00000000..968d6e49 Binary files /dev/null and b/assets/fonts/PTC55F_W.eot differ diff --git a/assets/fonts/PTC55F_W.svg b/assets/fonts/PTC55F_W.svg new file mode 100644 index 00000000..ca796a0f --- /dev/null +++ b/assets/fonts/PTC55F_W.svg @@ -0,0 +1,728 @@ + + + + +Generated by SVGconv. +Copyright : Copyright 2009 ParaType Ltd. All rights reserved. +Designer : A.Korolkova, O.Umpeleva, V.Yefimov +Foundry : ParaType Ltd +Foundry URL : http://www.paratype.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/PTC55F_W.ttf b/assets/fonts/PTC55F_W.ttf new file mode 100644 index 00000000..66802733 Binary files /dev/null and b/assets/fonts/PTC55F_W.ttf differ diff --git a/assets/fonts/PTC55F_W.woff b/assets/fonts/PTC55F_W.woff new file mode 100644 index 00000000..1c7d62e0 Binary files /dev/null and b/assets/fonts/PTC55F_W.woff differ diff --git a/assets/fonts/PTC75F_W.eot b/assets/fonts/PTC75F_W.eot new file mode 100644 index 00000000..8ea7c612 Binary files /dev/null and b/assets/fonts/PTC75F_W.eot differ diff --git a/assets/fonts/PTC75F_W.svg b/assets/fonts/PTC75F_W.svg new file mode 100644 index 00000000..da6fc3df --- /dev/null +++ b/assets/fonts/PTC75F_W.svg @@ -0,0 +1,728 @@ + + + + +Generated by SVGconv. +Copyright : Copyright 2009 ParaType Ltd. All rights reserved. +Designer : A.Korolkova, O.Umpeleva, V.Yefimov +Foundry : ParaType Ltd +Foundry URL : http://www.paratype.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/PTC75F_W.ttf b/assets/fonts/PTC75F_W.ttf new file mode 100644 index 00000000..0b83dc65 Binary files /dev/null and b/assets/fonts/PTC75F_W.ttf differ diff --git a/assets/fonts/PTC75F_W.woff b/assets/fonts/PTC75F_W.woff new file mode 100644 index 00000000..fb6770bb Binary files /dev/null and b/assets/fonts/PTC75F_W.woff differ diff --git a/assets/fonts/PTN57F_W.eot b/assets/fonts/PTN57F_W.eot new file mode 100644 index 00000000..0bb06faa Binary files /dev/null and b/assets/fonts/PTN57F_W.eot differ diff --git a/assets/fonts/PTN57F_W.svg b/assets/fonts/PTN57F_W.svg new file mode 100644 index 00000000..36106026 --- /dev/null +++ b/assets/fonts/PTN57F_W.svg @@ -0,0 +1,728 @@ + + + + +Generated by SVGconv. +Copyright : Copyright 2009 ParaType Ltd. All rights reserved. +Designer : A.Korolkova, O.Umpeleva, V.Yefimov +Foundry : ParaType Ltd +Foundry URL : http://www.paratype.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/PTN57F_W.ttf b/assets/fonts/PTN57F_W.ttf new file mode 100644 index 00000000..c48b4a6a Binary files /dev/null and b/assets/fonts/PTN57F_W.ttf differ diff --git a/assets/fonts/PTN57F_W.woff b/assets/fonts/PTN57F_W.woff new file mode 100644 index 00000000..4267d7a8 Binary files /dev/null and b/assets/fonts/PTN57F_W.woff differ diff --git a/assets/fonts/PTN77F_W.eot b/assets/fonts/PTN77F_W.eot new file mode 100644 index 00000000..4a5d1f91 Binary files /dev/null and b/assets/fonts/PTN77F_W.eot differ diff --git a/assets/fonts/PTN77F_W.svg b/assets/fonts/PTN77F_W.svg new file mode 100644 index 00000000..09119162 --- /dev/null +++ b/assets/fonts/PTN77F_W.svg @@ -0,0 +1,728 @@ + + + + +Generated by SVGconv. +Copyright : Copyright 2009 ParaType Ltd. All rights reserved. +Designer : A.Korolkova, O.Umpeleva, V.Yefimov +Foundry : ParaType Ltd +Foundry URL : http://www.paratype.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/PTN77F_W.ttf b/assets/fonts/PTN77F_W.ttf new file mode 100644 index 00000000..cbc21827 Binary files /dev/null and b/assets/fonts/PTN77F_W.ttf differ diff --git a/assets/fonts/PTN77F_W.woff b/assets/fonts/PTN77F_W.woff new file mode 100644 index 00000000..d1fb8f1b Binary files /dev/null and b/assets/fonts/PTN77F_W.woff differ diff --git a/assets/fonts/PTS55F_W.eot b/assets/fonts/PTS55F_W.eot new file mode 100644 index 00000000..c8db3d02 Binary files /dev/null and b/assets/fonts/PTS55F_W.eot differ diff --git a/assets/fonts/PTS55F_W.svg b/assets/fonts/PTS55F_W.svg new file mode 100644 index 00000000..82afb0bf --- /dev/null +++ b/assets/fonts/PTS55F_W.svg @@ -0,0 +1,728 @@ + + + + +Generated by SVGconv. +Copyright : Copyright 2009 ParaType Ltd. All rights reserved. +Designer : A.Korolkova, O.Umpeleva, V.Yefimov +Foundry : ParaType Ltd +Foundry URL : http://www.paratype.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/PTS55F_W.ttf b/assets/fonts/PTS55F_W.ttf new file mode 100644 index 00000000..cc0d9088 Binary files /dev/null and b/assets/fonts/PTS55F_W.ttf differ diff --git a/assets/fonts/PTS55F_W.woff b/assets/fonts/PTS55F_W.woff new file mode 100644 index 00000000..8af9db8a Binary files /dev/null and b/assets/fonts/PTS55F_W.woff differ diff --git a/assets/fonts/PTS56F_W.eot b/assets/fonts/PTS56F_W.eot new file mode 100644 index 00000000..cb58fe27 Binary files /dev/null and b/assets/fonts/PTS56F_W.eot differ diff --git a/assets/fonts/PTS56F_W.svg b/assets/fonts/PTS56F_W.svg new file mode 100644 index 00000000..6d7648a7 --- /dev/null +++ b/assets/fonts/PTS56F_W.svg @@ -0,0 +1,728 @@ + + + + +Generated by SVGconv. +Copyright : Copyright 2009 ParaType Ltd. All rights reserved. +Designer : A.Korolkova, O.Umpeleva, V.Yefimov +Foundry : ParaType Ltd +Foundry URL : http://www.paratype.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/PTS56F_W.ttf b/assets/fonts/PTS56F_W.ttf new file mode 100644 index 00000000..0fbee64d Binary files /dev/null and b/assets/fonts/PTS56F_W.ttf differ diff --git a/assets/fonts/PTS56F_W.woff b/assets/fonts/PTS56F_W.woff new file mode 100644 index 00000000..fe533793 Binary files /dev/null and b/assets/fonts/PTS56F_W.woff differ diff --git a/assets/fonts/PTS75F_W.eot b/assets/fonts/PTS75F_W.eot new file mode 100644 index 00000000..f12d2ca7 Binary files /dev/null and b/assets/fonts/PTS75F_W.eot differ diff --git a/assets/fonts/PTS75F_W.svg b/assets/fonts/PTS75F_W.svg new file mode 100644 index 00000000..a7418a19 --- /dev/null +++ b/assets/fonts/PTS75F_W.svg @@ -0,0 +1,728 @@ + + + + +Generated by SVGconv. +Copyright : Copyright 2009 ParaType Ltd. All rights reserved. +Designer : A.Korolkova, O.Umpeleva, V.Yefimov +Foundry : ParaType Ltd +Foundry URL : http://www.paratype.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/PTS75F_W.ttf b/assets/fonts/PTS75F_W.ttf new file mode 100644 index 00000000..4f038bdc Binary files /dev/null and b/assets/fonts/PTS75F_W.ttf differ diff --git a/assets/fonts/PTS75F_W.woff b/assets/fonts/PTS75F_W.woff new file mode 100644 index 00000000..7c7edc32 Binary files /dev/null and b/assets/fonts/PTS75F_W.woff differ diff --git a/assets/fonts/PTS76F_W.eot b/assets/fonts/PTS76F_W.eot new file mode 100644 index 00000000..dcad7e93 Binary files /dev/null and b/assets/fonts/PTS76F_W.eot differ diff --git a/assets/fonts/PTS76F_W.svg b/assets/fonts/PTS76F_W.svg new file mode 100644 index 00000000..fa949cac --- /dev/null +++ b/assets/fonts/PTS76F_W.svg @@ -0,0 +1,728 @@ + + + + +Generated by SVGconv. +Copyright : Copyright 2009 ParaType Ltd. All rights reserved. +Designer : A.Korolkova, O.Umpeleva, V.Yefimov +Foundry : ParaType Ltd +Foundry URL : http://www.paratype.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/PTS76F_W.ttf b/assets/fonts/PTS76F_W.ttf new file mode 100644 index 00000000..9a2a6b80 Binary files /dev/null and b/assets/fonts/PTS76F_W.ttf differ diff --git a/assets/fonts/PTS76F_W.woff b/assets/fonts/PTS76F_W.woff new file mode 100644 index 00000000..45e95c58 Binary files /dev/null and b/assets/fonts/PTS76F_W.woff differ diff --git a/assets/fonts/demo.html b/assets/fonts/demo.html new file mode 100644 index 00000000..fb757b58 --- /dev/null +++ b/assets/fonts/demo.html @@ -0,0 +1,409 @@ + + + + +Font Face Demo + + + + + + +
+

PT Sans Regular

+

96 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

72 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

60 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

48 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

36 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

30 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

24 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

21 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

18 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

17 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

16 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

15 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

14 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

13 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

12 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

11 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

10 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

9 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

PT Sans Italic

+

96 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

72 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

60 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

48 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

36 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

30 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

24 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

21 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

18 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

17 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

16 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

15 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

14 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

13 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

12 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

11 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

10 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

9 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

PT Sans Bold

+

96 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

72 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

60 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

48 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

36 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

30 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

24 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

21 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

18 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

17 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

16 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

15 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

14 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

13 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

12 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

11 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

10 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

9 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

PT Sans Bold Italic

+

96 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

72 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

60 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

48 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

36 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

30 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

24 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

21 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

18 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

17 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

16 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

15 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

14 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

13 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

12 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

11 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

10 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

9 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

PT Sans Caption Regular

+

96 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

72 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

60 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

48 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

36 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

30 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

24 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

21 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

18 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

17 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

16 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

15 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

14 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

13 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

12 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

11 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

10 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

9 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

PT Sans Caption Bold

+

96 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

72 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

60 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

48 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

36 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

30 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

24 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

21 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

18 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

17 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

16 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

15 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

14 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

13 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

12 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

11 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

10 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

9 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

PT Sans Narrow Regular

+

96 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

72 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

60 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

48 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

36 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

30 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

24 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

21 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

18 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

17 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

16 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

15 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

14 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

13 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

12 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

11 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

10 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

9 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ +

PT Sans Narrow Bold

+

96 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

72 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

60 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

48 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

36 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

30 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

24 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

21 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

18 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

17 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

16 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

15 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

14 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

13 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

12 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

11 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

10 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

9 - The five boxing wizards jump quickly. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+ + + +
+ + \ No newline at end of file diff --git a/assets/fonts/stylesheet.css b/assets/fonts/stylesheet.css new file mode 100644 index 00000000..5422f333 --- /dev/null +++ b/assets/fonts/stylesheet.css @@ -0,0 +1,38 @@ +@font-face {font-family: 'PT Sans'; + src: url('pts55f_w.eot'); + src: local('PT Sans'), url('PTS55F_W.woff') format('woff'),url('PTS55F_W.ttf') format('truetype'), url('PTS55F_W.svg#PTSans-Regular') format('svg');} + +@font-face {font-family: 'PT Sans'; + font-style: italic; + src: url('pts56f_w.eot'); + src: local('PT Sans Italic'), url('PTS56F_W.woff') format('woff'),url('PTS56F_W.ttf') format('truetype'), url('PTS56F_W.svg#PTSans-Italic') format('svg');} + +@font-face {font-family: 'PT Sans'; + src: url('pts75f_w.eot'); + font-style: normal; + font-weight: bold; + src: local('PT Sans Bold'), url('PTS75F_W.woff') format('woff'),url('PTS75F_W.ttf') format('truetype'), url('PTS75F_W.svg#PTSans-Bold') format('svg');} + +@font-face {font-family: 'PT Sans'; + font-style: italic; + font-weight: bold; + src: url('pts76f_w.eot'); + src: local('PT Sans Bold Italic'), url('PTS76F_W.woff') format('woff'),url('PTS76F_W.ttf') format('truetype'), url('PTS76F_W.svg#PTSans-BoldItalic') format('svg');} + +@font-face {font-family: 'PT Sans Caption'; + src: url('ptc55f_w.eot'); + src: local('PT Sans Caption'), url('PTC55F_W.woff') format('woff'),url('PTC55F_W.ttf') format('truetype'), url('PTC55F_W.svg#PTSans-Caption') format('svg');} + +@font-face {font-family: 'PT Sans Caption'; + font-weight: bold; + src: url('ptc75f_w.eot'); + src: local('PT Sans Caption Bold'), url('PTC75F_W.woff') format('woff'),url('PTC75F_W.ttf') format('truetype'), url('PTC75F_W.svg#PTSans-CaptionBold') format('svg');} + +@font-face {font-family: 'PT Sans Narrow'; + src: url('ptn57f_w.eot'); + src: local('PT Sans Narrow'), url('PTN57F_W.woff') format('woff'),url('PTN57F_W.ttf') format('truetype'), url('PTN57F_W.svg#PTSans-Narrow') format('svg');} + +@font-face {font-family: 'PT Sans Narrow'; + font-weight: bold; + src: url('ptn77f_w.eot'); + src: local('PT Sans Narrow Bold'), url('PTN77F_W.woff') format('woff'),url('PTN77F_W.ttf') format('truetype'), url('PTN77F_W.svg#PTSans-NarrowBold') format('svg');} \ No newline at end of file diff --git a/assets/img/icon.vk.png b/assets/img/icon.vk.png new file mode 100644 index 00000000..dbbb057f Binary files /dev/null and b/assets/img/icon.vk.png differ diff --git a/assets/img/preview/certificate_egryl1.png b/assets/img/preview/certificate_egryl1.png new file mode 100644 index 00000000..690e5d82 Binary files /dev/null and b/assets/img/preview/certificate_egryl1.png differ diff --git a/assets/img/preview/certificate_egryl2.png b/assets/img/preview/certificate_egryl2.png new file mode 100644 index 00000000..90ed099e Binary files /dev/null and b/assets/img/preview/certificate_egryl2.png differ diff --git a/assets/img/preview/certificate_gov.png b/assets/img/preview/certificate_gov.png new file mode 100644 index 00000000..ef7d22f1 Binary files /dev/null and b/assets/img/preview/certificate_gov.png differ diff --git a/assets/img/preview/license_edu.png b/assets/img/preview/license_edu.png new file mode 100644 index 00000000..f668e2fb Binary files /dev/null and b/assets/img/preview/license_edu.png differ diff --git a/assets/img/preview/statue-2013.png b/assets/img/preview/statue-2013.png new file mode 100644 index 00000000..023ff1a9 Binary files /dev/null and b/assets/img/preview/statue-2013.png differ diff --git a/assets/img/preview/vatin.png b/assets/img/preview/vatin.png new file mode 100644 index 00000000..4c9b2501 Binary files /dev/null and b/assets/img/preview/vatin.png differ diff --git a/config.js b/config.js new file mode 100644 index 00000000..63deb7bd --- /dev/null +++ b/config.js @@ -0,0 +1,3 @@ +module.exports = { + pub: "./" +} \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 9d4cd038..d6cedcfb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,8 +1,10 @@ var gulp = require("gulp"); var sass = require("gulp-sass"); var minifyCSS = require("gulp-minify-css"); +var imageMin = require("gulp-imagemin"); -var pub = "~/Dropbox/Dev/Hud school/public/"; +// var pub = "~/Dropbox/Dev/Hud school/public/"; +var pub = "./public/"; var list = []; task("sass", function () { @@ -12,6 +14,17 @@ task("sass", function () { .pipe(gulp.dest(pub+"s")); }); +task("imagemin", function(){ + gulp.src("./assets/img/**/*") + .pipe(imageMin()) + .pipe(gulp.dest(pub+"img")); +}); + +task("copy", function(){ + gulp.src("./assets/fonts/*") + .pipe(gulp.dest(pub+"fonts")); +}); + function task(name, f){ list.push(name); gulp.task(name, f); diff --git a/node_modules/gulp-imagemin/index.js b/node_modules/gulp-imagemin/index.js new file mode 100644 index 00000000..41b4b110 --- /dev/null +++ b/node_modules/gulp-imagemin/index.js @@ -0,0 +1,56 @@ +'use strict'; +var path = require('path'); +var fs = require('graceful-fs'); +var gutil = require('gulp-util'); +var map = require('map-stream'); +var filesize = require('filesize'); +var tempWrite = require('temp-write'); +var imagemin = require('image-min'); + +module.exports = function (options) { + return map(function (file, cb) { + if (file.isNull()) { + return cb(null, file); + } + + if (file.isStream()) { + return cb(new gutil.PluginError('gulp-imagemin', 'Streaming not supported')); + } + + if (['.jpg', '.jpeg', '.png', '.gif'].indexOf(path.extname(file.path).toLowerCase()) === -1) { + gutil.log('gulp-imagemin: Skipping unsupported image ' + gutil.colors.blue(file.relative)); + return cb(null, file); + } + + tempWrite(file.contents, path.basename(file.path), function (err, tempFile) { + if (err) { + return cb(new gutil.PluginError('gulp-imagemin', err)); + } + + // workaround: https://github.com/kevva/image-min/issues/8 + fs.stat(tempFile, function (err, stats) { + if (err) { + return cb(new gutil.PluginError('gulp-imagemin', err)); + } + + var origSize = stats.size; + + imagemin(tempFile, tempFile, options, function () { + fs.readFile(tempFile, function (err, data) { + if (err) { + return cb(new gutil.PluginError('gulp-imagemin', err)); + } + + var saved = origSize - data.length; + var savedMsg = saved > 0 ? 'saved ' + filesize(saved, {round: 1}) : 'already optimized'; + + gutil.log('gulp-imagemin:', gutil.colors.green('✔ ') + file.relative + gutil.colors.gray(' (' + savedMsg + ')')); + + file.contents = data; + cb(null, file); + }); + }); + }); + }); + }); +}; diff --git a/node_modules/gulp-imagemin/node_modules/filesize/.npmignore b/node_modules/gulp-imagemin/node_modules/filesize/.npmignore new file mode 100644 index 00000000..9cacf8da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/filesize/.npmignore @@ -0,0 +1,8 @@ +/node_modules/ +/lib/filesize.min.js +/lib/filesize.map +/src/ +/test/ +.jshintrc +.travis.yml +Gruntfile.js diff --git a/node_modules/gulp-imagemin/node_modules/filesize/LICENSE b/node_modules/gulp-imagemin/node_modules/filesize/LICENSE new file mode 100644 index 00000000..c6f00fdd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/filesize/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013, Jason Mulligan +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + + Neither the name of the {organization} nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/filesize/README.md b/node_modules/gulp-imagemin/node_modules/filesize/README.md new file mode 100644 index 00000000..62b6fea4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/filesize/README.md @@ -0,0 +1,47 @@ +[![build status](https://secure.travis-ci.org/avoidwork/filesize.js.png)](http://travis-ci.org/avoidwork/filesize.js) +# filesize.js + +filesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string. + +## Optional settings + +`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output. + +### bits +_***(boolean)***_ Enables `bit` sizes, default is `false` + +### unix +_***(boolean)***_ Enables unix style human readable output, e.g `ls -lh`, default is `false` + +### base +_***(number)***_ Number base, default is `10` + +### round +_***(number)***_ Decimal place, default is `2` + +### spacer +_***(string)***_ Character between the `result` and `suffix`, default is `" "` + +## Examples + +```javascript +filesize(500); // "500 B" +filesize(500, {bits: true}); // "4.00 kb" +filesize(265318); // "265.32 kB" +filesize(265318, {base: 2}); // "259.10 kB" +filesize(265318, {base: 2, round: 1}); // "259.1 kB" +``` + +## How can I load filesize.js? + +filesize.js supports AMD loaders (require.js, curl.js, etc.), node.js & npm (npm install filesize), or using a script tag. + +## Support + +If you're having problems, use the support forum at CodersClan. + + + +## License +Copyright (c) 2013 Jason Mulligan +Licensed under the BSD-3 license. diff --git a/node_modules/gulp-imagemin/node_modules/filesize/lib/filesize.js b/node_modules/gulp-imagemin/node_modules/filesize/lib/filesize.js new file mode 100644 index 00000000..74f60006 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/filesize/lib/filesize.js @@ -0,0 +1,141 @@ +/** + * filesize + * + * @author Jason Mulligan + * @copyright 2013 Jason Mulligan + * @license BSD-3 + * @link http://filesizejs.com + * @module filesize + * @version 2.0.0 + */ +( function ( global ) { +"use strict"; + +var bit = /b$/, + bite = /^B$/, + radix = 10, + right = /\.(.*)/, + zero = /^0$/; + +/** + * filesize + * + * @method filesize + * @param {Mixed} arg String, Int or Float to transform + * @param {Object} descriptor [Optional] Flags + * @return {String} Readable file size String + */ +function filesize ( arg, descriptor ) { + var result = "", + skip = false, + i = 6, + base, bits, neg, num, round, size, sizes, unix, spacer, suffix, z; + + if ( isNaN( arg ) ) { + throw new Error( "Invalid arguments" ); + } + + descriptor = descriptor || {}; + bits = ( descriptor.bits === true ); + unix = ( descriptor.unix === true ); + base = descriptor.base !== undefined ? descriptor.base : unix ? 2 : 10; + round = descriptor.round !== undefined ? descriptor.round : unix ? 1 : 2; + spacer = descriptor.spacer !== undefined ? descriptor.spacer : unix ? "" : " "; + num = Number( arg ); + neg = ( num < 0 ); + + // Flipping a negative number to determine the size + if ( neg ) { + num = -num; + } + + // Zero is now a special case because bytes divide by 1 + if ( num === 0 ) { + if ( unix ) { + result = "0"; + } + else { + result = "0" + spacer + "B"; + } + } + else { + sizes = options[base][bits ? "bits" : "bytes"]; + + while ( i-- ) { + size = sizes[i][1]; + suffix = sizes[i][0]; + + if ( num >= size ) { + // Treating bytes as cardinal + if ( bite.test( suffix ) ) { + skip = true; + round = 0; + } + + result = ( num / size ).toFixed( round ); + + if ( !skip && unix ) { + if ( bits && bit.test( suffix ) ) { + suffix = suffix.toLowerCase(); + } + + suffix = suffix.charAt( 0 ); + z = right.exec( result ); + + if ( !bits && suffix === "k" ) { + suffix = "K"; + } + + if ( z !== null && z[1] !== undefined && zero.test( z[1] ) ) { + result = parseInt( result, radix ); + } + + result += spacer + suffix; + } + else if ( !unix ) { + result += spacer + suffix; + } + + break; + } + } + } + + // Decorating a 'diff' + if ( neg ) { + result = "-" + result; + } + + return result; +} + +/** + * Size options + * + * @type {Object} + */ +var options = { + 2 : { + bits : [["B", 1], ["kb", 128], ["Mb", 131072], ["Gb", 134217728], ["Tb", 137438953472], ["Pb", 140737488355328]], + bytes : [["B", 1], ["kB", 1024], ["MB", 1048576], ["GB", 1073741824], ["TB", 1099511627776], ["PB", 1125899906842624]] + }, + 10 : { + bits : [["B", 1], ["kb", 125], ["Mb", 125000], ["Gb", 125000000], ["Tb", 125000000000], ["Pb", 125000000000000]], + bytes : [["B", 1], ["kB", 1000], ["MB", 1000000], ["GB", 1000000000], ["TB", 1000000000000], ["PB", 1000000000000000]] + } +}; + +// CommonJS, AMD, script tag +if ( typeof exports !== "undefined" ) { + module.exports = filesize; +} +else if ( typeof define === "function" ) { + define( function () { + return filesize; + } ); +} +else { + global.filesize = filesize; +} + +} )( this ); diff --git a/node_modules/gulp-imagemin/node_modules/filesize/package.json b/node_modules/gulp-imagemin/node_modules/filesize/package.json new file mode 100644 index 00000000..d39de5af --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/filesize/package.json @@ -0,0 +1,55 @@ +{ + "name": "filesize", + "description": "JavaScript library to generate a human readable String describing the file size", + "version": "2.0.0", + "homepage": "http://filesizejs.com", + "author": { + "name": "Jason Mulligan", + "email": "jason.mulligan@avoidwork.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/avoidwork/filesize.js.git" + }, + "bugs": { + "url": "https://github.com/avoidwork/filesize.js/issues" + }, + "licenses": [ + { + "type": "BSD-3", + "url": "https://raw.github.com/avoidwork/filesize.js/master/LICENSE" + } + ], + "main": "lib/filesize", + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-cli": "~0.1.6", + "grunt-exec": "~0.4", + "grunt-sed": "~0.1", + "grunt-contrib-concat": "~0.1.3", + "grunt-contrib-jshint": "~0.1", + "grunt-contrib-nodeunit": "~0.1.2", + "grunt-contrib-watch": "~0.2" + }, + "keywords": [ + "file", + "filesize", + "size", + "readable", + "file system" + ], + "readme": "[![build status](https://secure.travis-ci.org/avoidwork/filesize.js.png)](http://travis-ci.org/avoidwork/filesize.js)\n# filesize.js\n\nfilesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string.\n\n## Optional settings\n\n`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output.\n\n### bits\n_***(boolean)***_ Enables `bit` sizes, default is `false`\n\n### unix\n_***(boolean)***_ Enables unix style human readable output, e.g `ls -lh`, default is `false`\n\n### base\n_***(number)***_ Number base, default is `10`\n\n### round\n_***(number)***_ Decimal place, default is `2`\n\n### spacer\n_***(string)***_ Character between the `result` and `suffix`, default is `\" \"`\n\n## Examples\n\n```javascript\nfilesize(500); // \"500 B\"\nfilesize(500, {bits: true}); // \"4.00 kb\"\nfilesize(265318); // \"265.32 kB\"\nfilesize(265318, {base: 2}); // \"259.10 kB\"\nfilesize(265318, {base: 2, round: 1}); // \"259.1 kB\"\n```\n\n## How can I load filesize.js?\n\nfilesize.js supports AMD loaders (require.js, curl.js, etc.), node.js & npm (npm install filesize), or using a script tag.\n\n## Support\n\nIf you're having problems, use the support forum at CodersClan.\n\n\n\n## License\nCopyright (c) 2013 Jason Mulligan \nLicensed under the BSD-3 license.\n", + "readmeFilename": "README.md", + "_id": "filesize@2.0.0", + "dist": { + "shasum": "4242899128eebf8c96804d05ef2da04e20ad09f6" + }, + "_from": "filesize@~2.0.0", + "_resolved": "https://registry.npmjs.org/filesize/-/filesize-2.0.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/.npmignore b/node_modules/gulp-imagemin/node_modules/graceful-fs/.npmignore new file mode 100644 index 00000000..c2658d7d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/graceful-fs/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/LICENSE b/node_modules/gulp-imagemin/node_modules/graceful-fs/LICENSE new file mode 100644 index 00000000..0c44ae71 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/graceful-fs/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/README.md b/node_modules/gulp-imagemin/node_modules/graceful-fs/README.md new file mode 100644 index 00000000..eb1a1093 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/graceful-fs/README.md @@ -0,0 +1,26 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over fs module + +graceful-fs: + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/graceful-fs.js b/node_modules/gulp-imagemin/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 00000000..1865f92c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,159 @@ +// Monkey-patching the fs module. +// It's ugly, but there is simply no other way to do this. +var fs = module.exports = require('fs') + +var assert = require('assert') + +// fix up some busted stuff, mostly on windows and old nodes +require('./polyfills.js') + +// The EMFILE enqueuing stuff + +var util = require('util') + +function noop () {} + +var debug = noop +var util = require('util') +if (util.debuglog) + debug = util.debuglog('gfs') +else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS: ' + m.split(/\n/).join('\nGFS: ') + console.error(m) + } + +if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug('fds', fds) + debug(queue) + assert.equal(queue.length, 0) + }) +} + + +var originalOpen = fs.open +fs.open = open + +function open(path, flags, mode, cb) { + if (typeof mode === "function") cb = mode, mode = null + if (typeof cb !== "function") cb = noop + new OpenReq(path, flags, mode, cb) +} + +function OpenReq(path, flags, mode, cb) { + this.path = path + this.flags = flags + this.mode = mode + this.cb = cb + Req.call(this) +} + +util.inherits(OpenReq, Req) + +OpenReq.prototype.process = function() { + originalOpen.call(fs, this.path, this.flags, this.mode, this.done) +} + +var fds = {} +OpenReq.prototype.done = function(er, fd) { + debug('open done', er, fd) + if (fd) + fds['fd' + fd] = this.path + Req.prototype.done.call(this, er, fd) +} + + +var originalReaddir = fs.readdir +fs.readdir = readdir + +function readdir(path, cb) { + if (typeof cb !== "function") cb = noop + new ReaddirReq(path, cb) +} + +function ReaddirReq(path, cb) { + this.path = path + this.cb = cb + Req.call(this) +} + +util.inherits(ReaddirReq, Req) + +ReaddirReq.prototype.process = function() { + originalReaddir.call(fs, this.path, this.done) +} + +ReaddirReq.prototype.done = function(er, files) { + Req.prototype.done.call(this, er, files) + onclose() +} + + +var originalClose = fs.close +fs.close = close + +function close (fd, cb) { + debug('close', fd) + if (typeof cb !== "function") cb = noop + delete fds['fd' + fd] + originalClose.call(fs, fd, function(er) { + onclose() + cb(er) + }) +} + + +var originalCloseSync = fs.closeSync +fs.closeSync = closeSync + +function closeSync (fd) { + try { + return originalCloseSync(fd) + } finally { + onclose() + } +} + + +// Req class +function Req () { + // start processing + this.done = this.done.bind(this) + this.failures = 0 + this.process() +} + +Req.prototype.done = function (er, result) { + var tryAgain = false + if (er) { + var code = er.code + var tryAgain = code === "EMFILE" + if (process.platform === "win32") + tryAgain = tryAgain || code === "OK" + } + + if (tryAgain) { + this.failures ++ + enqueue(this) + } else { + var cb = this.cb + cb(er, result) + } +} + +var queue = [] + +function enqueue(req) { + queue.push(req) + debug('enqueue %d %s', queue.length, req.constructor.name, req) +} + +function onclose() { + var req = queue.shift() + if (req) { + debug('process', req.constructor.name, req) + req.process() + } +} diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/package.json b/node_modules/gulp-imagemin/node_modules/graceful-fs/package.json new file mode 100644 index 00000000..3e4131e8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/graceful-fs/package.json @@ -0,0 +1,53 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "graceful-fs", + "description": "A drop-in replacement for fs, making various improvements.", + "version": "2.0.1", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-graceful-fs.git" + }, + "main": "graceful-fs.js", + "engines": { + "node": ">=0.4.0" + }, + "directories": { + "test": "test" + }, + "scripts": { + "test": "tap test/*.js" + }, + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "BSD", + "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/node-graceful-fs/issues" + }, + "homepage": "https://github.com/isaacs/node-graceful-fs", + "_id": "graceful-fs@2.0.1", + "dist": { + "shasum": "ec829a5953ea8ab7c1ba4c5de223ad6a44432ad6" + }, + "_from": "graceful-fs@~2.0.0", + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.1.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/polyfills.js b/node_modules/gulp-imagemin/node_modules/graceful-fs/polyfills.js new file mode 100644 index 00000000..afc83b3f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,228 @@ +var fs = require('fs') +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} + +// (re-)implement some things that are known busted or missing. + +// lchmod, broken prior to 0.6.2 +// back-port the fix here. +if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + fs.lchmod = function (path, mode, callback) { + callback = callback || noop + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var err, err2 + try { + var ret = fs.fchmodSync(fd, mode) + } catch (er) { + err = er + } + try { + fs.closeSync(fd) + } catch (er) { + err2 = er + } + if (err || err2) throw (err || err2) + return ret + } +} + + +// lutimes implementation, or no-op +if (!fs.lutimes) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + cb = cb || noop + if (er) return cb(er) + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + return cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + , err + , err2 + , ret + + try { + var ret = fs.futimesSync(fd, at, mt) + } catch (er) { + err = er + } + try { + fs.closeSync(fd) + } catch (er) { + err2 = er + } + if (err || err2) throw (err || err2) + return ret + } + + } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { + // maybe utimensat will be bound soonish? + fs.lutimes = function (path, at, mt, cb) { + fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) + } + + fs.lutimesSync = function (path, at, mt) { + return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } + fs.lutimesSync = function () {} + } +} + + +// https://github.com/isaacs/node-graceful-fs/issues/4 +// Chown should not fail on einval or eperm if non-root. + +fs.chown = chownFix(fs.chown) +fs.fchown = chownFix(fs.fchown) +fs.lchown = chownFix(fs.lchown) + +fs.chownSync = chownFixSync(fs.chownSync) +fs.fchownSync = chownFixSync(fs.fchownSync) +fs.lchownSync = chownFixSync(fs.lchownSync) + +function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er, res) { + if (chownErOk(er)) er = null + cb(er, res) + }) + } +} + +function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } +} + +function chownErOk (er) { + // if there's no getuid, or if getuid() is something other than 0, + // and the error is EINVAL or EPERM, then just ignore it. + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // When running as root, or if other types of errors are encountered, + // then it's strict. + if (!er || (!process.getuid || process.getuid() !== 0) + && (er.code === "EINVAL" || er.code === "EPERM")) return true +} + + +// if lchmod/lchown do not exist, then make them no-ops +if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + process.nextTick(cb) + } + fs.lchmodSync = function () {} +} +if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + process.nextTick(cb) + } + fs.lchownSync = function () {} +} + + + +// on Windows, A/V software can lock the directory, causing this +// to fail with an EACCES or EPERM if the directory contains newly +// created files. Try again on failure, for up to 1 second. +if (process.platform === "win32") { + var rename_ = fs.rename + fs.rename = function rename (from, to, cb) { + var start = Date.now() + rename_(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 1000) { + return rename_(from, to, CB) + } + cb(er) + }) + } +} + + +// if read() returns EAGAIN, then just try it again. +var read = fs.read +fs.read = function (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return read.call(fs, fd, buffer, offset, length, position, callback) +} + +var readSync = fs.readSync +fs.readSync = function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } +} + diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/test/open.js b/node_modules/gulp-imagemin/node_modules/graceful-fs/test/open.js new file mode 100644 index 00000000..104f36b0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/graceful-fs/test/open.js @@ -0,0 +1,39 @@ +var test = require('tap').test +var fs = require('../graceful-fs.js') + +test('graceful fs is monkeypatched fs', function (t) { + t.equal(fs, require('fs')) + t.end() +}) + +test('open an existing file works', function (t) { + var fd = fs.openSync(__filename, 'r') + fs.closeSync(fd) + fs.open(__filename, 'r', function (er, fd) { + if (er) throw er + fs.close(fd, function (er) { + if (er) throw er + t.pass('works') + t.end() + }) + }) +}) + +test('open a non-existing file throws', function (t) { + var er + try { + var fd = fs.openSync('this file does not exist', 'r') + } catch (x) { + er = x + } + t.ok(er, 'should throw') + t.notOk(fd, 'should not get an fd') + t.equal(er.code, 'ENOENT') + + fs.open('neither does this file', 'r', function (er, fd) { + t.ok(er, 'should throw') + t.notOk(fd, 'should not get an fd') + t.equal(er.code, 'ENOENT') + t.end() + }) +}) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/.npmignore new file mode 100644 index 00000000..b5ef13a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/.npmignore @@ -0,0 +1,6 @@ +.DS_Store +*.log +node_modules +build +*.node +components \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/.travis.yml b/node_modules/gulp-imagemin/node_modules/gulp-util/.travis.yml new file mode 100644 index 00000000..33ad9f8c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.9" + - "0.10" +after_script: + - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/LICENSE b/node_modules/gulp-imagemin/node_modules/gulp-util/LICENSE new file mode 100755 index 00000000..7cbe012c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014 Fractal + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/README.md new file mode 100644 index 00000000..fd0e506e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/README.md @@ -0,0 +1,166 @@ +# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util) + +## Information + + + + + + + + + + + + + +
Packagegulp-util
DescriptionUtility functions for gulp plugins
Node Version>= 0.9
+ +## Usage + +```javascript +var gutil = require('gulp-util'); + +gutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123')); +gutil.beep(); + +gutil.replaceExtension('file.coffee', '.js'); // file.js + +var opt = { + name: 'todd', + file: someGulpFile +}; +gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js +``` + +### log(msg...) + +Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space. + +``` +values (files, module names, etc.) = magenta +numbers (times, counts, etc) = cyan +``` + +### colors + +This is an instance of [chalk](https://github.com/sindresorhus/chalk) + +### date + +This is an instance of [node-dateformat](https://github.com/felixge/node-dateformat). + +### linefeed + +Just `\n`. Use this. + +### replaceExtension(path, newExtension) + +Replaces a file extension in a path. Returns the new path. + +### isStream(obj) + +Returns true or false if an object is a stream. + +### isBuffer(obj) + +Returns true or false if an object is a Buffer. + +### template(string[, data]) + +This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info. + +## new File(obj) + +This is just [vinyl](https://github.com/wearefractal/vinyl) + +```javascript +var file = new gutil.File({ + base: join(__dirname, './fixtures/'), + cwd: __dirname, + path: join(__dirname, './fixtures/test.coffee') +}); +``` + +## noop() + +Returns a stream that does nothing but pass data straight through. + +```javascript +gulp.task('scripts', function() { + gulp.src('src/**/*.js') + .pipe(concat('script.js')) + .pipe(gulp.env.production ? uglify() : gutil.noop()) + .pipe(gulp.dest('dist/'); +}); +``` + +## combine(streams...) + +Argument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline` + +```javascript +var scripts = gutil.combine( + coffee({bare: true}), + uglify(), + concat('script.js'), + gulp.dest('dist/') +); + +gulp.task('default', function() { + gulp.src('*.coffee').pipe(scripts()); +}); +``` + +## buffer(cb) + +This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects). + +Returns a stream that can be piped to. + +The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback. + +Callback is optional and receives two arguments: error and data + +```javascript +gulp.src('stuff/*.js') + .pipe(gutil.buffer(function(err, files){ + + }); +``` + +## new PluginError(pluginName, message[, options]) + +- pluginName should be the module name of your plugin +- message can be a string or an existing error +- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error. +- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created. + +These are all acceptable forms of instantiation: + +```javascript +var err = new gutil.PluginError('test', { + message: 'something broke' +}); + +var err = new gutil.PluginError({ + plugin: 'test', + message: 'something broke' +}); + +var err = new gutil.PluginError('test', 'something broke'); + +var err = new gutil.PluginError('test', 'something broke', {showStack: true}); + +var existingError = new Error('OMG'); +var err = new gutil.PluginError('test', existingError, {showStack: true}); +``` + +[npm-url]: https://npmjs.org/package/gulp-util +[npm-image]: https://badge.fury.io/js/gulp-util.png +[travis-url]: https://travis-ci.org/gulpjs/gulp-util +[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master +[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util +[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png +[depstat-url]: https://david-dm.org/gulpjs/gulp-util +[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/index.js new file mode 100644 index 00000000..6746ee4b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/index.js @@ -0,0 +1,18 @@ +module.exports = { + File: require('./lib/File'), + replaceExtension: require('./lib/replaceExtension'), + colors: require('./lib/colors'), + date: require('./lib/date'), + log: require('./lib/log'), + template: require('./lib/template'), + env: require('./lib/env'), + beep: require('./lib/beep'), + noop: require('./lib/noop'), + isStream: require('./lib/isStream'), + isBuffer: require('./lib/isBuffer'), + isNull: require('./lib/isNull'), + linefeed: require('./lib/linefeed'), + combine: require('./lib/combine'), + buffer: require('./lib/buffer'), + PluginError: require('./lib/PluginError') +}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/File.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/File.js new file mode 100644 index 00000000..690a508a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/File.js @@ -0,0 +1 @@ +module.exports = require('vinyl'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/PluginError.js new file mode 100644 index 00000000..96555672 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/PluginError.js @@ -0,0 +1,65 @@ +var util = require('util'); +var colors = require('./colors'); + +// wow what a clusterfuck +var parseOptions = function(plugin, message, opt) { + if (!opt) opt = {}; + if (typeof plugin === 'object') { + opt = plugin; + } else if (message instanceof Error) { + opt.message = message; + opt.plugin = plugin; + } else if (typeof message === 'object') { + opt = message; + opt.plugin = plugin; + } else if (typeof opt === 'object') { + opt.plugin = plugin; + opt.message = message; + } + return opt; +}; + +function PluginError(plugin, message, opt) { + if (!(this instanceof PluginError)) throw new Error('Call PluginError using new'); + + Error.call(this); + + var options = parseOptions(plugin, message, opt); + + this.plugin = options.plugin; + this.showStack = options.showStack; + + // if message is an Error grab crap off it + if (options.message instanceof Error) { + this.name = options.message.name; + this.message = options.message.message; + this.fileName = options.message.fileName; + this.lineNumber = options.message.lineNumber; + this.stack = options.message.stack; + } else { // else check options obj + this.name = options.name; + this.message = options.message; + this.fileName = options.fileName; + this.lineNumber = options.lineNumber; + this.stack = options.stack; + } + + // defaults + if (!this.name) this.name = 'Error'; + + // TODO: figure out why this explodes mocha + if (!this.stack) Error.captureStackTrace(this, arguments.callee || this.constructor); + + if (!this.plugin) throw new Error('Missing plugin name'); + if (!this.message) throw new Error('Missing error message'); +} + +util.inherits(PluginError, Error); + +PluginError.prototype.toString = function () { + var sig = '['+colors.green('gulp')+'] '+this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; + var msg = this.showStack ? (this._stack || this.stack) : this.message; + return sig+': '+msg; +}; + +module.exports = PluginError; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/beep.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/beep.js new file mode 100644 index 00000000..5473d754 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/beep.js @@ -0,0 +1,3 @@ +module.exports = function() { + process.stdout.write('\x07'); +}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/buffer.js new file mode 100644 index 00000000..4cb064ac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/buffer.js @@ -0,0 +1,15 @@ +var through = require('through2'); + +module.exports = function(fn) { + var buf = []; + var end = function(cb) { + this.push(buf); + cb(); + if(fn) fn(null, buf); + }; + var push = function(data, enc, cb) { + buf.push(data); + cb(); + }; + return through.obj(push, end); +}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/colors.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/colors.js new file mode 100644 index 00000000..bc804940 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/colors.js @@ -0,0 +1 @@ +module.exports = require('chalk'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/combine.js new file mode 100644 index 00000000..f20712d2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/combine.js @@ -0,0 +1,11 @@ +var pipeline = require('multipipe'); + +module.exports = function(){ + var args = arguments; + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0]; + } + return function(){ + return pipeline.apply(pipeline, args); + }; +}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/date.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/date.js new file mode 100644 index 00000000..935793cc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/date.js @@ -0,0 +1 @@ +module.exports = require('dateformat'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/env.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/env.js new file mode 100644 index 00000000..ea1e03e4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/env.js @@ -0,0 +1,4 @@ +var parseArgs = require('minimist'); +var argv = parseArgs(process.argv.slice(2)); + +module.exports = argv; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isBuffer.js new file mode 100644 index 00000000..0e23782c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isBuffer.js @@ -0,0 +1,7 @@ +var buf = require('buffer'); +var Buffer = buf.Buffer; + +// could use Buffer.isBuffer but this is the same exact thing... +module.exports = function(o) { + return typeof o === 'object' && o instanceof Buffer; +}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isNull.js new file mode 100644 index 00000000..403bb30e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isNull.js @@ -0,0 +1,3 @@ +module.exports = function(v) { + return v === null; +}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isStream.js new file mode 100644 index 00000000..9ce0929b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isStream.js @@ -0,0 +1,5 @@ +var Stream = require('stream').Stream; + +module.exports = function(o) { + return !!o && o instanceof Stream; +}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/linefeed.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/linefeed.js new file mode 100644 index 00000000..5b0dfa4b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/linefeed.js @@ -0,0 +1 @@ +module.exports = '\n'; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/log.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/log.js new file mode 100644 index 00000000..cdbb22fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/log.js @@ -0,0 +1,9 @@ +var colors = require('./colors'); + +module.exports = function(){ + var sig = '['+colors.green('gulp')+']'; + var args = Array.prototype.slice.call(arguments); + args.unshift(sig); + console.log.apply(console, args); + return this; +}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/noop.js new file mode 100644 index 00000000..7862cb16 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/noop.js @@ -0,0 +1,5 @@ +var through = require('through2'); + +module.exports = function () { + return through.obj(); +}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/replaceExtension.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/replaceExtension.js new file mode 100644 index 00000000..3f76938e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/replaceExtension.js @@ -0,0 +1,9 @@ +var path = require('path'); + +module.exports = function(npath, ext) { + if (typeof npath !== 'string') return npath; + if (npath.length === 0) return npath; + + var nFileName = path.basename(npath, path.extname(npath))+ext; + return path.join(path.dirname(npath), nFileName); +}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/template.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/template.js new file mode 100644 index 00000000..c467820f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/template.js @@ -0,0 +1,19 @@ +var template = require('lodash.template'); +var reInterpolate = require('lodash._reinterpolate'); + +var forcedSettings = { + escape: /<%-([\s\S]+?)%>/g, + evaluate: /<%([\s\S]+?)%>/g, + interpolate: reInterpolate +}; + +module.exports = function(tmpl, data){ + var fn = template(tmpl, null, forcedSettings); + + var wrapped = function(o) { + if (typeof o === 'undefined' || typeof o.file === 'undefined') throw new Error('Failed to provide the current file as "file" to the template'); + return fn(o); + }; + + return (data ? wrapped(data) : wrapped); +}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/index.js new file mode 100644 index 00000000..a21f7022 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/index.js @@ -0,0 +1,63 @@ +'use strict'; +var ansi = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasColor = require('has-color'); +var defineProps = Object.defineProperties; +var chalk = module.exports; + +var styles = (function () { + var ret = {}; + + ansi.grey = ansi.gray; + + Object.keys(ansi).forEach(function (key) { + ret[key] = { + get: function () { + this._styles.push(key); + return this; + } + }; + }); + + return ret; +})(); + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + var obj = defineProps(function self() { + var str = [].slice.call(arguments).join(' '); + + if (!chalk.enabled) { + return str; + } + + return self._styles.reduce(function (str, name) { + var code = ansi[name]; + return str ? code.open + str + code.close : ''; + }, str); + }, styles); + + obj._styles = []; + + return obj[name]; + } + } + }); + + return ret; +} + +defineProps(chalk, init()); + +chalk.styles = ansi; +chalk.stripColor = stripAnsi; +chalk.supportsColor = hasColor; + +// detect mode if not set manually +if (chalk.enabled === undefined) { + chalk.enabled = chalk.supportsColor; +} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi new file mode 120000 index 00000000..b65c9f81 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi @@ -0,0 +1 @@ +../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js new file mode 100644 index 00000000..3da548c4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js @@ -0,0 +1,38 @@ +'use strict'; +var styles = module.exports; + +var codes = { + reset: [0, 0], + + bold: [1, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + strikethrough: [9, 29], + + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] +}; + +Object.keys(codes).forEach(function (key) { + var val = codes[key]; + var style = styles[key] = {}; + style.open = '\x1b[' + val[0] + 'm'; + style.close = '\x1b[' + val[1] + 'm'; +}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..633d5e9b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json @@ -0,0 +1,62 @@ +{ + "name": "ansi-styles", + "version": "1.0.0", + "description": "ANSI escape codes for colorizing strings in the terminal", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "homepage": "https://github.com/sindresorhus/ansi-styles", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-styles/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "ansi-styles.js" + ], + "main": "ansi-styles", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green.open + 'Hello world!' + ansi.green.close);\n```\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "_id": "ansi-styles@1.0.0", + "dist": { + "shasum": "cb102df1c56f5123eab8b67cd7b98027a0279178" + }, + "_from": "ansi-styles@~1.0.0", + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..4ac8cbd0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md @@ -0,0 +1,65 @@ +# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. + +You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. + +![screenshot](screenshot.png) + + +## Install + +Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` + + +## Example + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### General + +- reset +- bold +- italic +- underline +- inverse +- strikethrough + +### Text colors + +- black +- red +- green +- yellow +- blue +- magenta +- cyan +- white +- gray + +### Background colors + +- bgBlack +- bgRed +- bgGreen +- bgYellow +- bgBlue +- bgMagenta +- bgCyan +- bgWhite + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js new file mode 100644 index 00000000..27316b1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js @@ -0,0 +1,24 @@ +'use strict'; +module.exports = (function () { + if (process.argv.indexOf('--no-color') !== -1) { + return false; + } + + if (process.argv.indexOf('--color') !== -1) { + return true; + } + + if (!process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); +})(); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json new file mode 100644 index 00000000..d60b2d0a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json @@ -0,0 +1,59 @@ +{ + "name": "has-color", + "version": "0.1.4", + "description": "Detect whether a terminal supports color", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "capability", + "detect" + ], + "homepage": "https://github.com/sindresorhus/has-color", + "bugs": { + "url": "https://github.com/sindresorhus/has-color/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "has-color.js" + ], + "main": "has-color", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/has-color.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "_id": "has-color@0.1.4", + "dist": { + "shasum": "d1dadeea5b9e8b446bf08603532333710c95a290" + }, + "_from": "has-color@~0.1.0", + "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.4.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md new file mode 100644 index 00000000..0918c851 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md @@ -0,0 +1,28 @@ +# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) + +> Detect whether a terminal supports color. + +Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). + + +## Install + +Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` + + +## Example + +```js +var hasColor = require('has-color'); + +if (hasColor) { + console.log('Terminal supports color.'); +} +``` + +It obeys the CLI flags `--color` and `--no-color`. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js new file mode 100755 index 00000000..f8019cda --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js @@ -0,0 +1,27 @@ +#!/usr/bin/env node +'use strict'; +var fs = require('fs'); +var strip = require('./index'); +var input = process.argv[2]; + +if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { + console.log('strip-ansi > '); + console.log('or'); + console.log('cat | strip-ansi > '); + return; +} + +if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { + console.log(require('./package').version); + return; +} + +if (input) { + process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); + return; +} + +process.stdin.setEncoding('utf8'); +process.stdin.on('data', function (data) { + process.stdout.write(strip(data)); +}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js new file mode 100644 index 00000000..62320c59 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function (str) { + return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; +}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json new file mode 100644 index 00000000..459be932 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json @@ -0,0 +1,68 @@ +{ + "name": "strip-ansi", + "version": "0.1.1", + "description": "Strip ANSI escape codes (used for colorizing strings in the terminal)", + "license": "MIT", + "bin": { + "strip-ansi": "cli.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/strip-ansi" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js", + "cli.js" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "mocha": "~1.x" + }, + "readme": "# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal)\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall locally with [npm](https://npmjs.org/package/strip-ansi):\n\n```\nnpm install --save strip-ansi\n```\n\nOr globally if you want to use it as a CLI app:\n\n```\nnpm install --global strip-ansi\n```\n\nYou can then use it in your Terminal like:\n\n```\nstrip-ansi file-with-color-codes\n```\n\nOr pipe something to it:\n\n```\nls | strip-ansi\n```\n\n\n## Example\n\n```js\nvar stripAnsi = require('strip-ansi');\nstripAnsi('\\x1b[4mcake\\x1b[0m');\n//=> cake\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "bugs": { + "url": "https://github.com/sindresorhus/strip-ansi/issues" + }, + "homepage": "https://github.com/sindresorhus/strip-ansi", + "_id": "strip-ansi@0.1.1", + "dist": { + "shasum": "39e8a98d044d150660abe4a6808acf70bb7bc991" + }, + "_from": "strip-ansi@~0.1.0", + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md new file mode 100644 index 00000000..eb661b3d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md @@ -0,0 +1,46 @@ +# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal) + +Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). + + +## Install + +Install locally with [npm](https://npmjs.org/package/strip-ansi): + +``` +npm install --save strip-ansi +``` + +Or globally if you want to use it as a CLI app: + +``` +npm install --global strip-ansi +``` + +You can then use it in your Terminal like: + +``` +strip-ansi file-with-color-codes +``` + +Or pipe something to it: + +``` +ls | strip-ansi +``` + + +## Example + +```js +var stripAnsi = require('strip-ansi'); +stripAnsi('\x1b[4mcake\x1b[0m'); +//=> cake +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/package.json new file mode 100644 index 00000000..5ed4c5d5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/package.json @@ -0,0 +1,65 @@ +{ + "name": "chalk", + "version": "0.4.0", + "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/chalk" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "ansi", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "has-color": "~0.1.0", + "ansi-styles": "~1.0.0", + "strip-ansi": "~0.1.0" + }, + "devDependencies": { + "mocha": "~1.x" + }, + "readme": "# \"chalk\"\n\n> Terminal string styling done right\n\n[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log( chalk.blue('Hello world!') );\n\n// combine styled and normal strings\nconsole.log( chalk.blue('Hello'), 'World' + chalk.red('!') );\n\n// compose multiple styles using the chainable API\nconsole.log( chalk.blue.bgRed.bold('Hello world!') );\n\n// nest styles\nconsole.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );\n\n// pass in multiple arguments\nconsole.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.` + + + + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js new file mode 100644 index 00000000..24692256 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js @@ -0,0 +1,228 @@ +if (!this.uuid) { + // node.js + uuid = require('../uuid'); +} + +// +// x-platform log/assert shims +// + +function _log(msg, type) { + type = type || 'log'; + + if (typeof(document) != 'undefined') { + document.write('
' + msg.replace(/\n/g, '
') + '
'); + } + if (typeof(console) != 'undefined') { + var color = { + log: '\033[39m', + warn: '\033[33m', + error: '\033[31m' + }; + console[type](color[type] + msg + color.log); + } +} + +function log(msg) {_log(msg, 'log');} +function warn(msg) {_log(msg, 'warn');} +function error(msg) {_log(msg, 'error');} + +function assert(res, msg) { + if (!res) { + error('FAIL: ' + msg); + } else { + log('Pass: ' + msg); + } +} + +// +// Unit tests +// + +// Verify ordering of v1 ids created with explicit times +var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 + +function compare(name, ids) { + ids = ids.map(function(id) { + return id.split('-').reverse().join('-'); + }).sort(); + var sorted = ([].concat(ids)).sort(); + + assert(sorted.toString() == ids.toString(), name + ' have expected order'); +} + +// Verify ordering of v1 ids created using default behavior +compare('uuids with current time', [ + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1() +]); + +// Verify ordering of v1 ids created with explicit times +compare('uuids with time option', [ + uuid.v1({msecs: TIME - 10*3600*1000}), + uuid.v1({msecs: TIME - 1}), + uuid.v1({msecs: TIME}), + uuid.v1({msecs: TIME + 1}), + uuid.v1({msecs: TIME + 28*24*3600*1000}) +]); + +assert( + uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), + 'IDs created at same msec are different' +); + +// Verify throw if too many ids created +var thrown = false; +try { + uuid.v1({msecs: TIME, nsecs: 10000}); +} catch (e) { + thrown = true; +} +assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); + +// Verify clock regression bumps clockseq +var uidt = uuid.v1({msecs: TIME}); +var uidtb = uuid.v1({msecs: TIME - 1}); +assert( + parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, + 'Clock regression by msec increments the clockseq' +); + +// Verify clock regression bumps clockseq +var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); +var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); +assert( + parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, + 'Clock regression by nsec increments the clockseq' +); + +// Verify explicit options produce expected id +var id = uuid.v1({ + msecs: 1321651533573, + nsecs: 5432, + clockseq: 0x385c, + node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] +}); +assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); + +// Verify adjacent ids across a msec boundary are 1 time unit apart +var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); +var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); + +var before = u0.split('-')[0], after = u1.split('-')[0]; +var dt = parseInt(after, 16) - parseInt(before, 16); +assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); + +// +// Test parse/unparse +// + +id = '00112233445566778899aabbccddeeff'; +assert(uuid.unparse(uuid.parse(id.substr(0,10))) == + '00112233-4400-0000-0000-000000000000', 'Short parse'); +assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == + '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); + +// +// Perf tests +// + +var generators = { + v1: uuid.v1, + v4: uuid.v4 +}; + +var UUID_FORMAT = { + v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, + v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i +}; + +var N = 1e4; + +// Get %'age an actual value differs from the ideal value +function divergence(actual, ideal) { + return Math.round(100*100*(actual - ideal)/ideal)/100; +} + +function rate(msg, t) { + log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); +} + +for (var version in generators) { + var counts = {}, max = 0; + var generator = generators[version]; + var format = UUID_FORMAT[version]; + + log('\nSanity check ' + N + ' ' + version + ' uuids'); + for (var i = 0, ok = 0; i < N; i++) { + id = generator(); + if (!format.test(id)) { + throw Error(id + ' is not a valid UUID string'); + } + + if (id != uuid.unparse(uuid.parse(id))) { + assert(fail, id + ' is not a valid id'); + } + + // Count digits for our randomness check + if (version == 'v4') { + var digits = id.replace(/-/g, '').split(''); + for (var j = digits.length-1; j >= 0; j--) { + var c = digits[j]; + max = Math.max(max, counts[c] = (counts[c] || 0) + 1); + } + } + } + + // Check randomness for v4 UUIDs + if (version == 'v4') { + // Limit that we get worried about randomness. (Purely empirical choice, this!) + var limit = 2*100*Math.sqrt(1/N); + + log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); + + for (var i = 0; i < 16; i++) { + var c = i.toString(16); + var bar = '', n = counts[c], p = Math.round(n/max*100|0); + + // 1-3,5-8, and D-F: 1:16 odds over 30 digits + var ideal = N*30/16; + if (i == 4) { + // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1 + 30/16); + } else if (i >= 8 && i <= 11) { + // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1/4 + 30/16); + } else { + // Otherwise: 1:16 odds on 30 digits + ideal = N*30/16; + } + var d = divergence(n, ideal); + + // Draw bar using UTF squares (just for grins) + var s = n/max*50 | 0; + while (s--) bar += '='; + + assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); + } + } +} + +// Perf tests +for (var version in generators) { + log('\nPerformance testing ' + version + ' UUIDs'); + var generator = generators[version]; + var buf = new uuid.BufferClass(16); + + for (var i = 0, t = Date.now(); i < N; i++) generator(); + rate('uuid.' + version + '()', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); + rate('uuid.' + version + '(\'binary\')', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); + rate('uuid.' + version + '(\'binary\', buffer)', t); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js new file mode 100644 index 00000000..2fac6dc4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js @@ -0,0 +1,245 @@ +// uuid.js +// +// Copyright (c) 2010-2012 Robert Kieffer +// MIT License - http://opensource.org/licenses/mit-license.php + +(function() { + var _global = this; + + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + var _rng; + + // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html + // + // Moderately fast, high quality + if (typeof(require) == 'function') { + try { + var _rb = require('crypto').randomBytes; + _rng = _rb && function() {return _rb(16);}; + } catch(e) {} + } + + if (!_rng && _global.crypto && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + _rng = function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } + + if (!_rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + _rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; + } + + // Buffer class to use + var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; + + // Maps for number <-> hex string conversion + var _byteToHex = []; + var _hexToByte = {}; + for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; + } + + // **`parse()` - Parse a UUID into it's component bytes** + function parse(s, buf, offset) { + var i = (buf && offset) || 0, ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; + } + + // **`unparse()` - Convert UUID byte array (ala parse()) into a string** + function unparse(buf, offset) { + var i = offset || 0, bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; + } + + // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + + // random #'s we need to init node and clockseq + var _seedBytes = _rng(); + + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] + ]; + + // Per 4.2.2, randomize (14 bit) clockseq + var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + + // Previous uuid creation time + var _lastMSecs = 0, _lastNSecs = 0; + + // See https://github.com/broofa/node-uuid for API details + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = options.clockseq != null ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs != null ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq == null) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); + } + + // **`v4()` - Generate random UUID** + + // See https://github.com/broofa/node-uuid for API details + function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options == 'binary' ? new BufferClass(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); + } + + // Export public API + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + uuid.parse = parse; + uuid.unparse = unparse; + uuid.BufferClass = BufferClass; + + if (typeof define === 'function' && define.amd) { + // Publish as AMD module + define(function() {return uuid;}); + } else if (typeof(module) != 'undefined' && module.exports) { + // Publish as node.js module + module.exports = uuid; + } else { + // Publish as global (in browsers) + var _previousRoot = _global.uuid; + + // **`noConflict()` - (browser only) to reset global 'uuid' var** + uuid.noConflict = function() { + _global.uuid = _previousRoot; + return uuid; + }; + + _global.uuid = uuid; + } +}).call(this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md new file mode 100644 index 00000000..34c4a85d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md @@ -0,0 +1,4 @@ +oauth-sign +========== + +OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js new file mode 100644 index 00000000..e35bfa67 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js @@ -0,0 +1,43 @@ +var crypto = require('crypto') + , qs = require('querystring') + ; + +function sha1 (key, body) { + return crypto.createHmac('sha1', key).update(body).digest('base64') +} + +function rfc3986 (str) { + return encodeURIComponent(str) + .replace(/!/g,'%21') + .replace(/\*/g,'%2A') + .replace(/\(/g,'%28') + .replace(/\)/g,'%29') + .replace(/'/g,'%27') + ; +} + +function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { + // adapted from https://dev.twitter.com/docs/auth/oauth and + // https://dev.twitter.com/docs/auth/creating-signature + + var querystring = Object.keys(params).sort().map(function(key){ + // big WTF here with the escape + encoding but it's what twitter wants + return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key])) + }).join('%26') + + var base = [ + httpMethod ? httpMethod.toUpperCase() : 'GET', + rfc3986(base_uri), + querystring + ].join('&') + + var key = [ + consumer_secret, + token_secret || '' + ].map(rfc3986).join('&') + + return sha1(key, base) +} + +exports.hmacsign = hmacsign +exports.rfc3986 = rfc3986 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json new file mode 100644 index 00000000..abc9d21d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json @@ -0,0 +1,35 @@ +{ + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "name": "oauth-sign", + "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", + "version": "0.3.0", + "repository": { + "url": "https://github.com/mikeal/oauth-sign" + }, + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "scripts": { + "test": "node test.js" + }, + "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/mikeal/oauth-sign/issues" + }, + "homepage": "https://github.com/mikeal/oauth-sign", + "_id": "oauth-sign@0.3.0", + "dist": { + "shasum": "cb540f93bb2b22a7d5941691a288d60e8ea9386e" + }, + "_from": "oauth-sign@~0.3.0", + "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js new file mode 100644 index 00000000..46955ff6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js @@ -0,0 +1,49 @@ +var hmacsign = require('./index').hmacsign + , assert = require('assert') + , qs = require('querystring') + ; + +// Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth + +var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token', + { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11' + , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' + , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk' + , oauth_signature_method: 'HMAC-SHA1' + , oauth_timestamp: '1272323042' + , oauth_version: '1.0' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98") + +console.log(reqsign) +console.log('8wUi7m5HFQy76nowoCThusfgB+Q=') +assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=') + +var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token', + { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' + , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8' + , oauth_signature_method: 'HMAC-SHA1' + , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc' + , oauth_timestamp: '1272323047' + , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY' + , oauth_version: '1.0' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA") + +console.log(accsign) +console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=') +assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=') + +var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json', + { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g" + , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y" + , oauth_signature_method: "HMAC-SHA1" + , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw" + , oauth_timestamp: "1272325550" + , oauth_version: "1.0" + , status: 'setting up my twitter 私のさえずりを設定する' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA") + +console.log(upsign) +console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=') +assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=') + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules new file mode 100644 index 00000000..49e31dac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules @@ -0,0 +1,6 @@ +[submodule "support/expresso"] + path = support/expresso + url = git://github.com/visionmedia/expresso.git +[submodule "support/should"] + path = support/should + url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore new file mode 100644 index 00000000..e85ce2af --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore @@ -0,0 +1,7 @@ +test +.travis.yml +benchmark.js +component.json +examples.js +History.md +Makefile diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md new file mode 100644 index 00000000..27e54a4a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md @@ -0,0 +1,58 @@ +# node-querystring + + query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. + +## Installation + + $ npm install qs + +## Examples + +```js +var qs = require('qs'); + +qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); +// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } + +qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) +// => user[name]=Tobi&user[email]=tobi%40learnboost.com +``` + +## Testing + +Install dev dependencies: + + $ npm install -d + +and execute: + + $ make test + +browser: + + $ open test/browser/index.html + +## License + +(The MIT License) + +Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js new file mode 100644 index 00000000..b05938ac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js @@ -0,0 +1,366 @@ +/** + * Object#toString() ref for stringify(). + */ + +var toString = Object.prototype.toString; + +/** + * Object#hasOwnProperty ref + */ + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Array#indexOf shim. + */ + +var indexOf = typeof Array.prototype.indexOf === 'function' + ? function(arr, el) { return arr.indexOf(el); } + : function(arr, el) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === el) return i; + } + return -1; + }; + +/** + * Array.isArray shim. + */ + +var isArray = Array.isArray || function(arr) { + return toString.call(arr) == '[object Array]'; +}; + +/** + * Object.keys shim. + */ + +var objectKeys = Object.keys || function(obj) { + var ret = []; + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + ret.push(key); + } + } + return ret; +}; + +/** + * Array#forEach shim. + */ + +var forEach = typeof Array.prototype.forEach === 'function' + ? function(arr, fn) { return arr.forEach(fn); } + : function(arr, fn) { + for (var i = 0; i < arr.length; i++) fn(arr[i]); + }; + +/** + * Array#reduce shim. + */ + +var reduce = function(arr, fn, initial) { + if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); + var res = initial; + for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); + return res; +}; + +/** + * Cache non-integer test regexp. + */ + +var isint = /^[0-9]+$/; + +function promote(parent, key) { + if (parent[key].length == 0) return parent[key] = {} + var t = {}; + for (var i in parent[key]) { + if (hasOwnProperty.call(parent[key], i)) { + t[i] = parent[key][i]; + } + } + parent[key] = t; + return t; +} + +function parse(parts, parent, key, val) { + var part = parts.shift(); + + // illegal + if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; + + // end + if (!part) { + if (isArray(parent[key])) { + parent[key].push(val); + } else if ('object' == typeof parent[key]) { + parent[key] = val; + } else if ('undefined' == typeof parent[key]) { + parent[key] = val; + } else { + parent[key] = [parent[key], val]; + } + // array + } else { + var obj = parent[key] = parent[key] || []; + if (']' == part) { + if (isArray(obj)) { + if ('' != val) obj.push(val); + } else if ('object' == typeof obj) { + obj[objectKeys(obj).length] = val; + } else { + obj = parent[key] = [parent[key], val]; + } + // prop + } else if (~indexOf(part, ']')) { + part = part.substr(0, part.length - 1); + if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); + parse(parts, obj, part, val); + // key + } else { + if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); + parse(parts, obj, part, val); + } + } +} + +/** + * Merge parent key/val pair. + */ + +function merge(parent, key, val){ + if (~indexOf(key, ']')) { + var parts = key.split('[') + , len = parts.length + , last = len - 1; + parse(parts, parent, 'base', val); + // optimize + } else { + if (!isint.test(key) && isArray(parent.base)) { + var t = {}; + for (var k in parent.base) t[k] = parent.base[k]; + parent.base = t; + } + set(parent.base, key, val); + } + + return parent; +} + +/** + * Compact sparse arrays. + */ + +function compact(obj) { + if ('object' != typeof obj) return obj; + + if (isArray(obj)) { + var ret = []; + + for (var i in obj) { + if (hasOwnProperty.call(obj, i)) { + ret.push(obj[i]); + } + } + + return ret; + } + + for (var key in obj) { + obj[key] = compact(obj[key]); + } + + return obj; +} + +/** + * Parse the given obj. + */ + +function parseObject(obj){ + var ret = { base: {} }; + + forEach(objectKeys(obj), function(name){ + merge(ret, name, obj[name]); + }); + + return compact(ret.base); +} + +/** + * Parse the given str. + */ + +function parseString(str){ + var ret = reduce(String(str).split('&'), function(ret, pair){ + var eql = indexOf(pair, '=') + , brace = lastBraceInKey(pair) + , key = pair.substr(0, brace || eql) + , val = pair.substr(brace || eql, pair.length) + , val = val.substr(indexOf(val, '=') + 1, val.length); + + // ?foo + if ('' == key) key = pair, val = ''; + if ('' == key) return ret; + + return merge(ret, decode(key), decode(val)); + }, { base: {} }).base; + + return compact(ret); +} + +/** + * Parse the given query `str` or `obj`, returning an object. + * + * @param {String} str | {Object} obj + * @return {Object} + * @api public + */ + +exports.parse = function(str){ + if (null == str || '' == str) return {}; + return 'object' == typeof str + ? parseObject(str) + : parseString(str); +}; + +/** + * Turn the given `obj` into a query string + * + * @param {Object} obj + * @return {String} + * @api public + */ + +var stringify = exports.stringify = function(obj, prefix) { + if (isArray(obj)) { + return stringifyArray(obj, prefix); + } else if ('[object Object]' == toString.call(obj)) { + return stringifyObject(obj, prefix); + } else if ('string' == typeof obj) { + return stringifyString(obj, prefix); + } else { + return prefix + '=' + encodeURIComponent(String(obj)); + } +}; + +/** + * Stringify the given `str`. + * + * @param {String} str + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyString(str, prefix) { + if (!prefix) throw new TypeError('stringify expects an object'); + return prefix + '=' + encodeURIComponent(str); +} + +/** + * Stringify the given `arr`. + * + * @param {Array} arr + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyArray(arr, prefix) { + var ret = []; + if (!prefix) throw new TypeError('stringify expects an object'); + for (var i = 0; i < arr.length; i++) { + ret.push(stringify(arr[i], prefix + '[' + i + ']')); + } + return ret.join('&'); +} + +/** + * Stringify the given `obj`. + * + * @param {Object} obj + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyObject(obj, prefix) { + var ret = [] + , keys = objectKeys(obj) + , key; + + for (var i = 0, len = keys.length; i < len; ++i) { + key = keys[i]; + if ('' == key) continue; + if (null == obj[key]) { + ret.push(encodeURIComponent(key) + '='); + } else { + ret.push(stringify(obj[key], prefix + ? prefix + '[' + encodeURIComponent(key) + ']' + : encodeURIComponent(key))); + } + } + + return ret.join('&'); +} + +/** + * Set `obj`'s `key` to `val` respecting + * the weird and wonderful syntax of a qs, + * where "foo=bar&foo=baz" becomes an array. + * + * @param {Object} obj + * @param {String} key + * @param {String} val + * @api private + */ + +function set(obj, key, val) { + var v = obj[key]; + if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; + if (undefined === v) { + obj[key] = val; + } else if (isArray(v)) { + v.push(val); + } else { + obj[key] = [v, val]; + } +} + +/** + * Locate last brace in `str` within the key. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function lastBraceInKey(str) { + var len = str.length + , brace + , c; + for (var i = 0; i < len; ++i) { + c = str[i]; + if (']' == c) brace = false; + if ('[' == c) brace = true; + if ('=' == c && !brace) return i; + } +} + +/** + * Decode `str`. + * + * @param {String} str + * @return {String} + * @api private + */ + +function decode(str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (err) { + return str; + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json new file mode 100644 index 00000000..313485c0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json @@ -0,0 +1,38 @@ +{ + "name": "qs", + "description": "querystring parser", + "version": "0.6.6", + "keywords": [ + "query string", + "parser", + "component" + ], + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/node-querystring.git" + }, + "devDependencies": { + "mocha": "*", + "expect.js": "*" + }, + "scripts": { + "test": "make test" + }, + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca", + "url": "http://tjholowaychuk.com" + }, + "main": "index", + "engines": { + "node": "*" + }, + "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", + "readmeFilename": "Readme.md", + "bugs": { + "url": "https://github.com/visionmedia/node-querystring/issues" + }, + "homepage": "https://github.com/visionmedia/node-querystring", + "_id": "qs@0.6.6", + "_from": "qs@~0.6.0" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc new file mode 100644 index 00000000..8fcead4f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc @@ -0,0 +1,72 @@ +{ + // Settings + "passfail" : false, // Stop on first error. + "maxerr" : 100, // Maximum error before stopping. + + + // Predefined globals whom JSHint will ignore. + "browser" : false, // Standard browser globals e.g. `window`, `document`. + "node" : true, + "rhino" : false, + "couch" : false, + "wsh" : false, // Windows Scripting Host. + + "jquery" : false, + "prototypejs" : false, + "mootools" : false, + "dojo" : false, + + "predef" : [ // Custom globals. + "escape", "unescape" // aren't picked up by node flag above :/ + ], + + + // Development. + "debug" : false, // Allow debugger statements e.g. browser breakpoints. + "devel" : false, // Allow developments statements e.g. `console.log();`. + + + // EcmaScript 5. + "es5" : true, // Allow EcmaScript 5 syntax. + "esnext" : true, // Allow ES "next" syntax, specifically 'const' (V8 has this) + "strict" : false, // Require `use strict` pragma in every file. + "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). + + + // The Good Parts. + "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). + "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. + "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). + "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. + "curly" : false, // Require {} for every new block or scope. + "eqeqeq" : false, // Require triple equals i.e. `===`. + "eqnull" : true, // Tolerate use of `== null`. + "evil" : false, // Tolerate use of `eval`. + "expr" : true, // Tolerate `ExpressionStatement` as Programs. + "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` + "latedef" : false, // Prohibit variable use before definition. + "loopfunc" : false, // Allow functions to be defined within loops. + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. + "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. + "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. + "scripturl" : true, // Tolerate script-targeted URLs. + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. + "undef" : true, // Require all non-global variables be declared before they are used. + + + // Personal styling prefrences. + "lastsemic" : true, // Prohibit missing semicolon for the last statement in a one-line block + "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`. + "noempty" : true, // Prohipit use of empty blocks. + "nonew" : true, // Prohibit use of constructors for side-effects. + "nomen" : false, // Prohibit use of initial or trailing underbars in names. + "onevar" : false, // Allow only one `var` statement per function. + "onecase" : false, // Allow switches with one case statement + "plusplus" : false, // Prohibit use of `++` & `--`. + "proto" : false, // Allow use of __proto__ + "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. + "trailing" : true, // Prohibit trailing whitespaces. + "white" : false // Check against strict whitespace and indentation rules. +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore new file mode 100644 index 00000000..54efff98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +.*.sw[nmop] +npm-debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE new file mode 100644 index 00000000..3fac4c85 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE @@ -0,0 +1,78 @@ +Copyright GoInstant, Inc. and other contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +The following exceptions apply: + +=== + +`pubSufTest()` of generate-pubsuffix.js is in the public domain. + + // Any copyright is dedicated to the Public Domain. + // http://creativecommons.org/publicdomain/zero/1.0/ + +=== + +`public-suffix.txt` was obtained from + +via . + +That file contains the usual Mozilla triple-license, for which this project uses it +under the terms of the MPL 1.1: + + // ***** BEGIN LICENSE BLOCK ***** + // Version: MPL 1.1/GPL 2.0/LGPL 2.1 + // + // The contents of this file are subject to the Mozilla Public License Version + // 1.1 (the "License"); you may not use this file except in compliance with + // the License. You may obtain a copy of the License at + // http://www.mozilla.org/MPL/ + // + // Software distributed under the License is distributed on an "AS IS" basis, + // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + // for the specific language governing rights and limitations under the + // License. + // + // The Original Code is the Public Suffix List. + // + // The Initial Developer of the Original Code is + // Jo Hermans . + // Portions created by the Initial Developer are Copyright (C) 2007 + // the Initial Developer. All Rights Reserved. + // + // Contributor(s): + // Ruben Arakelyan + // Gervase Markham + // Pamela Greene + // David Triendl + // Jothan Frakes + // The kind representatives of many TLD registries + // + // Alternatively, the contents of this file may be used under the terms of + // either the GNU General Public License Version 2 or later (the "GPL"), or + // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + // in which case the provisions of the GPL or the LGPL are applicable instead + // of those above. If you wish to allow use of your version of this file only + // under the terms of either the GPL or the LGPL, and not to allow others to + // use your version of this file under the terms of the MPL, indicate your + // decision by deleting the provisions above and replace them with the notice + // and other provisions required by the GPL or the LGPL. If you do not delete + // the provisions above, a recipient may use your version of this file under + // the terms of any one of the MPL, the GPL or the LGPL. + // + // ***** END LICENSE BLOCK ***** diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md new file mode 100644 index 00000000..fd1dbb1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md @@ -0,0 +1,380 @@ +[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js + +![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg) + +# Synopsis + +``` javascript +var cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie' +var Cookie = cookies.Cookie; +var cookie = Cookie.parse(header); +cookie.value = 'somethingdifferent'; +header = cookie.toString(); + +var cookiejar = new cookies.CookieJar(); +cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); +// ... +cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { + res.headers['cookie'] = cookies.join('; '); +}); +``` + +# Installation + +It's _so_ easy! + +`npm install tough-cookie` + +Requires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default. + +Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. + +# API + +cookies +======= + +Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". + +parseDate(string[,strict]) +----------------- + +Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. "Thu, 01 Jan 1970 00:00:010 GMT" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid). + +formatDate(date) +---------------- + +Format a Date into a RFC1123 string (the RFC6265-recommended format). + +canonicalDomain(str) +-------------------- + +Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). + +domainMatch(str,domStr[,canonicalize=true]) +------------------------------------------- + +Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". + +The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not. + +defaultPath(path) +----------------- + +Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. + +The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. + +pathMatch(reqPath,cookiePath) +----------------------------- + +Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. + +This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. + +parse(header[,strict=false]) +---------------------------- + +alias for `Cookie.parse(header[,strict])` + +fromJSON(string) +---------------- + +alias for `Cookie.fromJSON(string)` + +getPublicSuffix(hostname) +------------------------- + +Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. + +For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. + +For further information, see http://publicsuffix.org/. This module derives its list from that site. + +cookieCompare(a,b) +------------------ + +For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest. + +``` javascript +var cookies = [ /* unsorted array of Cookie objects */ ]; +cookies = cookies.sort(cookieCompare); +``` + +permuteDomain(domain) +--------------------- + +Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. + + +permutePath(path) +----------------- + +Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. + +Cookie +====== + +Cookie.parse(header[,strict=false]) +----------------------------------- + +Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off. + +Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: + +``` javascript +if (res.headers['set-cookie'] instanceof Array) + cookies = res.headers['set-cookie'].map(Cookie.parse); +else + cookies = [Cookie.parse(res.headers['set-cookie'])]; +``` + +Cookie.fromJSON(string) +----------------------- + +Convert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects. + +Properties +========== + + * _key_ - string - the name or key of the cookie (default "") + * _value_ - string - the value of the cookie (default "") + * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` + * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` + * _domain_ - string - the `Domain=` attribute of the cookie + * _path_ - string - the `Path=` of the cookie + * _secure_ - boolean - the `Secure` cookie flag + * _httpOnly_ - boolean - the `HttpOnly` cookie flag + * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) + +After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: + + * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) + * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. + * _created_ - `Date` - when this cookie was added to the jar + * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. + +Construction([{options}]) +------------ + +Receives an options object that can contain any Cookie properties, uses the default for unspecified properties. + +.toString() +----------- + +encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. + +.cookieString() +--------------- + +encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). + +.setExpires(String) +------------------- + +sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. + +.setMaxAge(number) +------------------- + +sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. + +.expiryTime([now=Date.now()]) +----------------------------- + +.expiryDate([now=Date.now()]) +----------------------------- + +expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. + +Max-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute. + +If Expires (`.expires`) is set, that's returned. + +Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). + +.TTL([now=Date.now()]) +--------- + +compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. + +The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. + +.canonicalizedDoman() +--------------------- + +.cdomain() +---------- + +return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. + +.validate() +----------- + +Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. + +validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: + +``` javascript +if (cookie.validate() === true) { + // it's tasty +} else { + // yuck! +} +``` + +CookieJar +========= + +Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes]) +------------ + +Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. + + +Attributes +---------- + + * _rejectPublicSuffixes_ - boolean - reject cookies with domains like "com" and "co.uk" (default: `true`) + +Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. + +.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie)) +------------------------------------------------------------------- + +Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _strict_ - boolean - default `false` - perform extra checks + * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option. + +As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). + +.storeCookie(cookie, [{options},] cb(err,cookie)) +------------------------------------------------- + +__REMOVED__ removed in lieu of the CookieStore API below + +.getCookies(currentUrl, [{options},] cb(err,cookies)) +----------------------------------------------------- + +Retrieve the list of cookies that can be sent in a Cookie header for the current url. + +If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). + * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it). + +The `.lastAccessed` property of the returned cookies will have been updated. + +.getCookieString(...) +--------------------- + +Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. + +.getSetCookieStrings(...) +------------------------- + +Accepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`. + +# CookieStore API + +The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. + +All `domain` parameters will have been normalized before calling. + +The Cookie store must have all of the following methods. + +store.findCookie(domain, path, key, cb(err,cookie)) +--------------------------------------------------- + +Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. + +Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). + +store.findCookies(domain, path, cb(err,cookies)) +------------------------------------------------ + +Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. + +If no cookies are found, the callback MUST be passed an empty array. + +The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. + +As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). + +store.putCookie(cookie, cb(err)) +-------------------------------- + +Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. + +The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. + +Pass an error if the cookie cannot be stored. + +store.updateCookie(oldCookie, newCookie, cb(err)) +------------------------------------------------- + +Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. + +The `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion). + +Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. + +The `newCookie` and `oldCookie` objects MUST NOT be modified. + +Pass an error if the newCookie cannot be stored. + +store.removeCookie(domain, path, key, cb(err)) +---------------------------------------------- + +Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). + +The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. + +store.removeCookies(domain, path, cb(err)) +------------------------------------------ + +Removes matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed. + +Pass an error ONLY if removing any existing cookies failed. + +# TODO + + * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()` + * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891 + * better tests for `validate()`? + +# Copyright and License + +(tl;dr: MIT with some MPL/1.1) + +Copyright GoInstant, Inc. and other contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +Portions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js new file mode 100644 index 00000000..a7fa5452 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js @@ -0,0 +1,230 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +var fs = require('fs'); +var assert = require('assert'); +var punycode = require('punycode'); + +fs.readFile('./public-suffix.txt', 'utf8', function(err,string) { + if (err) throw err; + var lines = string.split("\n"); + process.nextTick(function() { + processList(lines); + }); +}); + +var index = {}; + +var COMMENT = new RegExp('//.+'); +function processList(lines) { + while (lines.length) { + var line = lines.shift(); + line = line.replace(COMMENT,'').trim(); + if (!line) continue; + addToIndex(index,line); + } + + pubSufTest(); + + var w = fs.createWriteStream('./lib/pubsuffix.js',{ + flags: 'w', + encoding: 'utf8', + mode: 0644, + }); + w.on('end', process.exit); + w.write("/****************************************************\n"); + w.write(" * AUTOMATICALLY GENERATED by generate-pubsuffix.js *\n"); + w.write(" * DO NOT EDIT! *\n"); + w.write(" ****************************************************/\n\n"); + + w.write("module.exports.getPublicSuffix = "); + w.write(getPublicSuffix.toString()); + w.write(";\n\n"); + + w.write("// The following generated structure is used under the MPL version 1.1\n"); + w.write("// See public-suffix.txt for more information\n\n"); + w.write("var index = module.exports.index = Object.freeze(\n"); + w.write(JSON.stringify(index)); + w.write(");\n\n"); + w.write("// END of automatically generated file\n"); + + w.end(); +} + +function addToIndex(index,line) { + var prefix = ''; + if (line.replace(/^(!|\*\.)/)) { + prefix = RegExp.$1; + line = line.slice(prefix.length); + } + line = prefix + punycode.toASCII(line); + + if (line.substr(0,1) == '!') + index[line.substr(1)] = false; + else + index[line] = true; +} + +// include the licence in the function since it gets written to pubsuffix.js +function getPublicSuffix(domain) { + /* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + if (!domain) return null; + if (domain.match(/^\./)) return null; + + domain = domain.toLowerCase(); + var parts = domain.split('.').reverse(); + + var suffix = ''; + var suffixLen = 0; + for (var i=0; i suffixLen) { + return parts.slice(0,suffixLen+1).reverse().join('.'); + } + + return null; +} + +function checkPublicSuffix(give,get) { + var got = getPublicSuffix(give); + assert.equal(got, get, give+' should be '+(get==null?'NULL':get)+' but got '+got); +} + +// pubSufTest() was converted to JavaScript from http://publicsuffix.org/list/test.txt +function pubSufTest() { + // For this function-scope and this function-scope ONLY: + // Any copyright is dedicated to the Public Domain. + // http://creativecommons.org/publicdomain/zero/1.0/ + + // NULL input. + checkPublicSuffix(null, null); + // Mixed case. + checkPublicSuffix('COM', null); + checkPublicSuffix('example.COM', 'example.com'); + checkPublicSuffix('WwW.example.COM', 'example.com'); + // Leading dot. + checkPublicSuffix('.com', null); + checkPublicSuffix('.example', null); + checkPublicSuffix('.example.com', null); + checkPublicSuffix('.example.example', null); + // Unlisted TLD. + checkPublicSuffix('example', null); + checkPublicSuffix('example.example', null); + checkPublicSuffix('b.example.example', null); + checkPublicSuffix('a.b.example.example', null); + // Listed, but non-Internet, TLD. + checkPublicSuffix('local', null); + checkPublicSuffix('example.local', null); + checkPublicSuffix('b.example.local', null); + checkPublicSuffix('a.b.example.local', null); + // TLD with only 1 rule. + checkPublicSuffix('biz', null); + checkPublicSuffix('domain.biz', 'domain.biz'); + checkPublicSuffix('b.domain.biz', 'domain.biz'); + checkPublicSuffix('a.b.domain.biz', 'domain.biz'); + // TLD with some 2-level rules. + checkPublicSuffix('com', null); + checkPublicSuffix('example.com', 'example.com'); + checkPublicSuffix('b.example.com', 'example.com'); + checkPublicSuffix('a.b.example.com', 'example.com'); + checkPublicSuffix('uk.com', null); + checkPublicSuffix('example.uk.com', 'example.uk.com'); + checkPublicSuffix('b.example.uk.com', 'example.uk.com'); + checkPublicSuffix('a.b.example.uk.com', 'example.uk.com'); + checkPublicSuffix('test.ac', 'test.ac'); + // TLD with only 1 (wildcard) rule. + checkPublicSuffix('cy', null); + checkPublicSuffix('c.cy', null); + checkPublicSuffix('b.c.cy', 'b.c.cy'); + checkPublicSuffix('a.b.c.cy', 'b.c.cy'); + // More complex TLD. + checkPublicSuffix('jp', null); + checkPublicSuffix('test.jp', 'test.jp'); + checkPublicSuffix('www.test.jp', 'test.jp'); + checkPublicSuffix('ac.jp', null); + checkPublicSuffix('test.ac.jp', 'test.ac.jp'); + checkPublicSuffix('www.test.ac.jp', 'test.ac.jp'); + checkPublicSuffix('kyoto.jp', null); + checkPublicSuffix('c.kyoto.jp', null); + checkPublicSuffix('b.c.kyoto.jp', 'b.c.kyoto.jp'); + checkPublicSuffix('a.b.c.kyoto.jp', 'b.c.kyoto.jp'); + checkPublicSuffix('pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. + checkPublicSuffix('www.pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. + checkPublicSuffix('city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. + checkPublicSuffix('www.city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. + // TLD with a wildcard rule and exceptions. + checkPublicSuffix('om', null); + checkPublicSuffix('test.om', null); + checkPublicSuffix('b.test.om', 'b.test.om'); + checkPublicSuffix('a.b.test.om', 'b.test.om'); + checkPublicSuffix('songfest.om', 'songfest.om'); + checkPublicSuffix('www.songfest.om', 'songfest.om'); + // US K12. + checkPublicSuffix('us', null); + checkPublicSuffix('test.us', 'test.us'); + checkPublicSuffix('www.test.us', 'test.us'); + checkPublicSuffix('ak.us', null); + checkPublicSuffix('test.ak.us', 'test.ak.us'); + checkPublicSuffix('www.test.ak.us', 'test.ak.us'); + checkPublicSuffix('k12.ak.us', null); + checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us'); + checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us'); + + +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js new file mode 100644 index 00000000..1d8615b5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js @@ -0,0 +1,947 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/*jshint regexp:false */ +var net = require('net'); +var urlParse = require('url').parse; +var pubsuffix = require('./pubsuffix'); + +var punycode; +try { + punycode = require('punycode'); +} catch(e) { + console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); +} + +var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; + +// From RFC2616 S2.2: +var TOKEN = /[\x21\x23-\x26\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/; + +// From RFC6265 S4.1.1 +// note that it excludes \x3B ";" +var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/; +var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; + +// The name/key cannot be empty but the value can (S5.2): +var COOKIE_PAIR_STRICT = new RegExp('^('+TOKEN.source+'+)=("?)('+COOKIE_OCTET.source+'*)\\2'); +var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2/; + +// RFC6265 S4.1.1 defines extension-av as 'any CHAR except CTLs or ";"' +// Note ';' is \x3B +var NON_CTL_SEMICOLON = /[\x20-\x3A\x3C-\x7E]+/; +var EXTENSION_AV = NON_CTL_SEMICOLON; +var PATH_VALUE = NON_CTL_SEMICOLON; + +// Used for checking whether or not there is a trailing semi-colon +var TRAILING_SEMICOLON = /;+$/; + +/* RFC6265 S5.1.1.5: + * [fail if] the day-of-month-value is less than 1 or greater than 31 + */ +var DAY_OF_MONTH = /^(0?[1-9]|[12][0-9]|3[01])$/; + +/* RFC6265 S5.1.1.5: + * [fail if] + * * the hour-value is greater than 23, + * * the minute-value is greater than 59, or + * * the second-value is greater than 59. + */ +var TIME = /(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/; +var STRICT_TIME = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/; + +var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/i; +var MONTH_TO_NUM = { + jan:0, feb:1, mar:2, apr:3, may:4, jun:5, jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 +}; +var NUM_TO_MONTH = [ + 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' +]; +var NUM_TO_DAY = [ + 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' +]; + +var YEAR = /^([1-9][0-9]{1,3})$/; // 2 to 4 digits (will check range when parsing) + +var MAX_TIME = 2147483647000; // 31-bit max +var MAX_DATE = new Date(CookieJar.MAX_TIME); // 31-bit max +var MIN_TIME = 0; // 31-bit min +var MIN_DATE = new Date(CookieJar.MIN_TIME); // 31-bit min + + +// RFC6265 S5.1.1 date parser: +function parseDate(str,strict) { + if (!str) return; + var found_time, found_dom, found_month, found_year; + + /* RFC6265 S5.1.1: + * 2. Process each date-token sequentially in the order the date-tokens + * appear in the cookie-date + */ + var tokens = str.split(DATE_DELIM); + if (!tokens) return; + + var date = new Date(); + date.setMilliseconds(0); + + for (var i=0; i= 10 ? d : '0'+d; + var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; + var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; + var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; + return NUM_TO_DAY[date.getUTCDay()] + ', ' + + d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ + h+':'+m+':'+s+' GMT'; +} + +// S5.1.2 Canonicalized Host Names +function canonicalDomain(str) { + if (str == null) return null; + str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . + + // convert to IDN if any non-ASCII characters + if (punycode && /[^\u0001-\u007f]/.test(str)) + str = punycode.toASCII(str); + + return str.toLowerCase(); +} + +// S5.1.3 Domain Matching +function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) return null; + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } + + /* + * "The domain string and the string are identical. (Note that both the + * domain string and the string will have been canonicalized to lower case at + * this point)" + */ + if (str == domStr) return true; + + /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ + + /* "* The string is a host name (i.e., not an IP address)." */ + if (net.isIP(str)) return false; + + /* "* The domain string is a suffix of the string" */ + var idx = str.indexOf(domStr); + if (idx <= 0) return false; // it's a non-match (-1) or prefix (0) + + // e.g "a.b.c".indexOf("b.c") === 2 + // 5 === 3+2 + if (str.length !== domStr.length + idx) // it's not a suffix + return false; + + /* "* The last character of the string that is not included in the domain + * string is a %x2E (".") character." */ + if (str.substr(idx-1,1) !== '.') return false; + return true; +} + + +// RFC6265 S5.1.4 Paths and Path-Match + +/* + * "The user agent MUST use an algorithm equivalent to the following algorithm + * to compute the default-path of a cookie:" + * + * Assumption: the path (and not query part or absolute uri) is passed in. + */ +function defaultPath(path) { + // "2. If the uri-path is empty or if the first character of the uri-path is not + // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. + if (!path || path.substr(0,1) !== "/") return "/"; + + // "3. If the uri-path contains no more than one %x2F ("/") character, output + // %x2F ("/") and skip the remaining step." + if (path === "/") return path; + + var rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) return "/"; + + // "4. Output the characters of the uri-path from the first character up to, + // but not including, the right-most %x2F ("/")." + return path.slice(0, rightSlash); +} + +/* + * "A request-path path-matches a given cookie-path if at least one of the + * following conditions holds:" + */ +function pathMatch(reqPath,cookiePath) { + // "o The cookie-path and the request-path are identical." + if (cookiePath === reqPath) + return true; + + var idx = reqPath.indexOf(cookiePath); + if (idx === 0) { + // "o The cookie-path is a prefix of the request-path, and the last + // character of the cookie-path is %x2F ("/")." + if (cookiePath.substr(-1) === "/") + return true; + + // " o The cookie-path is a prefix of the request-path, and the first + // character of the request-path that is not included in the cookie- path + // is a %x2F ("/") character." + if (reqPath.substr(cookiePath.length,1) === "/") + return true; + } + + return false; +} + +function parse(str, strict) { + str = str.trim(); + + // S4.1.1 Trailing semi-colons are not part of the specification. + // If we are not in strict mode we remove the trailing semi-colons. + var semiColonCheck = TRAILING_SEMICOLON.exec(str); + if (semiColonCheck) { + if (strict) return; + str = str.slice(0, semiColonCheck.index); + } + + // We use a regex to parse the "name-value-pair" part of S5.2 + var firstSemi = str.indexOf(';'); // S5.2 step 1 + var pairRx = strict ? COOKIE_PAIR_STRICT : COOKIE_PAIR; + var result = pairRx.exec(firstSemi === -1 ? str : str.substr(0,firstSemi)); + + // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")" + // constraints as well as trimming any whitespace. + if (!result) return; + + var c = new Cookie(); + c.key = result[1]; // the regexp should trim() already + c.value = result[3]; // [2] is quotes or empty-string + + if (firstSemi === -1) return c; + + // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question)." plus later on in the same section + // "discard the first ";" and trim". + var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); + + // "If the unparsed-attributes string is empty, skip the rest of these + // steps." + if (unparsed.length === 0) return c; + + /* + * S5.2 says that when looping over the items "[p]rocess the attribute-name + * and attribute-value according to the requirements in the following + * subsections" for every item. Plus, for many of the individual attributes + * in S5.3 it says to use the "attribute-value of the last attribute in the + * cookie-attribute-list". Therefore, in this implementation, we overwrite + * the previous value. + */ + var cookie_avs = unparsed.split(/\s*;\s*/); + while (cookie_avs.length) { + var av = cookie_avs.shift(); + + if (strict && !EXTENSION_AV.test(av)) return; + + var av_sep = av.indexOf('='); + var av_key, av_value; + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0,av_sep); + av_value = av.substr(av_sep+1); + } + + av_key = av_key.trim().toLowerCase(); + if (av_value) av_value = av_value.trim(); + + switch(av_key) { + case 'expires': // S5.2.1 + if (!av_value) { if(strict){return}else{break;} } + var exp = parseDate(av_value,strict); + // "If the attribute-value failed to parse as a cookie date, ignore the + // cookie-av." + if (exp == null) { if(strict){return}else{break;} } + c.expires = exp; + // over and underflow not realistically a concern: V8's getTime() seems to + // store something larger than a 32-bit time_t (even with 32-bit node) + break; + + case 'max-age': // S5.2.2 + if (!av_value) { if(strict){return}else{break;} } + // "If the first character of the attribute-value is not a DIGIT or a "-" + // character ...[or]... If the remainder of attribute-value contains a + // non-DIGIT character, ignore the cookie-av." + if (!/^-?[0-9]+$/.test(av_value)) { if(strict){return}else{break;} } + var delta = parseInt(av_value,10); + if (strict && delta <= 0) return; // S4.1.1 + // "If delta-seconds is less than or equal to zero (0), let expiry-time + // be the earliest representable date and time." + c.setMaxAge(delta); + break; + + case 'domain': // S5.2.3 + // "If the attribute-value is empty, the behavior is undefined. However, + // the user agent SHOULD ignore the cookie-av entirely." + if (!av_value) { if(strict){return}else{break;} } + // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E + // (".") character." + var domain = av_value.trim().replace(/^\./,''); + if (!domain) { if(strict){return}else{break;} } // see "is empty" above + // "Convert the cookie-domain to lower case." + c.domain = domain.toLowerCase(); + break; + + case 'path': // S5.2.4 + /* + * "If the attribute-value is empty or if the first character of the + * attribute-value is not %x2F ("/"): + * Let cookie-path be the default-path. + * Otherwise: + * Let cookie-path be the attribute-value." + * + * We'll represent the default-path as null since it depends on the + * context of the parsing. + */ + if (!av_value || av_value.substr(0,1) != "/") { if(strict){return}else{break;} } + c.path = av_value; + break; + + case 'secure': // S5.2.5 + /* + * "If the attribute-name case-insensitively matches the string "Secure", + * the user agent MUST append an attribute to the cookie-attribute-list + * with an attribute-name of Secure and an empty attribute-value." + */ + if (av_value != null) { if(strict){return} } + c.secure = true; + break; + + case 'httponly': // S5.2.6 -- effectively the same as 'secure' + if (av_value != null) { if(strict){return} } + c.httpOnly = true; + break; + + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } + + // ensure a default date for sorting: + c.creation = new Date(); + return c; +} + +function fromJSON(str) { + if (!str) return null; + + var obj; + try { + obj = JSON.parse(str); + } catch (e) { + return null; + } + + var c = new Cookie(); + for (var i=0; i 1) { + var lindex = path.lastIndexOf('/'); + if (lindex === 0) break; + path = path.substr(0,lindex); + permutations.push(path); + } + permutations.push('/'); + return permutations; +} + + +function Cookie (opts) { + if (typeof opts !== "object") return; + Object.keys(opts).forEach(function (key) { + if (Cookie.prototype.hasOwnProperty(key)) { + this[key] = opts[key] || Cookie.prototype[key]; + } + }.bind(this)); +} + +Cookie.parse = parse; +Cookie.fromJSON = fromJSON; + +Cookie.prototype.key = ""; +Cookie.prototype.value = ""; + +// the order in which the RFC has them: +Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity +Cookie.prototype.maxAge = null; // takes precedence over expires for TTL +Cookie.prototype.domain = null; +Cookie.prototype.path = null; +Cookie.prototype.secure = false; +Cookie.prototype.httpOnly = false; +Cookie.prototype.extensions = null; + +// set by the CookieJar: +Cookie.prototype.hostOnly = null; // boolean when set +Cookie.prototype.pathIsDefault = null; // boolean when set +Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse +Cookie.prototype.lastAccessed = null; // Date when set + +var cookieProperties = Object.freeze(Object.keys(Cookie.prototype).map(function(p) { + if (p instanceof Function) return; + return p; +})); +var numCookieProperties = cookieProperties.length; + +Cookie.prototype.inspect = function inspect() { + var now = Date.now(); + return 'Cookie="'+this.toString() + + '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + + '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + + '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + + '"'; +}; + +Cookie.prototype.validate = function validate() { + if (!COOKIE_OCTETS.test(this.value)) + return false; + if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires,true)) + return false; + if (this.maxAge != null && this.maxAge <= 0) + return false; // "Max-Age=" non-zero-digit *DIGIT + if (this.path != null && !PATH_VALUE.test(this.path)) + return false; + + var cdomain = this.cdomain(); + if (cdomain) { + if (cdomain.match(/\.$/)) + return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this + var suffix = pubsuffix.getPublicSuffix(cdomain); + if (suffix == null) // it's a public suffix + return false; + } + return true; +}; + +Cookie.prototype.setExpires = function setExpires(exp) { + if (exp instanceof Date) this.expires = exp; + else this.expires = parseDate(exp) || "Infinity"; +}; + +Cookie.prototype.setMaxAge = function setMaxAge(age) { + if (age === Infinity || age === -Infinity) + this.maxAge = age.toString(); // so JSON.stringify() works + else + this.maxAge = age; +}; + +// gives Cookie header format +Cookie.prototype.cookieString = function cookieString() { + var val = this.value; + if (val == null) val = ''; + if (!val.length || COOKIE_OCTETS.test(val)) + return this.key+'='+val; + else + return this.key+'="'+val+'"'; +}; + +// gives Set-Cookie header format +Cookie.prototype.toString = function toString() { + var str = this.cookieString(); + + if (this.expires != Infinity) { + if (this.expires instanceof Date) + str += '; Expires='+formatDate(this.expires); + else + str += '; Expires='+this.expires; + } + + if (this.maxAge != null && this.maxAge != Infinity) + str += '; Max-Age='+this.maxAge; + + if (this.domain && !this.hostOnly) + str += '; Domain='+this.domain; + if (this.path) + str += '; Path='+this.path; + + if (this.secure) str += '; Secure'; + if (this.httpOnly) str += '; HttpOnly'; + if (this.extensions) { + this.extensions.forEach(function(ext) { + str += '; '+ext; + }); + } + + return str; +}; + +// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere) +// S5.3 says to give the "latest representable date" for which we use Infinity +// For "expired" we use 0 +Cookie.prototype.TTL = function TTL(now) { + /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires + * attribute, the Max-Age attribute has precedence and controls the + * expiration date of the cookie. + * (Concurs with S5.3 step 3) + */ + if (this.maxAge != null) { + return this.maxAge<=0 ? 0 : this.maxAge*1000; + } + + var expires = this.expires; + if (expires != Infinity) { + if (!(expires instanceof Date)) { + expires = parseDate(expires) || Infinity; + } + + if (expires == Infinity) + return Infinity; + + return expires.getTime() - (now || Date.now()); + } + + return Infinity; +}; + +// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere) +Cookie.prototype.expiryTime = function expiryTime(now) { + if (this.maxAge != null) { + var relativeTo = this.creation || now || new Date(); + var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000; + return relativeTo.getTime() + age; + } + + if (this.expires == Infinity) return Infinity; + return this.expires.getTime(); +}; + +// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere), except it returns a Date +Cookie.prototype.expiryDate = function expiryDate(now) { + var millisec = this.expiryTime(now); + if (millisec == Infinity) return new Date(MAX_TIME); + else if (millisec == -Infinity) return new Date(MIN_TIME); + else return new Date(millisec); +}; + +// This replaces the "persistent-flag" parts of S5.3 step 3 +Cookie.prototype.isPersistent = function isPersistent() { + return (this.maxAge != null || this.expires != Infinity); +}; + +// Mostly S5.1.2 and S5.2.3: +Cookie.prototype.cdomain = +Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() { + if (this.domain == null) return null; + return canonicalDomain(this.domain); +}; + + +var memstore; +function CookieJar(store, rejectPublicSuffixes) { + if (rejectPublicSuffixes != null) this.rejectPublicSuffixes = rejectPublicSuffixes; + if (!store) { + memstore = memstore || require('./memstore'); + store = new memstore.MemoryCookieStore(); + } + this.store = store; +} +CookieJar.prototype.store = null; +CookieJar.prototype.rejectPublicSuffixes = true; + +CookieJar.prototype.setCookie = function setCookie(cookie, url, options, cb) { + var err; + var context = (url instanceof Object) ? url : urlParse(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + + var host = canonicalDomain(context.hostname); + + // S5.3 step 1 + if (!(cookie instanceof Cookie)) + cookie = Cookie.parse(cookie, options.strict === true); + if (!cookie) { + err = new Error("Cookie failed to parse"); + return cb(options.ignoreError ? null : err); + } + + // S5.3 step 2 + var now = options.now || new Date(); // will assign later to save effort in the face of errors + + // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie() + + // S5.3 step 4: NOOP; domain is null by default + + // S5.3 step 5: public suffixes + if (this.rejectPublicSuffixes && cookie.domain) { + var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); + if (suffix == null) { // e.g. "com" + err = new Error("Cookie has domain set to a public suffix"); + return cb(options.ignoreError ? null : err); + } + } + + // S5.3 step 6: + if (cookie.domain) { + if (!domainMatch(host, cookie.cdomain(), false)) { + err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host); + return cb(options.ignoreError ? null : err); + } + + if (cookie.hostOnly == null) // don't reset if already set + cookie.hostOnly = false; + + } else { + cookie.hostOnly = true; + cookie.domain = host; + } + + // S5.3 step 7: "Otherwise, set the cookie's path to the default-path of the + // request-uri" + if (!cookie.path) { + cookie.path = defaultPath(context.pathname); + cookie.pathIsDefault = true; + } else { + if (cookie.path.length > 1 && cookie.path.substr(-1) == '/') + cookie.path = cookie.path.slice(0,-1); + } + + // S5.3 step 8: NOOP; secure attribute + // S5.3 step 9: NOOP; httpOnly attribute + + // S5.3 step 10 + if (options.http === false && cookie.httpOnly) { + err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + + var store = this.store; + + if (!store.updateCookie) { + store.updateCookie = function stubUpdateCookie(oldCookie, newCookie, cb) { + this.putCookie(newCookie, cb); + }; + } + + store.findCookie(cookie.domain, cookie.path, cookie.key, function(err,oldCookie) { + if (err) return cb(err); + + var next = function(err) { + if (err) return cb(err); + else cb(null, cookie); + }; + + if (oldCookie) { + // S5.3 step 11 - "If the cookie store contains a cookie with the same name, + // domain, and path as the newly created cookie:" + if (options.http === false && oldCookie.httpOnly) { // step 11.2 + err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + cookie.creation = oldCookie.creation; // step 11.3 + cookie.lastAccessed = now; + // Step 11.4 (delete cookie) is implied by just setting the new one: + store.updateCookie(oldCookie, cookie, next); // step 12 + + } else { + cookie.creation = cookie.lastAccessed = now; + store.putCookie(cookie, next); // step 12 + } + }); +}; + +// RFC6365 S5.4 +CookieJar.prototype.getCookies = function getCookies(url, options, cb) { + var context = (url instanceof Object) ? url : urlParse(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + + var host = canonicalDomain(context.hostname); + var path = context.pathname || '/'; + + var secure = options.secure; + if (secure == null && context.protocol && + (context.protocol == 'https:' || context.protocol == 'wss:')) + { + secure = true; + } + + var http = options.http; + if (http == null) http = true; + + var now = options.now || Date.now(); + var expireCheck = options.expire !== false; + var allPaths = !!options.allPaths; + var store = this.store; + + function matchingCookie(c) { + // "Either: + // The cookie's host-only-flag is true and the canonicalized + // request-host is identical to the cookie's domain. + // Or: + // The cookie's host-only-flag is false and the canonicalized + // request-host domain-matches the cookie's domain." + if (c.hostOnly) { + if (c.domain != host) return false; + } else { + if (!domainMatch(host, c.domain, false)) return false; + } + + // "The request-uri's path path-matches the cookie's path." + if (!allPaths && !pathMatch(path, c.path)) + return false; + + // "If the cookie's secure-only-flag is true, then the request-uri's + // scheme must denote a "secure" protocol" + if (c.secure && !secure) + return false; + + // "If the cookie's http-only-flag is true, then exclude the cookie if the + // cookie-string is being generated for a "non-HTTP" API" + if (c.httpOnly && !http) + return false; + + // deferred from S5.3 + // non-RFC: allow retention of expired cookies by choice + if (expireCheck && c.expiryTime() <= now) { + store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored + return false; + } + + return true; + } + + store.findCookies(host, allPaths ? null : path, function(err,cookies) { + if (err) return cb(err); + + cookies = cookies.filter(matchingCookie); + + // sorting of S5.4 part 2 + if (options.sort !== false) + cookies = cookies.sort(cookieCompare); + + // S5.4 part 3 + var now = new Date(); + cookies.forEach(function(c) { c.lastAccessed = now }); + // TODO persist lastAccessed + + cb(null,cookies); + }); +}; + +CookieJar.prototype.getCookieString = function(/*..., cb*/) { + var args = Array.prototype.slice.call(arguments,0); + var cb = args.pop(); + var next = function(err,cookies) { + if (err) cb(err); + else cb(null, cookies.map(function(c){return c.cookieString()}).join('; ')); + }; + args.push(next); + this.getCookies.apply(this,args); +}; + +CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) { + var args = Array.prototype.slice.call(arguments,0); + var cb = args.pop(); + var next = function(err,cookies) { + if (err) cb(err); + else cb(null, cookies.map(function(c){return c.toString()})); + }; + args.push(next); + this.getCookies.apply(this,args); +}; + + + +module.exports = { + CookieJar: CookieJar, + Cookie: Cookie, + parseDate: parseDate, + formatDate: formatDate, + parse: parse, + fromJSON: fromJSON, + domainMatch: domainMatch, + defaultPath: defaultPath, + pathMatch: pathMatch, + getPublicSuffix: pubsuffix.getPublicSuffix, + cookieCompare: cookieCompare, + permuteDomain: permuteDomain, + permutePath: permutePath, + canonicalDomain: canonicalDomain, +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js new file mode 100644 index 00000000..66abb376 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js @@ -0,0 +1,102 @@ +var tough = require('./cookie'); +var permuteDomain = tough.permuteDomain; +var permutePath = tough.permutePath; +var util = require('util'); + +function MemoryCookieStore() { + this.idx = {}; +} +module.exports.MemoryCookieStore = MemoryCookieStore; +MemoryCookieStore.prototype.idx = null; + +// force a default depth: +MemoryCookieStore.prototype.inspect = function inspect() { + return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; +}; + +MemoryCookieStore.prototype.findCookie = function findCookie(domain, path, key, cb) { + if (!this.idx[domain]) return cb(null,undefined); + if (!this.idx[domain][path]) return cb(null,undefined); + return cb(null,this.idx[domain][path][key]||null); +}; + +MemoryCookieStore.prototype.findCookies = function findCookies(domain, path, cb) { + var results = []; + if (!domain) return cb(null,[]); + + var pathMatcher; + if (!path) { + // null or '/' means "all paths" + pathMatcher = function matchAll(domainIndex) { + for (var curPath in domainIndex) { + var pathIndex = domainIndex[curPath]; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }; + + } else if (path === '/') { + pathMatcher = function matchSlash(domainIndex) { + var pathIndex = domainIndex['/']; + if (!pathIndex) return; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + }; + + } else { + var paths = permutePath(path) || [path]; + pathMatcher = function matchRFC(domainIndex) { + paths.forEach(function(curPath) { + var pathIndex = domainIndex[curPath]; + if (!pathIndex) return; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + }); + }; + } + + var domains = permuteDomain(domain) || [domain]; + var idx = this.idx; + domains.forEach(function(curDomain) { + var domainIndex = idx[curDomain]; + if (!domainIndex) return; + pathMatcher(domainIndex); + }); + + cb(null,results); +}; + +MemoryCookieStore.prototype.putCookie = function putCookie(cookie, cb) { + if (!this.idx[cookie.domain]) this.idx[cookie.domain] = {}; + if (!this.idx[cookie.domain][cookie.path]) this.idx[cookie.domain][cookie.path] = {}; + this.idx[cookie.domain][cookie.path][cookie.key] = cookie; + cb(null); +}; + +MemoryCookieStore.prototype.updateCookie = function updateCookie(oldCookie, newCookie, cb) { + // updateCookie() may avoid updating cookies that are identical. For example, + // lastAccessed may not be important to some stores and an equality + // comparison could exclude that field. + this.putCookie(newCookie,cb); +}; + +MemoryCookieStore.prototype.removeCookie = function removeCookie(domain, path, key, cb) { + if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { + delete this.idx[domain][path][key]; + } + cb(null); +}; + +MemoryCookieStore.prototype.removeCookies = function removeCookies(domain, path, cb) { + if (!this.idx[domain]) { + if (path) { + delete this.idx[domain][path]; + } else { + delete this.idx[domain]; + } + } + return cb(null); +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js new file mode 100644 index 00000000..a7031473 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js @@ -0,0 +1,69 @@ +/**************************************************** + * AUTOMATICALLY GENERATED by generate-pubsuffix.js * + * DO NOT EDIT! * + ****************************************************/ + +module.exports.getPublicSuffix = function getPublicSuffix(domain) { + /* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + if (!domain) return null; + if (domain.match(/^\./)) return null; + + domain = domain.toLowerCase(); + var parts = domain.split('.').reverse(); + + var suffix = ''; + var suffixLen = 0; + for (var i=0; i suffixLen) { + return parts.slice(0,suffixLen+1).reverse().join('.'); + } + + return null; +}; + +// The following generated structure is used under the MPL version 1.1 +// See public-suffix.txt for more information + +var index = module.exports.index = Object.freeze( +{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"*.ar":true,"congresodelalengua3.ar":false,"educ.ar":false,"gobiernoelectronico.ar":false,"mecon.ar":false,"nacion.ar":false,"nic.ar":false,"promocion.ar":false,"retina.ar":false,"uba.ar":false,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"csiro.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"act.gov.au":true,"nt.gov.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"can.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mus.br":true,"net.br":true,"nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"gov.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cx":true,"gov.cx":true,"*.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"*.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"org.gg":true,"net.gg":true,"sch.gg":true,"gov.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"gm":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"*.gt":true,"www.gt":false,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"co.id":true,"go.id":true,"mil.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"*.il":true,"im":true,"co.im":true,"ltd.co.im":true,"plc.co.im":true,"net.im":true,"gov.im":true,"org.im":true,"nic.im":true,"ac.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"agrigento.it":true,"ag.it":true,"alessandria.it":true,"al.it":true,"ancona.it":true,"an.it":true,"aosta.it":true,"aoste.it":true,"ao.it":true,"arezzo.it":true,"ar.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"ap.it":true,"asti.it":true,"at.it":true,"avellino.it":true,"av.it":true,"bari.it":true,"ba.it":true,"andria-barletta-trani.it":true,"andriabarlettatrani.it":true,"trani-barletta-andria.it":true,"tranibarlettaandria.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"andria-trani-barletta.it":true,"andriatranibarletta.it":true,"trani-andria-barletta.it":true,"traniandriabarletta.it":true,"bt.it":true,"belluno.it":true,"bl.it":true,"benevento.it":true,"bn.it":true,"bergamo.it":true,"bg.it":true,"biella.it":true,"bi.it":true,"bologna.it":true,"bo.it":true,"bolzano.it":true,"bozen.it":true,"balsan.it":true,"alto-adige.it":true,"altoadige.it":true,"suedtirol.it":true,"bz.it":true,"brescia.it":true,"bs.it":true,"brindisi.it":true,"br.it":true,"cagliari.it":true,"ca.it":true,"caltanissetta.it":true,"cl.it":true,"campobasso.it":true,"cb.it":true,"carboniaiglesias.it":true,"carbonia-iglesias.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"ci.it":true,"caserta.it":true,"ce.it":true,"catania.it":true,"ct.it":true,"catanzaro.it":true,"cz.it":true,"chieti.it":true,"ch.it":true,"como.it":true,"co.it":true,"cosenza.it":true,"cs.it":true,"cremona.it":true,"cr.it":true,"crotone.it":true,"kr.it":true,"cuneo.it":true,"cn.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"ogliastra.it":true,"og.it":true,"enna.it":true,"en.it":true,"ferrara.it":true,"fe.it":true,"fermo.it":true,"fm.it":true,"firenze.it":true,"florence.it":true,"fi.it":true,"foggia.it":true,"fg.it":true,"forli-cesena.it":true,"forlicesena.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"fc.it":true,"frosinone.it":true,"fr.it":true,"genova.it":true,"genoa.it":true,"ge.it":true,"gorizia.it":true,"go.it":true,"grosseto.it":true,"gr.it":true,"imperia.it":true,"im.it":true,"isernia.it":true,"is.it":true,"laquila.it":true,"aquila.it":true,"aq.it":true,"la-spezia.it":true,"laspezia.it":true,"sp.it":true,"latina.it":true,"lt.it":true,"lecce.it":true,"le.it":true,"lecco.it":true,"lc.it":true,"livorno.it":true,"li.it":true,"lodi.it":true,"lo.it":true,"lucca.it":true,"lu.it":true,"macerata.it":true,"mc.it":true,"mantova.it":true,"mn.it":true,"massa-carrara.it":true,"massacarrara.it":true,"carrara-massa.it":true,"carraramassa.it":true,"ms.it":true,"matera.it":true,"mt.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"vs.it":true,"messina.it":true,"me.it":true,"milano.it":true,"milan.it":true,"mi.it":true,"modena.it":true,"mo.it":true,"monza.it":true,"monza-brianza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"monza-e-della-brianza.it":true,"mb.it":true,"napoli.it":true,"naples.it":true,"na.it":true,"novara.it":true,"no.it":true,"nuoro.it":true,"nu.it":true,"oristano.it":true,"or.it":true,"padova.it":true,"padua.it":true,"pd.it":true,"palermo.it":true,"pa.it":true,"parma.it":true,"pr.it":true,"pavia.it":true,"pv.it":true,"perugia.it":true,"pg.it":true,"pescara.it":true,"pe.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"pu.it":true,"piacenza.it":true,"pc.it":true,"pisa.it":true,"pi.it":true,"pistoia.it":true,"pt.it":true,"pordenone.it":true,"pn.it":true,"potenza.it":true,"pz.it":true,"prato.it":true,"po.it":true,"ragusa.it":true,"rg.it":true,"ravenna.it":true,"ra.it":true,"reggio-calabria.it":true,"reggiocalabria.it":true,"rc.it":true,"reggio-emilia.it":true,"reggioemilia.it":true,"re.it":true,"rieti.it":true,"ri.it":true,"rimini.it":true,"rn.it":true,"roma.it":true,"rome.it":true,"rm.it":true,"rovigo.it":true,"ro.it":true,"salerno.it":true,"sa.it":true,"sassari.it":true,"ss.it":true,"savona.it":true,"sv.it":true,"siena.it":true,"si.it":true,"siracusa.it":true,"sr.it":true,"sondrio.it":true,"so.it":true,"taranto.it":true,"ta.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"ot.it":true,"teramo.it":true,"te.it":true,"terni.it":true,"tr.it":true,"torino.it":true,"turin.it":true,"to.it":true,"trapani.it":true,"tp.it":true,"trento.it":true,"trentino.it":true,"tn.it":true,"treviso.it":true,"tv.it":true,"trieste.it":true,"ts.it":true,"udine.it":true,"ud.it":true,"varese.it":true,"va.it":true,"venezia.it":true,"venice.it":true,"ve.it":true,"verbania.it":true,"vb.it":true,"vercelli.it":true,"vc.it":true,"verona.it":true,"vr.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vv.it":true,"vicenza.it":true,"vi.it":true,"viterbo.it":true,"vt.it":true,"je":true,"co.je":true,"org.je":true,"net.je":true,"sch.je":true,"gov.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"*.aichi.jp":true,"*.akita.jp":true,"*.aomori.jp":true,"*.chiba.jp":true,"*.ehime.jp":true,"*.fukui.jp":true,"*.fukuoka.jp":true,"*.fukushima.jp":true,"*.gifu.jp":true,"*.gunma.jp":true,"*.hiroshima.jp":true,"*.hokkaido.jp":true,"*.hyogo.jp":true,"*.ibaraki.jp":true,"*.ishikawa.jp":true,"*.iwate.jp":true,"*.kagawa.jp":true,"*.kagoshima.jp":true,"*.kanagawa.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.kochi.jp":true,"*.kumamoto.jp":true,"*.kyoto.jp":true,"*.mie.jp":true,"*.miyagi.jp":true,"*.miyazaki.jp":true,"*.nagano.jp":true,"*.nagasaki.jp":true,"*.nagoya.jp":true,"*.nara.jp":true,"*.niigata.jp":true,"*.oita.jp":true,"*.okayama.jp":true,"*.okinawa.jp":true,"*.osaka.jp":true,"*.saga.jp":true,"*.saitama.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.shiga.jp":true,"*.shimane.jp":true,"*.shizuoka.jp":true,"*.tochigi.jp":true,"*.tokushima.jp":true,"*.tokyo.jp":true,"*.tottori.jp":true,"*.toyama.jp":true,"*.wakayama.jp":true,"*.yamagata.jp":true,"*.yamaguchi.jp":true,"*.yamanashi.jp":true,"*.yokohama.jp":true,"metro.tokyo.jp":false,"pref.aichi.jp":false,"pref.akita.jp":false,"pref.aomori.jp":false,"pref.chiba.jp":false,"pref.ehime.jp":false,"pref.fukui.jp":false,"pref.fukuoka.jp":false,"pref.fukushima.jp":false,"pref.gifu.jp":false,"pref.gunma.jp":false,"pref.hiroshima.jp":false,"pref.hokkaido.jp":false,"pref.hyogo.jp":false,"pref.ibaraki.jp":false,"pref.ishikawa.jp":false,"pref.iwate.jp":false,"pref.kagawa.jp":false,"pref.kagoshima.jp":false,"pref.kanagawa.jp":false,"pref.kochi.jp":false,"pref.kumamoto.jp":false,"pref.kyoto.jp":false,"pref.mie.jp":false,"pref.miyagi.jp":false,"pref.miyazaki.jp":false,"pref.nagano.jp":false,"pref.nagasaki.jp":false,"pref.nara.jp":false,"pref.niigata.jp":false,"pref.oita.jp":false,"pref.okayama.jp":false,"pref.okinawa.jp":false,"pref.osaka.jp":false,"pref.saga.jp":false,"pref.saitama.jp":false,"pref.shiga.jp":false,"pref.shimane.jp":false,"pref.shizuoka.jp":false,"pref.tochigi.jp":false,"pref.tokushima.jp":false,"pref.tottori.jp":false,"pref.toyama.jp":false,"pref.wakayama.jp":false,"pref.yamagata.jp":false,"pref.yamaguchi.jp":false,"pref.yamanashi.jp":false,"city.chiba.jp":false,"city.fukuoka.jp":false,"city.hiroshima.jp":false,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.kyoto.jp":false,"city.nagoya.jp":false,"city.niigata.jp":false,"city.okayama.jp":false,"city.osaka.jp":false,"city.saitama.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.shizuoka.jp":false,"city.yokohama.jp":false,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"*.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ac.ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"net.ng":true,"org.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"*.nz":true,"*.om":true,"mediaphone.om":false,"nawrastelecom.om":false,"nawras.om":false,"omanmobile.om":false,"omanpost.om":false,"omantel.om":false,"rakpetroleum.om":false,"siemens.om":false,"songfest.om":false,"statecouncil.om":false,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"com.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"net.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"org.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"6bone.pl":true,"art.pl":true,"mbone.pl":true,"gov.pl":true,"uw.gov.pl":true,"um.gov.pl":true,"ug.gov.pl":true,"upow.gov.pl":true,"starostwo.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"po.gov.pl":true,"pa.gov.pl":true,"ngo.pl":true,"irc.pl":true,"usenet.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"siedlce.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"*.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"mosreg.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"pskov.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"sshn.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"si":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"*.sv":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"*.tr":true,"nic.tr":false,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"ac.tz":true,"co.tz":true,"go.tz":true,"mil.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"chernigov.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"ks.ua":true,"kv.ua":true,"lg.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lviv.ua":true,"mk.ua":true,"nikolaev.ua":true,"od.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rovno.ua":true,"rv.ua":true,"sebastopol.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vn.ua":true,"zaporizhzhe.ua":true,"zp.ua":true,"zhitomir.ua":true,"zt.ua":true,"co.ua":true,"pp.ua":true,"ug":true,"co.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"or.ug":true,"*.uk":true,"*.sch.uk":true,"bl.uk":false,"british-library.uk":false,"icnet.uk":false,"jet.uk":false,"mod.uk":false,"nel.uk":false,"nhs.uk":false,"nic.uk":false,"nls.uk":false,"national-library-scotland.uk":false,"parliament.uk":false,"police.uk":false,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.nd.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.sd.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wv.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wv.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"*.uy":true,"uz":true,"com.uz":true,"co.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"*.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--54b7fta0cc":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--mgb9awbf":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"*.za":true,"*.zm":true,"*.zw":true,"biz.at":true,"info.at":true,"priv.at":true,"co.ca":true,"ar.com":true,"br.com":true,"cn.com":true,"de.com":true,"eu.com":true,"gb.com":true,"gr.com":true,"hu.com":true,"jpn.com":true,"kr.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"uk.com":true,"us.com":true,"uy.com":true,"za.com":true,"gb.net":true,"jp.net":true,"se.net":true,"uk.net":true,"ae.org":true,"us.org":true,"com.de":true,"operaunite.com":true,"appspot.com":true,"iki.fi":true,"c.la":true,"za.net":true,"za.org":true,"co.nl":true,"co.no":true,"co.pl":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true}); + +// END of automatically generated file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt new file mode 100644 index 00000000..11dddd00 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt @@ -0,0 +1,278 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt new file mode 100644 index 00000000..97067e54 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json new file mode 100644 index 00000000..69e12ae2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json @@ -0,0 +1,77 @@ +{ + "name": "punycode", + "version": "1.2.3", + "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", + "homepage": "http://mths.be/punycode", + "main": "punycode.js", + "keywords": [ + "punycode", + "unicode", + "idn", + "idna", + "dns", + "url", + "domain" + ], + "licenses": [ + { + "type": "MIT", + "url": "http://mths.be/mit" + }, + { + "type": "GPL", + "url": "http://mths.be/gpl" + } + ], + "author": { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "http://mathiasbynens.be/" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "http://mathiasbynens.be/" + }, + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + } + ], + "bugs": { + "url": "https://github.com/bestiejs/punycode.js/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/bestiejs/punycode.js.git" + }, + "engines": [ + "node", + "rhino" + ], + "directories": { + "doc": "docs", + "test": "tests" + }, + "scripts": { + "test": "node tests/tests.js" + }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-uglify": "~0.2.2", + "grunt-shell": "~0.2.2", + "istanbul": "~0.1.37", + "qunit-clib": "~1.3.0", + "qunitjs": "~1.11.0", + "requirejs": "~2.1.6" + }, + "readme": "ERROR: No README data found!", + "_id": "punycode@1.2.3", + "dist": { + "shasum": "b4e304471082d783c73b3bafabf2fd9b6a486266" + }, + "_from": "punycode@>=0.2.0", + "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js new file mode 100644 index 00000000..41803ba4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js @@ -0,0 +1,508 @@ +/*! http://mths.be/punycode v1.2.3 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports; + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + while (length--) { + array[length] = fn(array[length]); + } + return array; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings. + * @private + * @param {String} domain The domain name. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + return map(string.split(regexSeparators), fn).join('.'); + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * http://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + length, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols to a Punycode string of ASCII-only + * symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name to Unicode. Only the + * Punycoded parts of the domain name will be converted, i.e. it doesn't + * matter if you call it on a string that has already been converted to + * Unicode. + * @memberOf punycode + * @param {String} domain The Punycode domain name to convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(domain) { + return mapDomain(domain, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name to Punycode. Only the + * non-ASCII parts of the domain name will be converted, i.e. it doesn't + * matter if you call it with a domain that's already in ASCII. + * @memberOf punycode + * @param {String} domain The domain name to convert, as a Unicode string. + * @returns {String} The Punycode representation of the given domain name. + */ + function toASCII(domain) { + return mapDomain(domain, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.2.3', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return punycode; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js new file mode 100644 index 00000000..ac5d914a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js @@ -0,0 +1,2 @@ +/*! http://mths.be/punycode v1.2.3 by @mathias */ +(function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(55296|1023&o>>>10),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*y>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?C:s>=m+y?y:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?C:p>=l+y?y:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,C=1,y=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-C,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.3",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g})(this); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt new file mode 100644 index 00000000..a7501f98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright 2011-2013 John-David Dalton + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md new file mode 100644 index 00000000..fbddce91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md @@ -0,0 +1,35 @@ +# Docdown v1.0.0 + +A simple JSDoc to Markdown documentation generator. + +## Documentation + +The documentation for Docdown can be viewed here: [/doc/README.md](https://github.com/jdalton/docdown/blob/master/doc/README.md#readme) + +For a list of upcoming features, check out our [roadmap](https://github.com/jdalton/docdown/wiki/Roadmap). + +## Installation and usage + +Usage example: + +```php +require("docdown.php"); + +// generate Markdown +$markdown = docdown(array( + "path" => $filepath, + "url" => "https://github.com/username/project/blob/master/my.js" +)); +``` + +## Author + +| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | +|---| +| [John-David Dalton](http://allyoucanleet.com/) | + +## Contributors + +| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md new file mode 100644 index 00000000..459d36ab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md @@ -0,0 +1,69 @@ +# Docdown v1.0.0 + + + + + + +## `docdown` +* [`docdown`](#docdown$optionsarray) + + + + + + + + + + + + +## `docdown` + + + +### `docdown([$options=array()])` +# [Ⓢ](https://github.com/jdalton/docdown/blob/master/docdown.php#L34 "View in source") [Ⓣ][1] + +Generates Markdown from JSDoc entries in a given file. + +#### Arguments +1. `[$options=array()]` *(Array)*: The options array. + +#### Returns +*(String)*: The generated Markdown. + +#### Example +```php +// specify a file path +$markdown = docdown(array( + // path to js file + 'path' => $filepath, + // url used to reference line numbers in code + 'url' => 'https://github.com/username/project/blob/master/my.js' +)); + +// or pass raw js +$markdown = docdown(array( + // raw JavaScript source + 'source' => $rawJS, + // documentation title + 'title' => 'My API Documentation', + // url used to reference line numbers in code + 'url' => 'https://github.com/username/project/blob/master/my.js' +)); +``` + +* * * + + + + + + + + + + + [1]: #docdown "Jump back to the TOC." \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php new file mode 100644 index 00000000..eca8d145 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php @@ -0,0 +1,35 @@ + '../' . $file, + 'title' => 'Docdown v1.0.0', + 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php' + )); + + // save to a .md file + file_put_contents($output . '.md', $markdown); + + // print + header('Content-Type: text/plain;charset=utf-8'); + echo $markdown . PHP_EOL; + +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php new file mode 100644 index 00000000..4a786d75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php @@ -0,0 +1,38 @@ + + * Available under MIT license + */ +require(dirname(__FILE__) . '/src/DocDown/Generator.php'); + +/** + * Generates Markdown from JSDoc entries in a given file. + * + * @param {Array} [$options=array()] The options array. + * @returns {String} The generated Markdown. + * @example + * + * // specify a file path + * $markdown = docdown(array( + * // path to js file + * 'path' => $filepath, + * // url used to reference line numbers in code + * 'url' => 'https://github.com/username/project/blob/master/my.js' + * )); + * + * // or pass raw js + * $markdown = docdown(array( + * // raw JavaScript source + * 'source' => $rawJS, + * // documentation title + * 'title' => 'My API Documentation', + * // url used to reference line numbers in code + * 'url' => 'https://github.com/username/project/blob/master/my.js' + * )); + */ +function docdown( $options = array() ) { + $gen = new Generator($options); + return $gen->generate(); +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php new file mode 100644 index 00000000..0a7c552e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php @@ -0,0 +1,226 @@ +owner = $owner; + $this->_name = $name; + $this->_call = $owner->getCall(); + $this->_category = $owner->getCategory(); + $this->_desc = $owner->getDesc(); + $this->_example = $owner->getExample(); + $this->_isCtor = $owner->isCtor(); + $this->_isLicense = $owner->isLicense(); + $this->_isPlugin = $owner->isPlugin(); + $this->_isPrivate = $owner->isPrivate(); + $this->_isStatic = $owner->isStatic(); + $this->_lineNumber = $owner->getLineNumber(); + $this->_members = $owner->getMembers(); + $this->_params = $owner->getParams(); + $this->_returns = $owner->getReturns(); + $this->_type = $owner->getType(); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the entry's `alias` objects. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `alias` objects. + */ + public function getAliases( $index = null ) { + $result = array(); + return $index !== null + ? @$result[$index] + : $result; + } + + /** + * Extracts the function call from the owner entry. + * + * @memberOf Alias + * @returns {String} The function call. + */ + public function getCall() { + return $this->_call; + } + + /** + * Extracts the owner entry's `category` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `category` data. + */ + public function getCategory() { + return $this->_category; + } + + /** + * Extracts the owner entry's description. + * + * @memberOf Alias + * @returns {String} The owner entry's description. + */ + public function getDesc() { + return $this->_desc; + } + + /** + * Extracts the owner entry's `example` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `example` data. + */ + public function getExample() { + return $this->_example; + } + + /** + * Checks if the entry is an alias. + * + * @memberOf Alias + * @returns {Boolean} Returns `true`. + */ + public function isAlias() { + return true; + } + + /** + * Checks if the owner entry is a constructor. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if a constructor, else `false`. + */ + public function isCtor() { + return $this->_isCtor; + } + + /** + * Checks if the owner entry is a license. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if a license, else `false`. + */ + public function isLicense() { + return $this->_isLicense; + } + + /** + * Checks if the owner entry *is* assigned to a prototype. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. + */ + public function isPlugin() { + return $this->_isPlugin; + } + + /** + * Checks if the owner entry is private. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if private, else `false`. + */ + public function isPrivate() { + return $this->_isPrivate; + } + + /** + * Checks if the owner entry is *not* assigned to a prototype. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. + */ + public function isStatic() { + return $this->_isStatic; + } + + /** + * Resolves the owner entry's line number. + * + * @memberOf Alias + * @returns {Number} The owner entry's line number. + */ + public function getLineNumber() { + return $this->_lineNumber; + } + + /** + * Extracts the owner entry's `member` data. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The owner entry's `member` data. + */ + public function getMembers( $index = null ) { + return $index !== null + ? @$this->_members[$index] + : $this->_members; + } + + /** + * Extracts the owner entry's `name` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `name` data. + */ + public function getName() { + return $this->_name; + } + + /** + * Extracts the owner entry's `param` data. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array} The owner entry's `param` data. + */ + public function getParams( $index = null ) { + return $index !== null + ? @$this->_params[$index] + : $this->_params; + } + + /** + * Extracts the owner entry's `returns` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `returns` data. + */ + public function getReturns() { + return $this->_returns; + } + + /** + * Extracts the owner entry's `type` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `type` data. + */ + public function getType() { + return $this->_type; + } +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php new file mode 100644 index 00000000..a973d9a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php @@ -0,0 +1,442 @@ +entry = $entry; + $this->lang = $lang; + $this->source = str_replace(PHP_EOL, "\n", $source); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the documentation entries from source code. + * + * @static + * @memberOf Entry + * @param {String} $source The source code. + * @returns {Array} The array of entries. + */ + public static function getEntries( $source ) { + preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result); + return array_pop($result); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if the entry is a function reference. + * + * @private + * @memberOf Entry + * @returns {Boolean} Returns `true` if the entry is a function reference, else `false`. + */ + private function isFunction() { + if (!isset($this->_isFunction)) { + $this->_isFunction = !!( + $this->isCtor() || + count($this->getParams()) || + count($this->getReturns()) || + preg_match('/\*[\t ]*@function\b/', $this->entry) + ); + } + return $this->_isFunction; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the entry's `alias` objects. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `alias` objects. + */ + public function getAliases( $index = null ) { + if (!isset($this->_aliases)) { + preg_match('#\*[\t ]*@alias\s+(.+)#', $this->entry, $result); + + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + $result = preg_split('/,\s*/', $result); + natsort($result); + + foreach ($result as $resultIndex => $value) { + $result[$resultIndex] = new Alias($value, $this); + } + } + $this->_aliases = $result; + } + return $index !== null + ? @$this->_aliases[$index] + : $this->_aliases; + } + + /** + * Extracts the function call from the entry. + * + * @memberOf Entry + * @returns {String} The function call. + */ + public function getCall() { + if (isset($this->_call)) { + return $this->_call; + } + + preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result); + if ($result = array_pop($result)) { + $result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'"))); + } + // resolve name + // avoid $this->getName() because it calls $this->getCall() + preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $name); + if (count($name)) { + $name = trim($name[1]); + } else { + $name = $result; + } + // compile function call syntax + if ($this->isFunction()) { + // compose parts + $result = array($result); + $params = $this->getParams(); + foreach ($params as $param) { + $result[] = $param[1]; + } + // format + $result = $name .'('. implode(array_slice($result, 1), ', ') .')'; + $result = str_replace(', [', ' [, ', str_replace('], [', ', ', $result)); + } + + $this->_call = $result ? $result : $name; + return $this->_call; + } + + /** + * Extracts the entry's `category` data. + * + * @memberOf Entry + * @returns {String} The entry's `category` data. + */ + public function getCategory() { + if (isset($this->_category)) { + return $this->_category; + } + + preg_match('#\*[\t ]*@category\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = $this->getType() == 'Function' ? 'Methods' : 'Properties'; + } + $this->_category = $result; + return $result; + } + + /** + * Extracts the entry's description. + * + * @memberOf Entry + * @returns {String} The entry's description. + */ + public function getDesc() { + if (isset($this->_desc)) { + return $this->_desc; + } + + preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $type = $this->getType(); + $result = preg_replace('/:\n[\t ]*\*[\t ]*/', ":
\n", $result[1]); + $result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result); + $result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result); + $result = trim($result); + $result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; + } + $this->_desc = $result; + return $result; + } + + /** + * Extracts the entry's `example` data. + * + * @memberOf Entry + * @returns {String} The entry's `example` data. + */ + public function getExample() { + if (isset($this->_example)) { + return $this->_example; + } + + preg_match('#\*[\t ]*@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', "\n", $result[1])); + $result = '```' . $this->lang . "\n" . $result . "\n```"; + } + $this->_example = $result; + return $result; + } + + /** + * Checks if the entry is an alias. + * + * @memberOf Entry + * @returns {Boolean} Returns `false`. + */ + public function isAlias() { + return false; + } + + /** + * Checks if the entry is a constructor. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if a constructor, else `false`. + */ + public function isCtor() { + if (!isset($this->_isCtor)) { + $this->_isCtor = !!preg_match('/\*[\t ]*@constructor\b/', $this->entry); + } + return $this->_isCtor; + } + + /** + * Checks if the entry is a license. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if a license, else `false`. + */ + public function isLicense() { + if (!isset($this->_isLicense)) { + $this->_isLicense = !!preg_match('/\*[\t ]*@license\b/', $this->entry); + } + return $this->_isLicense; + } + + /** + * Checks if the entry *is* assigned to a prototype. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. + */ + public function isPlugin() { + if (!isset($this->_isPlugin)) { + $this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic(); + } + return $this->_isPlugin; + } + + /** + * Checks if the entry is private. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if private, else `false`. + */ + public function isPrivate() { + if (!isset($this->_isPrivate)) { + $this->_isPrivate = $this->isLicense() || !!preg_match('/\*[\t ]*@private\b/', $this->entry) || !preg_match('/\*[\t ]*@[a-z]+\b/', $this->entry); + } + return $this->_isPrivate; + } + + /** + * Checks if the entry is *not* assigned to a prototype. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. + */ + public function isStatic() { + if (isset($this->_isStatic)) { + return $this->_isStatic; + } + + $public = !$this->isPrivate(); + $result = $public && !!preg_match('/\*[\t ]*@static\b/', $this->entry); + + // set in cases where it isn't explicitly stated + if ($public && !$result) { + if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) { + foreach (Entry::getEntries($this->source) as $entry) { + $entry = new Entry($entry, $this->source); + if ($entry->getName() == $parent) { + $result = !$entry->isCtor(); + break; + } + } + } else { + $result = true; + } + } + $this->_isStatic = $result; + return $result; + } + + /** + * Resolves the entry's line number. + * + * @memberOf Entry + * @returns {Number} The entry's line number. + */ + public function getLineNumber() { + if (!isset($this->_lineNumber)) { + preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines); + $this->_lineNumber = count(array_pop($lines)) + 1; + } + return $this->_lineNumber; + } + + /** + * Extracts the entry's `member` data. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `member` data. + */ + public function getMembers( $index = null ) { + if (!isset($this->_members)) { + preg_match('#\*[\t ]*@member(?:Of)?\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + $result = preg_split('/,\s*/', $result); + natsort($result); + } + $this->_members = $result; + } + return $index !== null + ? @$this->_members[$index] + : $this->_members; + } + + /** + * Extracts the entry's `name` data. + * + * @memberOf Entry + * @returns {String} The entry's `name` data. + */ + public function getName() { + if (isset($this->_name)) { + return $this->_name; + } + + preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = array_shift(explode('(', $this->getCall())); + } + $this->_name = $result; + return $result; + } + + /** + * Extracts the entry's `param` data. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array} The entry's `param` data. + */ + public function getParams( $index = null ) { + if (!isset($this->_params)) { + preg_match_all('#\*[\t ]*@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result); + if (count($result = array_filter(array_slice($result, 1)))) { + // repurpose array + foreach ($result as $param) { + foreach ($param as $key => $value) { + if (!is_array($result[0][$key])) { + $result[0][$key] = array(); + } + $result[0][$key][] = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]*/', ' ', $value)); + } + } + $result = $result[0]; + } + $this->_params = $result; + } + return $index !== null + ? @$this->_params[$index] + : $this->_params; + } + + /** + * Extracts the entry's `returns` data. + * + * @memberOf Entry + * @returns {String} The entry's `returns` data. + */ + public function getReturns() { + if (isset($this->_returns)) { + return $this->_returns; + } + + preg_match('#\*[\t ]*@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $result = array_map('trim', array_slice($result, 1)); + $result[0] = str_replace('|', ', ', $result[0]); + $result[1] = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]); + } + $this->_returns = $result; + return $result; + } + + /** + * Extracts the entry's `type` data. + * + * @memberOf Entry + * @returns {String} The entry's `type` data. + */ + public function getType() { + if (isset($this->_type)) { + return $this->_type; + } + + preg_match('#\*[\t ]*@type\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = $this->isFunction() ? 'Function' : 'Unknown'; + } + $this->_type = $result; + return $result; + } +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php new file mode 100644 index 00000000..5dc2583f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php @@ -0,0 +1,563 @@ +\n"; + + /** + * An array of JSDoc entries. + * + * @memberOf Generator + * @type Array + */ + public $entries = array(); + + /** + * The HTML for the open tag. + * + * @static + * @memberOf Generator + * @type String + */ + public $openTag = "\n\n"; + + /** + * An options array used to configure the generator. + * + * @memberOf Generator + * @type Array + */ + public $options = array(); + + /** + * The file's source code. + * + * @memberOf Generator + * @type String + */ + public $source = ''; + + /*--------------------------------------------------------------------------*/ + + /** + * The Generator constructor. + * + * @constructor + * @param {String} $source The source code to parse. + * @param {Array} $options The options array. + */ + public function __construct( $source, $options = array() ) { + // juggle arguments + if (is_array($source)) { + $options = $source; + } else { + $options['source'] = $source; + } + if (isset($options['source']) && realpath($options['source'])) { + $options['path'] = $options['source']; + } + if (isset($options['path'])) { + preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext); + $options['source'] = file_get_contents($options['path']); + $ext = array_pop($ext); + + if (!isset($options['lang']) && $ext) { + $options['lang'] = $ext; + } + if (!isset($options['title'])) { + $options['title'] = ucfirst(basename($options['path'])) . ' API documentation'; + } + } + if (!isset($options['lang'])) { + $options['lang'] = 'js'; + } + if (!isset($options['toc'])) { + $options['toc'] = 'properties'; + } + + $this->options = $options; + $this->source = str_replace(PHP_EOL, "\n", $options['source']); + $this->entries = Entry::getEntries($this->source); + + foreach ($this->entries as $index => $value) { + $this->entries[$index] = new Entry($value, $this->source, $options['lang']); + } + } + + /*--------------------------------------------------------------------------*/ + + /** + * Performs common string formatting operations. + * + * @private + * @static + * @memberOf Generator + * @param {String} $string The string to format. + * @returns {String} The formatted string. + */ + private static function format( $string ) { + $counter = 0; + + // tokenize inline code snippets + preg_match_all('/`[^`]+`/', $string, $tokenized); + $tokenized = $tokenized[0]; + foreach ($tokenized as $snippet) { + $string = str_replace($snippet, '__token' . ($counter++) .'__', $string); + } + + // italicize parentheses + $string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string); + + // mark numbers as inline code + $string = preg_replace('/[\t ](-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string); + + // detokenize inline code snippets + $counter = 0; + foreach ($tokenized as $snippet) { + $string = str_replace('__token' . ($counter++) . '__', $snippet, $string); + } + + return trim($string); + } + + /** + * Modify a string by replacing named tokens with matching assoc. array values. + * + * @private + * @static + * @memberOf Generator + * @param {String} $string The string to modify. + * @param {Array|Object} $object The template object. + * @returns {String} The modified string. + */ + private static function interpolate( $string, $object ) { + preg_match_all('/#\{([^}]+)\}/', $string, $tokens); + $tokens = array_unique(array_pop($tokens)); + + foreach ($tokens as $token) { + $pattern = '/#\{' . $token . '\}/'; + $replacement = ''; + + if (is_object($object)) { + preg_match('/\(([^)]+?)\)$/', $token, $args); + $args = preg_split('/,\s*/', array_pop($args)); + $method = 'get' . ucfirst(str_replace('/\([^)]+?\)$/', '', $token)); + + if (method_exists($object, $method)) { + $replacement = (string) call_user_func_array(array($object, $method), $args); + } else if (isset($object->{$token})) { + $replacement = (string) $object->{$token}; + } + } else if (isset($object[$token])) { + $replacement = (string) $object[$token]; + } + $string = preg_replace($pattern, trim($replacement), $string); + } + return Generator::format($string); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Adds the given `$entries` to the `$result` array. + * + * @private + * @memberOf Generator + * @param {Array} $result The result array to modify. + * @param {Array} $entries The entries to add to the `$result`. + */ + private function addEntries( &$result, $entries ) { + foreach ($entries as $entry) { + // skip aliases + if ($entry->isAlias()) { + continue; + } + // name and description + array_push( + $result, + $this->openTag, + Generator::interpolate("### `#{member}#{separator}#{call}`\n# [Ⓢ](#{href} \"View in source\") [Ⓣ][1]\n\n#{desc}", $entry) + ); + + // @alias + if (count($aliases = $entry->getAliases())) { + array_push($result, '', '#### Aliases'); + foreach ($aliases as $index => $alias) { + $aliases[$index] = $alias->getName(); + } + $result[] = '*' . implode(', ', $aliases) . '*'; + } + // @param + if (count($params = $entry->getParams())) { + array_push($result, '', '#### Arguments'); + foreach ($params as $index => $param) { + $result[] = Generator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array( + 'desc' => $param[2], + 'name' => $param[1], + 'num' => $index + 1, + 'type' => $param[0] + )); + } + } + // @returns + if (count($returns = $entry->getReturns())) { + array_push( + $result, '', + '#### Returns', + Generator::interpolate('(#{type}): #{desc}', array('desc' => $returns[1], 'type' => $returns[0])) + ); + } + // @example + if ($example = $entry->getExample()) { + array_push($result, '', '#### Example', $example); + } + array_push($result, "\n* * *", $this->closeTag); + } + } + + /** + * Resolves the entry's hash used to navigate the documentation. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @param {String} $member The name of the member. + * @returns {String} The url hash. + */ + private function getHash( $entry, $member = '' ) { + $entry = is_numeric($entry) ? $this->entries[$entry] : $entry; + $member = !$member ? $entry->getMembers(0) : $member; + $result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall(); + $result = preg_replace('/\(\[|\[\]/', '', $result); + $result = preg_replace('/[ =|\'"{}.()\]]/', '', $result); + $result = preg_replace('/[[#,]/', '-', $result); + return strtolower($result); + } + + /** + * Resolves the entry's url for the specific line number. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @returns {String} The url. + */ + private function getLineUrl( $entry ) { + $entry = is_numeric($entry) ? $this->entries($entry) : $entry; + return $this->options['url'] . '#L' . $entry->getLineNumber(); + } + + /** + * Extracts the character used to separate the entry's name from its member. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @returns {String} The separator. + */ + private function getSeparator( $entry ) { + $entry = is_numeric($entry) ? $this->entries($entry) : $entry; + return $entry->isPlugin() ? '.prototype.' : '.'; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Generates Markdown from JSDoc entries. + * + * @memberOf Generator + * @returns {String} The rendered Markdown. + */ + public function generate() { + $api = array(); + $byCategory = $this->options['toc'] == 'categories'; + $categories = array(); + $closeTag = $this->closeTag; + $compiling = false; + $openTag = $this->openTag; + $result = array('# ' . $this->options['title']); + $toc = 'toc'; + + // initialize $api array + foreach ($this->entries as $entry) { + // skip invalid or private entries + $name = $entry->getName(); + if (!$name || $entry->isPrivate()) { + continue; + } + + $members = $entry->getMembers(); + $members = count($members) ? $members : array(''); + + foreach ($members as $member) { + // create api category arrays + if ($member && !isset($api[$member])) { + // create temporary entry to be replaced later + $api[$member] = new stdClass; + $api[$member]->static = array(); + $api[$member]->plugin = array(); + } + + // append entry to api member + if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' && + !preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) { + + // assign the real entry, replacing the temporary entry if it exist + $member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name; + $entry->static = @$api[$member] ? $api[$member]->static : array(); + $entry->plugin = @$api[$member] ? $api[$member]->plugin : array(); + + $api[$member] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->static[] = $alias; + } + } + else if ($entry->isStatic()) { + $api[$member]->static[] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->static[] = $alias; + } + } + else if (!$entry->isCtor()) { + $api[$member]->plugin[] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->plugin[] = $alias; + } + } + } + } + + // add properties to each entry + foreach ($api as $entry) { + $entry->hash = $this->getHash($entry); + $entry->href = $this->getLineUrl($entry); + + $member = $entry->getMembers(0); + $member = ($member ? $member . ($entry->isPlugin() ? '.prototype.' : '.') : '') . $entry->getName(); + $entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member); + + // add properties to static and plugin sub-entries + foreach (array('static', 'plugin') as $kind) { + foreach ($entry->{$kind} as $subentry) { + $subentry->hash = $this->getHash($subentry); + $subentry->href = $this->getLineUrl($subentry); + $subentry->member = $member; + $subentry->separator = $this->getSeparator($subentry); + } + } + } + + /*------------------------------------------------------------------------*/ + + // custom sort for root level entries + // TODO: see how well it handles deeper namespace traversal + function sortCompare($a, $b) { + $score = array( 'a' => 0, 'b' => 0); + foreach (array( 'a' => $a, 'b' => $b) as $key => $value) { + // capitalized properties are last + if (preg_match('/[#.][A-Z]/', $value)) { + $score[$key] = 0; + } + // lowercase prototype properties are next to last + else if (preg_match('/#[a-z]/', $value)) { + $score[$key] = 1; + } + // lowercase static properties next to first + else if (preg_match('/\.[a-z]/', $value)) { + $score[$key] = 2; + } + // root properties are first + else if (preg_match('/^[^#.]+$/', $value)) { + $score[$key] = 3; + } + } + $score = $score['b'] - $score['a']; + return $score ? $score : strcasecmp($a, $b); + } + + uksort($api, 'sortCompare'); + + // sort static and plugin sub-entries + foreach ($api as $entry) { + foreach (array('static', 'plugin') as $kind) { + $sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() ); + foreach ($entry->{$kind} as $subentry) { + $name = $subentry->getName(); + // functions w/o ALL-CAPs names are last + $sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name); + // ALL-CAPs properties first + $sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name); + // lowercase alphanumeric sort + $sortBy['c'][] = strtolower($name); + } + array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind}); + } + } + + /*------------------------------------------------------------------------*/ + + // add categories + foreach ($api as $entry) { + $categories[$entry->getCategory()][] = $entry; + foreach (array('static', 'plugin') as $kind) { + foreach ($entry->{$kind} as $subentry) { + $categories[$subentry->getCategory()][] = $subentry; + } + } + } + + // sort categories + ksort($categories); + + foreach(array('Methods', 'Properties') as $category) { + if (isset($categories[$category])) { + $entries = $categories[$category]; + unset($categories[$category]); + $categories[$category] = $entries; + } + } + + /*------------------------------------------------------------------------*/ + + // compile TOC + $result[] = $openTag; + + // compile TOC by categories + if ($byCategory) { + foreach ($categories as $category => $entries) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + // assign TOC hash + if (count($result) == 2) { + $toc = $category; + } + // add category + array_push( + $result, + $openTag, '## ' . (count($result) == 2 ? '' : '') . '`' . $category . '`' + ); + // add entries + foreach ($entries as $entry) { + $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry); + } + } + } + // compile TOC by namespace + else { + foreach ($api as $entry) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + $member = $entry->member . $entry->getName(); + + // assign TOC hash + if (count($result) == 2) { + $toc = $member; + } + // add root entry + array_push( + $result, + $openTag, '## ' . (count($result) == 2 ? '' : '') . '`' . $member . '`', + Generator::interpolate('* [`' . $member . '`](##{hash})', $entry) + ); + + // add static and plugin sub-entries + foreach (array('static', 'plugin') as $kind) { + if ($kind == 'plugin' && count($entry->plugin)) { + array_push( + $result, + $closeTag, + $openTag, + '## `' . $member . ($entry->isCtor() ? '.prototype`' : '`') + ); + } + foreach ($entry->{$kind} as $subentry) { + $subentry->member = $member; + $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry); + } + } + } + } + + array_push($result, $closeTag, $closeTag); + + /*------------------------------------------------------------------------*/ + + // compile content + $compiling = false; + $result[] = $openTag; + + if ($byCategory) { + foreach ($categories as $category => $entries) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + if ($category != 'Methods' && $category != 'Properties') { + $category = '“' . $category . '” Methods'; + } + array_push($result, $openTag, '## `' . $category . '`'); + $this->addEntries($result, $entries); + } + } + else { + foreach ($api as $entry) { + // skip aliases + if ($entry->isAlias()) { + continue; + } + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + // add root entry name + $member = $entry->member . $entry->getName(); + array_push($result, $openTag, '## `' . $member . '`'); + + foreach (array($entry, 'static', 'plugin') as $kind) { + $subentries = is_string($kind) ? $entry->{$kind} : array($kind); + + // add sub-entry name + if ($kind != 'static' && $entry->getType() != 'Object' && + count($subentries) && $subentries[0] != $kind) { + if ($kind == 'plugin') { + $result[] = $closeTag; + } + array_push( + $result, + $openTag, + '## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`') + ); + } + $this->addEntries($result, $subentries); + } + } + } + + // close tags add TOC link reference + array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."'); + + // cleanup whitespace + return trim(preg_replace('/[\t ]+\n/', "\n", join($result, "\n"))); + } +} +?> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json new file mode 100644 index 00000000..167c7c6a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json @@ -0,0 +1,50 @@ +{ + "author": { + "name": "Jeremy Stashewsky", + "email": "jeremy@goinstant.com", + "url": "https://github.com/stash" + }, + "name": "tough-cookie", + "description": "RFC6265 Cookies and Cookie Jar for node.js", + "keywords": [ + "HTTP", + "cookie", + "cookies", + "set-cookie", + "cookiejar", + "jar", + "RFC6265", + "RFC2965" + ], + "version": "0.9.15", + "homepage": "https://github.com/goinstant/node-cookie", + "repository": { + "type": "git", + "url": "git://github.com/goinstant/node-cookie.git" + }, + "bugs": { + "url": "https://github.com/goinstant/node-cookie/issues" + }, + "main": "./lib/cookie", + "scripts": { + "test": "vows test.js" + }, + "engines": { + "node": ">=0.4.12" + }, + "dependencies": { + "punycode": ">=0.2.0" + }, + "devDependencies": { + "vows": ">=0.6.0", + "async": ">=0.1.12" + }, + "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n", + "readmeFilename": "README.md", + "_id": "tough-cookie@0.9.15", + "dist": { + "shasum": "0fbda7fb5b5bca17e4f97909a0818dc8c2c12588" + }, + "_from": "tough-cookie@~0.9.15", + "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt new file mode 100644 index 00000000..2c201312 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt @@ -0,0 +1,5229 @@ +// ***** BEGIN LICENSE BLOCK ***** +// Version: MPL 1.1/GPL 2.0/LGPL 2.1 +// +// The contents of this file are subject to the Mozilla Public License Version +// 1.1 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the +// License. +// +// The Original Code is the Public Suffix List. +// +// The Initial Developer of the Original Code is +// Jo Hermans . +// Portions created by the Initial Developer are Copyright (C) 2007 +// the Initial Developer. All Rights Reserved. +// +// Contributor(s): +// Ruben Arakelyan +// Gervase Markham +// Pamela Greene +// David Triendl +// Jothan Frakes +// The kind representatives of many TLD registries +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** + +// ===BEGIN ICANN DOMAINS=== + +// ac : http://en.wikipedia.org/wiki/.ac +ac +com.ac +edu.ac +gov.ac +net.ac +mil.ac +org.ac + +// ad : http://en.wikipedia.org/wiki/.ad +ad +nom.ad + +// ae : http://en.wikipedia.org/wiki/.ae +// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php +ae +co.ae +net.ae +org.ae +sch.ae +ac.ae +gov.ae +mil.ae + +// aero : see http://www.information.aero/index.php?id=66 +aero +accident-investigation.aero +accident-prevention.aero +aerobatic.aero +aeroclub.aero +aerodrome.aero +agents.aero +aircraft.aero +airline.aero +airport.aero +air-surveillance.aero +airtraffic.aero +air-traffic-control.aero +ambulance.aero +amusement.aero +association.aero +author.aero +ballooning.aero +broker.aero +caa.aero +cargo.aero +catering.aero +certification.aero +championship.aero +charter.aero +civilaviation.aero +club.aero +conference.aero +consultant.aero +consulting.aero +control.aero +council.aero +crew.aero +design.aero +dgca.aero +educator.aero +emergency.aero +engine.aero +engineer.aero +entertainment.aero +equipment.aero +exchange.aero +express.aero +federation.aero +flight.aero +freight.aero +fuel.aero +gliding.aero +government.aero +groundhandling.aero +group.aero +hanggliding.aero +homebuilt.aero +insurance.aero +journal.aero +journalist.aero +leasing.aero +logistics.aero +magazine.aero +maintenance.aero +marketplace.aero +media.aero +microlight.aero +modelling.aero +navigation.aero +parachuting.aero +paragliding.aero +passenger-association.aero +pilot.aero +press.aero +production.aero +recreation.aero +repbody.aero +res.aero +research.aero +rotorcraft.aero +safety.aero +scientist.aero +services.aero +show.aero +skydiving.aero +software.aero +student.aero +taxi.aero +trader.aero +trading.aero +trainer.aero +union.aero +workinggroup.aero +works.aero + +// af : http://www.nic.af/help.jsp +af +gov.af +com.af +org.af +net.af +edu.af + +// ag : http://www.nic.ag/prices.htm +ag +com.ag +org.ag +net.ag +co.ag +nom.ag + +// ai : http://nic.com.ai/ +ai +off.ai +com.ai +net.ai +org.ai + +// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 +al +com.al +edu.al +gov.al +mil.al +net.al +org.al + +// am : http://en.wikipedia.org/wiki/.am +am + +// an : http://www.una.an/an_domreg/default.asp +an +com.an +net.an +org.an +edu.an + +// ao : http://en.wikipedia.org/wiki/.ao +// http://www.dns.ao/REGISTR.DOC +ao +ed.ao +gv.ao +og.ao +co.ao +pb.ao +it.ao + +// aq : http://en.wikipedia.org/wiki/.aq +aq + +// ar : http://en.wikipedia.org/wiki/.ar +*.ar +!congresodelalengua3.ar +!educ.ar +!gobiernoelectronico.ar +!mecon.ar +!nacion.ar +!nic.ar +!promocion.ar +!retina.ar +!uba.ar + +// arpa : http://en.wikipedia.org/wiki/.arpa +// Confirmed by registry 2008-06-18 +e164.arpa +in-addr.arpa +ip6.arpa +iris.arpa +uri.arpa +urn.arpa + +// as : http://en.wikipedia.org/wiki/.as +as +gov.as + +// asia : http://en.wikipedia.org/wiki/.asia +asia + +// at : http://en.wikipedia.org/wiki/.at +// Confirmed by registry 2008-06-17 +at +ac.at +co.at +gv.at +or.at + +// au : http://en.wikipedia.org/wiki/.au +// http://www.auda.org.au/ +// 2LDs +com.au +net.au +org.au +edu.au +gov.au +csiro.au +asn.au +id.au +// Historic 2LDs (closed to new registration, but sites still exist) +info.au +conf.au +oz.au +// CGDNs - http://www.cgdn.org.au/ +act.au +nsw.au +nt.au +qld.au +sa.au +tas.au +vic.au +wa.au +// 3LDs +act.edu.au +nsw.edu.au +nt.edu.au +qld.edu.au +sa.edu.au +tas.edu.au +vic.edu.au +wa.edu.au +act.gov.au +// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04 +// nsw.gov.au +nt.gov.au +qld.gov.au +sa.gov.au +tas.gov.au +vic.gov.au +wa.gov.au + +// aw : http://en.wikipedia.org/wiki/.aw +aw +com.aw + +// ax : http://en.wikipedia.org/wiki/.ax +ax + +// az : http://en.wikipedia.org/wiki/.az +az +com.az +net.az +int.az +gov.az +org.az +edu.az +info.az +pp.az +mil.az +name.az +pro.az +biz.az + +// ba : http://en.wikipedia.org/wiki/.ba +ba +org.ba +net.ba +edu.ba +gov.ba +mil.ba +unsa.ba +unbi.ba +co.ba +com.ba +rs.ba + +// bb : http://en.wikipedia.org/wiki/.bb +bb +biz.bb +com.bb +edu.bb +gov.bb +info.bb +net.bb +org.bb +store.bb + +// bd : http://en.wikipedia.org/wiki/.bd +*.bd + +// be : http://en.wikipedia.org/wiki/.be +// Confirmed by registry 2008-06-08 +be +ac.be + +// bf : http://en.wikipedia.org/wiki/.bf +bf +gov.bf + +// bg : http://en.wikipedia.org/wiki/.bg +// https://www.register.bg/user/static/rules/en/index.html +bg +a.bg +b.bg +c.bg +d.bg +e.bg +f.bg +g.bg +h.bg +i.bg +j.bg +k.bg +l.bg +m.bg +n.bg +o.bg +p.bg +q.bg +r.bg +s.bg +t.bg +u.bg +v.bg +w.bg +x.bg +y.bg +z.bg +0.bg +1.bg +2.bg +3.bg +4.bg +5.bg +6.bg +7.bg +8.bg +9.bg + +// bh : http://en.wikipedia.org/wiki/.bh +bh +com.bh +edu.bh +net.bh +org.bh +gov.bh + +// bi : http://en.wikipedia.org/wiki/.bi +// http://whois.nic.bi/ +bi +co.bi +com.bi +edu.bi +or.bi +org.bi + +// biz : http://en.wikipedia.org/wiki/.biz +biz + +// bj : http://en.wikipedia.org/wiki/.bj +bj +asso.bj +barreau.bj +gouv.bj + +// bm : http://www.bermudanic.bm/dnr-text.txt +bm +com.bm +edu.bm +gov.bm +net.bm +org.bm + +// bn : http://en.wikipedia.org/wiki/.bn +*.bn + +// bo : http://www.nic.bo/ +bo +com.bo +edu.bo +gov.bo +gob.bo +int.bo +org.bo +net.bo +mil.bo +tv.bo + +// br : http://registro.br/dominio/dpn.html +// Updated by registry 2011-03-01 +br +adm.br +adv.br +agr.br +am.br +arq.br +art.br +ato.br +b.br +bio.br +blog.br +bmd.br +can.br +cim.br +cng.br +cnt.br +com.br +coop.br +ecn.br +edu.br +emp.br +eng.br +esp.br +etc.br +eti.br +far.br +flog.br +fm.br +fnd.br +fot.br +fst.br +g12.br +ggf.br +gov.br +imb.br +ind.br +inf.br +jor.br +jus.br +lel.br +mat.br +med.br +mil.br +mus.br +net.br +nom.br +not.br +ntr.br +odo.br +org.br +ppg.br +pro.br +psc.br +psi.br +qsl.br +radio.br +rec.br +slg.br +srv.br +taxi.br +teo.br +tmp.br +trd.br +tur.br +tv.br +vet.br +vlog.br +wiki.br +zlg.br + +// bs : http://www.nic.bs/rules.html +bs +com.bs +net.bs +org.bs +edu.bs +gov.bs + +// bt : http://en.wikipedia.org/wiki/.bt +bt +com.bt +edu.bt +gov.bt +net.bt +org.bt + +// bv : No registrations at this time. +// Submitted by registry 2006-06-16 + +// bw : http://en.wikipedia.org/wiki/.bw +// http://www.gobin.info/domainname/bw.doc +// list of other 2nd level tlds ? +bw +co.bw +org.bw + +// by : http://en.wikipedia.org/wiki/.by +// http://tld.by/rules_2006_en.html +// list of other 2nd level tlds ? +by +gov.by +mil.by +// Official information does not indicate that com.by is a reserved +// second-level domain, but it's being used as one (see www.google.com.by and +// www.yahoo.com.by, for example), so we list it here for safety's sake. +com.by + +// http://hoster.by/ +of.by + +// bz : http://en.wikipedia.org/wiki/.bz +// http://www.belizenic.bz/ +bz +com.bz +net.bz +org.bz +edu.bz +gov.bz + +// ca : http://en.wikipedia.org/wiki/.ca +ca +// ca geographical names +ab.ca +bc.ca +mb.ca +nb.ca +nf.ca +nl.ca +ns.ca +nt.ca +nu.ca +on.ca +pe.ca +qc.ca +sk.ca +yk.ca +// gc.ca: http://en.wikipedia.org/wiki/.gc.ca +// see also: http://registry.gc.ca/en/SubdomainFAQ +gc.ca + +// cat : http://en.wikipedia.org/wiki/.cat +cat + +// cc : http://en.wikipedia.org/wiki/.cc +cc + +// cd : http://en.wikipedia.org/wiki/.cd +// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 +cd +gov.cd + +// cf : http://en.wikipedia.org/wiki/.cf +cf + +// cg : http://en.wikipedia.org/wiki/.cg +cg + +// ch : http://en.wikipedia.org/wiki/.ch +ch + +// ci : http://en.wikipedia.org/wiki/.ci +// http://www.nic.ci/index.php?page=charte +ci +org.ci +or.ci +com.ci +co.ci +edu.ci +ed.ci +ac.ci +net.ci +go.ci +asso.ci +aéroport.ci +int.ci +presse.ci +md.ci +gouv.ci + +// ck : http://en.wikipedia.org/wiki/.ck +*.ck +!www.ck + +// cl : http://en.wikipedia.org/wiki/.cl +cl +gov.cl +gob.cl +co.cl +mil.cl + +// cm : http://en.wikipedia.org/wiki/.cm +cm +gov.cm + +// cn : http://en.wikipedia.org/wiki/.cn +// Submitted by registry 2008-06-11 +cn +ac.cn +com.cn +edu.cn +gov.cn +net.cn +org.cn +mil.cn +公司.cn +网络.cn +網絡.cn +// cn geographic names +ah.cn +bj.cn +cq.cn +fj.cn +gd.cn +gs.cn +gz.cn +gx.cn +ha.cn +hb.cn +he.cn +hi.cn +hl.cn +hn.cn +jl.cn +js.cn +jx.cn +ln.cn +nm.cn +nx.cn +qh.cn +sc.cn +sd.cn +sh.cn +sn.cn +sx.cn +tj.cn +xj.cn +xz.cn +yn.cn +zj.cn +hk.cn +mo.cn +tw.cn + +// co : http://en.wikipedia.org/wiki/.co +// Submitted by registry 2008-06-11 +co +arts.co +com.co +edu.co +firm.co +gov.co +info.co +int.co +mil.co +net.co +nom.co +org.co +rec.co +web.co + +// com : http://en.wikipedia.org/wiki/.com +com + +// coop : http://en.wikipedia.org/wiki/.coop +coop + +// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do +cr +ac.cr +co.cr +ed.cr +fi.cr +go.cr +or.cr +sa.cr + +// cu : http://en.wikipedia.org/wiki/.cu +cu +com.cu +edu.cu +org.cu +net.cu +gov.cu +inf.cu + +// cv : http://en.wikipedia.org/wiki/.cv +cv + +// cx : http://en.wikipedia.org/wiki/.cx +// list of other 2nd level tlds ? +cx +gov.cx + +// cy : http://en.wikipedia.org/wiki/.cy +*.cy + +// cz : http://en.wikipedia.org/wiki/.cz +cz + +// de : http://en.wikipedia.org/wiki/.de +// Confirmed by registry (with technical +// reservations) 2008-07-01 +de + +// dj : http://en.wikipedia.org/wiki/.dj +dj + +// dk : http://en.wikipedia.org/wiki/.dk +// Confirmed by registry 2008-06-17 +dk + +// dm : http://en.wikipedia.org/wiki/.dm +dm +com.dm +net.dm +org.dm +edu.dm +gov.dm + +// do : http://en.wikipedia.org/wiki/.do +do +art.do +com.do +edu.do +gob.do +gov.do +mil.do +net.do +org.do +sld.do +web.do + +// dz : http://en.wikipedia.org/wiki/.dz +dz +com.dz +org.dz +net.dz +gov.dz +edu.dz +asso.dz +pol.dz +art.dz + +// ec : http://www.nic.ec/reg/paso1.asp +// Submitted by registry 2008-07-04 +ec +com.ec +info.ec +net.ec +fin.ec +k12.ec +med.ec +pro.ec +org.ec +edu.ec +gov.ec +gob.ec +mil.ec + +// edu : http://en.wikipedia.org/wiki/.edu +edu + +// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B +ee +edu.ee +gov.ee +riik.ee +lib.ee +med.ee +com.ee +pri.ee +aip.ee +org.ee +fie.ee + +// eg : http://en.wikipedia.org/wiki/.eg +eg +com.eg +edu.eg +eun.eg +gov.eg +mil.eg +name.eg +net.eg +org.eg +sci.eg + +// er : http://en.wikipedia.org/wiki/.er +*.er + +// es : https://www.nic.es/site_ingles/ingles/dominios/index.html +es +com.es +nom.es +org.es +gob.es +edu.es + +// et : http://en.wikipedia.org/wiki/.et +*.et + +// eu : http://en.wikipedia.org/wiki/.eu +eu + +// fi : http://en.wikipedia.org/wiki/.fi +fi +// aland.fi : http://en.wikipedia.org/wiki/.ax +// This domain is being phased out in favor of .ax. As there are still many +// domains under aland.fi, we still keep it on the list until aland.fi is +// completely removed. +// TODO: Check for updates (expected to be phased out around Q1/2009) +aland.fi + +// fj : http://en.wikipedia.org/wiki/.fj +*.fj + +// fk : http://en.wikipedia.org/wiki/.fk +*.fk + +// fm : http://en.wikipedia.org/wiki/.fm +fm + +// fo : http://en.wikipedia.org/wiki/.fo +fo + +// fr : http://www.afnic.fr/ +// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs +fr +com.fr +asso.fr +nom.fr +prd.fr +presse.fr +tm.fr +// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels +aeroport.fr +assedic.fr +avocat.fr +avoues.fr +cci.fr +chambagri.fr +chirurgiens-dentistes.fr +experts-comptables.fr +geometre-expert.fr +gouv.fr +greta.fr +huissier-justice.fr +medecin.fr +notaires.fr +pharmacien.fr +port.fr +veterinaire.fr + +// ga : http://en.wikipedia.org/wiki/.ga +ga + +// gb : This registry is effectively dormant +// Submitted by registry 2008-06-12 + +// gd : http://en.wikipedia.org/wiki/.gd +gd + +// ge : http://www.nic.net.ge/policy_en.pdf +ge +com.ge +edu.ge +gov.ge +org.ge +mil.ge +net.ge +pvt.ge + +// gf : http://en.wikipedia.org/wiki/.gf +gf + +// gg : http://www.channelisles.net/applic/avextn.shtml +gg +co.gg +org.gg +net.gg +sch.gg +gov.gg + +// gh : http://en.wikipedia.org/wiki/.gh +// see also: http://www.nic.gh/reg_now.php +// Although domains directly at second level are not possible at the moment, +// they have been possible for some time and may come back. +gh +com.gh +edu.gh +gov.gh +org.gh +mil.gh + +// gi : http://www.nic.gi/rules.html +gi +com.gi +ltd.gi +gov.gi +mod.gi +edu.gi +org.gi + +// gl : http://en.wikipedia.org/wiki/.gl +// http://nic.gl +gl + +// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm +gm + +// gn : http://psg.com/dns/gn/gn.txt +// Submitted by registry 2008-06-17 +ac.gn +com.gn +edu.gn +gov.gn +org.gn +net.gn + +// gov : http://en.wikipedia.org/wiki/.gov +gov + +// gp : http://www.nic.gp/index.php?lang=en +gp +com.gp +net.gp +mobi.gp +edu.gp +org.gp +asso.gp + +// gq : http://en.wikipedia.org/wiki/.gq +gq + +// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html +// Submitted by registry 2008-06-09 +gr +com.gr +edu.gr +net.gr +org.gr +gov.gr + +// gs : http://en.wikipedia.org/wiki/.gs +gs + +// gt : http://www.gt/politicas.html +*.gt +!www.gt + +// gu : http://gadao.gov.gu/registration.txt +*.gu + +// gw : http://en.wikipedia.org/wiki/.gw +gw + +// gy : http://en.wikipedia.org/wiki/.gy +// http://registry.gy/ +gy +co.gy +com.gy +net.gy + +// hk : https://www.hkdnr.hk +// Submitted by registry 2008-06-11 +hk +com.hk +edu.hk +gov.hk +idv.hk +net.hk +org.hk +公司.hk +教育.hk +敎育.hk +政府.hk +個人.hk +个人.hk +箇人.hk +網络.hk +网络.hk +组織.hk +網絡.hk +网絡.hk +组织.hk +組織.hk +組织.hk + +// hm : http://en.wikipedia.org/wiki/.hm +hm + +// hn : http://www.nic.hn/politicas/ps02,,05.html +hn +com.hn +edu.hn +org.hn +net.hn +mil.hn +gob.hn + +// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf +hr +iz.hr +from.hr +name.hr +com.hr + +// ht : http://www.nic.ht/info/charte.cfm +ht +com.ht +shop.ht +firm.ht +info.ht +adult.ht +net.ht +pro.ht +org.ht +med.ht +art.ht +coop.ht +pol.ht +asso.ht +edu.ht +rel.ht +gouv.ht +perso.ht + +// hu : http://www.domain.hu/domain/English/sld.html +// Confirmed by registry 2008-06-12 +hu +co.hu +info.hu +org.hu +priv.hu +sport.hu +tm.hu +2000.hu +agrar.hu +bolt.hu +casino.hu +city.hu +erotica.hu +erotika.hu +film.hu +forum.hu +games.hu +hotel.hu +ingatlan.hu +jogasz.hu +konyvelo.hu +lakas.hu +media.hu +news.hu +reklam.hu +sex.hu +shop.hu +suli.hu +szex.hu +tozsde.hu +utazas.hu +video.hu + +// id : http://en.wikipedia.org/wiki/.id +// see also: https://register.pandi.or.id/ +id +ac.id +co.id +go.id +mil.id +net.id +or.id +sch.id +web.id + +// ie : http://en.wikipedia.org/wiki/.ie +ie +gov.ie + +// il : http://en.wikipedia.org/wiki/.il +*.il + +// im : https://www.nic.im/pdfs/imfaqs.pdf +im +co.im +ltd.co.im +plc.co.im +net.im +gov.im +org.im +nic.im +ac.im + +// in : http://en.wikipedia.org/wiki/.in +// see also: http://www.inregistry.in/policies/ +// Please note, that nic.in is not an offical eTLD, but used by most +// government institutions. +in +co.in +firm.in +net.in +org.in +gen.in +ind.in +nic.in +ac.in +edu.in +res.in +gov.in +mil.in + +// info : http://en.wikipedia.org/wiki/.info +info + +// int : http://en.wikipedia.org/wiki/.int +// Confirmed by registry 2008-06-18 +int +eu.int + +// io : http://www.nic.io/rules.html +// list of other 2nd level tlds ? +io +com.io + +// iq : http://www.cmc.iq/english/iq/iqregister1.htm +iq +gov.iq +edu.iq +mil.iq +com.iq +org.iq +net.iq + +// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules +// Also see http://www.nic.ir/Internationalized_Domain_Names +// Two .ir entries added at request of , 2010-04-16 +ir +ac.ir +co.ir +gov.ir +id.ir +net.ir +org.ir +sch.ir +// xn--mgba3a4f16a.ir (.ir, Persian YEH) +ایران.ir +// xn--mgba3a4fra.ir (.ir, Arabic YEH) +ايران.ir + +// is : http://www.isnic.is/domain/rules.php +// Confirmed by registry 2008-12-06 +is +net.is +com.is +edu.is +gov.is +org.is +int.is + +// it : http://en.wikipedia.org/wiki/.it +it +gov.it +edu.it +// list of reserved geo-names : +// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf +// (There is also a list of reserved geo-names corresponding to Italian +// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is +// not included here.) +agrigento.it +ag.it +alessandria.it +al.it +ancona.it +an.it +aosta.it +aoste.it +ao.it +arezzo.it +ar.it +ascoli-piceno.it +ascolipiceno.it +ap.it +asti.it +at.it +avellino.it +av.it +bari.it +ba.it +andria-barletta-trani.it +andriabarlettatrani.it +trani-barletta-andria.it +tranibarlettaandria.it +barletta-trani-andria.it +barlettatraniandria.it +andria-trani-barletta.it +andriatranibarletta.it +trani-andria-barletta.it +traniandriabarletta.it +bt.it +belluno.it +bl.it +benevento.it +bn.it +bergamo.it +bg.it +biella.it +bi.it +bologna.it +bo.it +bolzano.it +bozen.it +balsan.it +alto-adige.it +altoadige.it +suedtirol.it +bz.it +brescia.it +bs.it +brindisi.it +br.it +cagliari.it +ca.it +caltanissetta.it +cl.it +campobasso.it +cb.it +carboniaiglesias.it +carbonia-iglesias.it +iglesias-carbonia.it +iglesiascarbonia.it +ci.it +caserta.it +ce.it +catania.it +ct.it +catanzaro.it +cz.it +chieti.it +ch.it +como.it +co.it +cosenza.it +cs.it +cremona.it +cr.it +crotone.it +kr.it +cuneo.it +cn.it +dell-ogliastra.it +dellogliastra.it +ogliastra.it +og.it +enna.it +en.it +ferrara.it +fe.it +fermo.it +fm.it +firenze.it +florence.it +fi.it +foggia.it +fg.it +forli-cesena.it +forlicesena.it +cesena-forli.it +cesenaforli.it +fc.it +frosinone.it +fr.it +genova.it +genoa.it +ge.it +gorizia.it +go.it +grosseto.it +gr.it +imperia.it +im.it +isernia.it +is.it +laquila.it +aquila.it +aq.it +la-spezia.it +laspezia.it +sp.it +latina.it +lt.it +lecce.it +le.it +lecco.it +lc.it +livorno.it +li.it +lodi.it +lo.it +lucca.it +lu.it +macerata.it +mc.it +mantova.it +mn.it +massa-carrara.it +massacarrara.it +carrara-massa.it +carraramassa.it +ms.it +matera.it +mt.it +medio-campidano.it +mediocampidano.it +campidano-medio.it +campidanomedio.it +vs.it +messina.it +me.it +milano.it +milan.it +mi.it +modena.it +mo.it +monza.it +monza-brianza.it +monzabrianza.it +monzaebrianza.it +monzaedellabrianza.it +monza-e-della-brianza.it +mb.it +napoli.it +naples.it +na.it +novara.it +no.it +nuoro.it +nu.it +oristano.it +or.it +padova.it +padua.it +pd.it +palermo.it +pa.it +parma.it +pr.it +pavia.it +pv.it +perugia.it +pg.it +pescara.it +pe.it +pesaro-urbino.it +pesarourbino.it +urbino-pesaro.it +urbinopesaro.it +pu.it +piacenza.it +pc.it +pisa.it +pi.it +pistoia.it +pt.it +pordenone.it +pn.it +potenza.it +pz.it +prato.it +po.it +ragusa.it +rg.it +ravenna.it +ra.it +reggio-calabria.it +reggiocalabria.it +rc.it +reggio-emilia.it +reggioemilia.it +re.it +rieti.it +ri.it +rimini.it +rn.it +roma.it +rome.it +rm.it +rovigo.it +ro.it +salerno.it +sa.it +sassari.it +ss.it +savona.it +sv.it +siena.it +si.it +siracusa.it +sr.it +sondrio.it +so.it +taranto.it +ta.it +tempio-olbia.it +tempioolbia.it +olbia-tempio.it +olbiatempio.it +ot.it +teramo.it +te.it +terni.it +tr.it +torino.it +turin.it +to.it +trapani.it +tp.it +trento.it +trentino.it +tn.it +treviso.it +tv.it +trieste.it +ts.it +udine.it +ud.it +varese.it +va.it +venezia.it +venice.it +ve.it +verbania.it +vb.it +vercelli.it +vc.it +verona.it +vr.it +vibo-valentia.it +vibovalentia.it +vv.it +vicenza.it +vi.it +viterbo.it +vt.it + +// je : http://www.channelisles.net/applic/avextn.shtml +je +co.je +org.je +net.je +sch.je +gov.je + +// jm : http://www.com.jm/register.html +*.jm + +// jo : http://www.dns.jo/Registration_policy.aspx +jo +com.jo +org.jo +net.jo +edu.jo +sch.jo +gov.jo +mil.jo +name.jo + +// jobs : http://en.wikipedia.org/wiki/.jobs +jobs + +// jp : http://en.wikipedia.org/wiki/.jp +// http://jprs.co.jp/en/jpdomain.html +// Submitted by registry 2008-06-11 +// Updated by registry 2008-12-04 +jp +// jp organizational type names +ac.jp +ad.jp +co.jp +ed.jp +go.jp +gr.jp +lg.jp +ne.jp +or.jp +// jp geographic type names +// http://jprs.jp/doc/rule/saisoku-1.html +*.aichi.jp +*.akita.jp +*.aomori.jp +*.chiba.jp +*.ehime.jp +*.fukui.jp +*.fukuoka.jp +*.fukushima.jp +*.gifu.jp +*.gunma.jp +*.hiroshima.jp +*.hokkaido.jp +*.hyogo.jp +*.ibaraki.jp +*.ishikawa.jp +*.iwate.jp +*.kagawa.jp +*.kagoshima.jp +*.kanagawa.jp +*.kawasaki.jp +*.kitakyushu.jp +*.kobe.jp +*.kochi.jp +*.kumamoto.jp +*.kyoto.jp +*.mie.jp +*.miyagi.jp +*.miyazaki.jp +*.nagano.jp +*.nagasaki.jp +*.nagoya.jp +*.nara.jp +*.niigata.jp +*.oita.jp +*.okayama.jp +*.okinawa.jp +*.osaka.jp +*.saga.jp +*.saitama.jp +*.sapporo.jp +*.sendai.jp +*.shiga.jp +*.shimane.jp +*.shizuoka.jp +*.tochigi.jp +*.tokushima.jp +*.tokyo.jp +*.tottori.jp +*.toyama.jp +*.wakayama.jp +*.yamagata.jp +*.yamaguchi.jp +*.yamanashi.jp +*.yokohama.jp +!metro.tokyo.jp +!pref.aichi.jp +!pref.akita.jp +!pref.aomori.jp +!pref.chiba.jp +!pref.ehime.jp +!pref.fukui.jp +!pref.fukuoka.jp +!pref.fukushima.jp +!pref.gifu.jp +!pref.gunma.jp +!pref.hiroshima.jp +!pref.hokkaido.jp +!pref.hyogo.jp +!pref.ibaraki.jp +!pref.ishikawa.jp +!pref.iwate.jp +!pref.kagawa.jp +!pref.kagoshima.jp +!pref.kanagawa.jp +!pref.kochi.jp +!pref.kumamoto.jp +!pref.kyoto.jp +!pref.mie.jp +!pref.miyagi.jp +!pref.miyazaki.jp +!pref.nagano.jp +!pref.nagasaki.jp +!pref.nara.jp +!pref.niigata.jp +!pref.oita.jp +!pref.okayama.jp +!pref.okinawa.jp +!pref.osaka.jp +!pref.saga.jp +!pref.saitama.jp +!pref.shiga.jp +!pref.shimane.jp +!pref.shizuoka.jp +!pref.tochigi.jp +!pref.tokushima.jp +!pref.tottori.jp +!pref.toyama.jp +!pref.wakayama.jp +!pref.yamagata.jp +!pref.yamaguchi.jp +!pref.yamanashi.jp +!city.chiba.jp +!city.fukuoka.jp +!city.hiroshima.jp +!city.kawasaki.jp +!city.kitakyushu.jp +!city.kobe.jp +!city.kyoto.jp +!city.nagoya.jp +!city.niigata.jp +!city.okayama.jp +!city.osaka.jp +!city.saitama.jp +!city.sapporo.jp +!city.sendai.jp +!city.shizuoka.jp +!city.yokohama.jp + +// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 +*.ke + +// kg : http://www.domain.kg/dmn_n.html +kg +org.kg +net.kg +com.kg +edu.kg +gov.kg +mil.kg + +// kh : http://www.mptc.gov.kh/dns_registration.htm +*.kh + +// ki : http://www.ki/dns/index.html +ki +edu.ki +biz.ki +net.ki +org.ki +gov.ki +info.ki +com.ki + +// km : http://en.wikipedia.org/wiki/.km +// http://www.domaine.km/documents/charte.doc +km +org.km +nom.km +gov.km +prd.km +tm.km +edu.km +mil.km +ass.km +com.km +// These are only mentioned as proposed suggestions at domaine.km, but +// http://en.wikipedia.org/wiki/.km says they're available for registration: +coop.km +asso.km +presse.km +medecin.km +notaires.km +pharmaciens.km +veterinaire.km +gouv.km + +// kn : http://en.wikipedia.org/wiki/.kn +// http://www.dot.kn/domainRules.html +kn +net.kn +org.kn +edu.kn +gov.kn + +// kp : http://www.kcce.kp/en_index.php +com.kp +edu.kp +gov.kp +org.kp +rep.kp +tra.kp + +// kr : http://en.wikipedia.org/wiki/.kr +// see also: http://domain.nida.or.kr/eng/registration.jsp +kr +ac.kr +co.kr +es.kr +go.kr +hs.kr +kg.kr +mil.kr +ms.kr +ne.kr +or.kr +pe.kr +re.kr +sc.kr +// kr geographical names +busan.kr +chungbuk.kr +chungnam.kr +daegu.kr +daejeon.kr +gangwon.kr +gwangju.kr +gyeongbuk.kr +gyeonggi.kr +gyeongnam.kr +incheon.kr +jeju.kr +jeonbuk.kr +jeonnam.kr +seoul.kr +ulsan.kr + +// kw : http://en.wikipedia.org/wiki/.kw +*.kw + +// ky : http://www.icta.ky/da_ky_reg_dom.php +// Confirmed by registry 2008-06-17 +ky +edu.ky +gov.ky +com.ky +org.ky +net.ky + +// kz : http://en.wikipedia.org/wiki/.kz +// see also: http://www.nic.kz/rules/index.jsp +kz +org.kz +edu.kz +net.kz +gov.kz +mil.kz +com.kz + +// la : http://en.wikipedia.org/wiki/.la +// Submitted by registry 2008-06-10 +la +int.la +net.la +info.la +edu.la +gov.la +per.la +com.la +org.la + +// lb : http://en.wikipedia.org/wiki/.lb +// Submitted by registry 2008-06-17 +com.lb +edu.lb +gov.lb +net.lb +org.lb + +// lc : http://en.wikipedia.org/wiki/.lc +// see also: http://www.nic.lc/rules.htm +lc +com.lc +net.lc +co.lc +org.lc +edu.lc +gov.lc + +// li : http://en.wikipedia.org/wiki/.li +li + +// lk : http://www.nic.lk/seclevpr.html +lk +gov.lk +sch.lk +net.lk +int.lk +com.lk +org.lk +edu.lk +ngo.lk +soc.lk +web.lk +ltd.lk +assn.lk +grp.lk +hotel.lk + +// lr : http://psg.com/dns/lr/lr.txt +// Submitted by registry 2008-06-17 +com.lr +edu.lr +gov.lr +org.lr +net.lr + +// ls : http://en.wikipedia.org/wiki/.ls +ls +co.ls +org.ls + +// lt : http://en.wikipedia.org/wiki/.lt +lt +// gov.lt : http://www.gov.lt/index_en.php +gov.lt + +// lu : http://www.dns.lu/en/ +lu + +// lv : http://www.nic.lv/DNS/En/generic.php +lv +com.lv +edu.lv +gov.lv +org.lv +mil.lv +id.lv +net.lv +asn.lv +conf.lv + +// ly : http://www.nic.ly/regulations.php +ly +com.ly +net.ly +gov.ly +plc.ly +edu.ly +sch.ly +med.ly +org.ly +id.ly + +// ma : http://en.wikipedia.org/wiki/.ma +// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf +ma +co.ma +net.ma +gov.ma +org.ma +ac.ma +press.ma + +// mc : http://www.nic.mc/ +mc +tm.mc +asso.mc + +// md : http://en.wikipedia.org/wiki/.md +md + +// me : http://en.wikipedia.org/wiki/.me +me +co.me +net.me +org.me +edu.me +ac.me +gov.me +its.me +priv.me + +// mg : http://www.nic.mg/tarif.htm +mg +org.mg +nom.mg +gov.mg +prd.mg +tm.mg +edu.mg +mil.mg +com.mg + +// mh : http://en.wikipedia.org/wiki/.mh +mh + +// mil : http://en.wikipedia.org/wiki/.mil +mil + +// mk : http://en.wikipedia.org/wiki/.mk +// see also: http://dns.marnet.net.mk/postapka.php +mk +com.mk +org.mk +net.mk +edu.mk +gov.mk +inf.mk +name.mk + +// ml : http://www.gobin.info/domainname/ml-template.doc +// see also: http://en.wikipedia.org/wiki/.ml +ml +com.ml +edu.ml +gouv.ml +gov.ml +net.ml +org.ml +presse.ml + +// mm : http://en.wikipedia.org/wiki/.mm +*.mm + +// mn : http://en.wikipedia.org/wiki/.mn +mn +gov.mn +edu.mn +org.mn + +// mo : http://www.monic.net.mo/ +mo +com.mo +net.mo +org.mo +edu.mo +gov.mo + +// mobi : http://en.wikipedia.org/wiki/.mobi +mobi + +// mp : http://www.dot.mp/ +// Confirmed by registry 2008-06-17 +mp + +// mq : http://en.wikipedia.org/wiki/.mq +mq + +// mr : http://en.wikipedia.org/wiki/.mr +mr +gov.mr + +// ms : http://en.wikipedia.org/wiki/.ms +ms + +// mt : https://www.nic.org.mt/dotmt/ +*.mt + +// mu : http://en.wikipedia.org/wiki/.mu +mu +com.mu +net.mu +org.mu +gov.mu +ac.mu +co.mu +or.mu + +// museum : http://about.museum/naming/ +// http://index.museum/ +museum +academy.museum +agriculture.museum +air.museum +airguard.museum +alabama.museum +alaska.museum +amber.museum +ambulance.museum +american.museum +americana.museum +americanantiques.museum +americanart.museum +amsterdam.museum +and.museum +annefrank.museum +anthro.museum +anthropology.museum +antiques.museum +aquarium.museum +arboretum.museum +archaeological.museum +archaeology.museum +architecture.museum +art.museum +artanddesign.museum +artcenter.museum +artdeco.museum +arteducation.museum +artgallery.museum +arts.museum +artsandcrafts.museum +asmatart.museum +assassination.museum +assisi.museum +association.museum +astronomy.museum +atlanta.museum +austin.museum +australia.museum +automotive.museum +aviation.museum +axis.museum +badajoz.museum +baghdad.museum +bahn.museum +bale.museum +baltimore.museum +barcelona.museum +baseball.museum +basel.museum +baths.museum +bauern.museum +beauxarts.museum +beeldengeluid.museum +bellevue.museum +bergbau.museum +berkeley.museum +berlin.museum +bern.museum +bible.museum +bilbao.museum +bill.museum +birdart.museum +birthplace.museum +bonn.museum +boston.museum +botanical.museum +botanicalgarden.museum +botanicgarden.museum +botany.museum +brandywinevalley.museum +brasil.museum +bristol.museum +british.museum +britishcolumbia.museum +broadcast.museum +brunel.museum +brussel.museum +brussels.museum +bruxelles.museum +building.museum +burghof.museum +bus.museum +bushey.museum +cadaques.museum +california.museum +cambridge.museum +can.museum +canada.museum +capebreton.museum +carrier.museum +cartoonart.museum +casadelamoneda.museum +castle.museum +castres.museum +celtic.museum +center.museum +chattanooga.museum +cheltenham.museum +chesapeakebay.museum +chicago.museum +children.museum +childrens.museum +childrensgarden.museum +chiropractic.museum +chocolate.museum +christiansburg.museum +cincinnati.museum +cinema.museum +circus.museum +civilisation.museum +civilization.museum +civilwar.museum +clinton.museum +clock.museum +coal.museum +coastaldefence.museum +cody.museum +coldwar.museum +collection.museum +colonialwilliamsburg.museum +coloradoplateau.museum +columbia.museum +columbus.museum +communication.museum +communications.museum +community.museum +computer.museum +computerhistory.museum +comunicações.museum +contemporary.museum +contemporaryart.museum +convent.museum +copenhagen.museum +corporation.museum +correios-e-telecomunicações.museum +corvette.museum +costume.museum +countryestate.museum +county.museum +crafts.museum +cranbrook.museum +creation.museum +cultural.museum +culturalcenter.museum +culture.museum +cyber.museum +cymru.museum +dali.museum +dallas.museum +database.museum +ddr.museum +decorativearts.museum +delaware.museum +delmenhorst.museum +denmark.museum +depot.museum +design.museum +detroit.museum +dinosaur.museum +discovery.museum +dolls.museum +donostia.museum +durham.museum +eastafrica.museum +eastcoast.museum +education.museum +educational.museum +egyptian.museum +eisenbahn.museum +elburg.museum +elvendrell.museum +embroidery.museum +encyclopedic.museum +england.museum +entomology.museum +environment.museum +environmentalconservation.museum +epilepsy.museum +essex.museum +estate.museum +ethnology.museum +exeter.museum +exhibition.museum +family.museum +farm.museum +farmequipment.museum +farmers.museum +farmstead.museum +field.museum +figueres.museum +filatelia.museum +film.museum +fineart.museum +finearts.museum +finland.museum +flanders.museum +florida.museum +force.museum +fortmissoula.museum +fortworth.museum +foundation.museum +francaise.museum +frankfurt.museum +franziskaner.museum +freemasonry.museum +freiburg.museum +fribourg.museum +frog.museum +fundacio.museum +furniture.museum +gallery.museum +garden.museum +gateway.museum +geelvinck.museum +gemological.museum +geology.museum +georgia.museum +giessen.museum +glas.museum +glass.museum +gorge.museum +grandrapids.museum +graz.museum +guernsey.museum +halloffame.museum +hamburg.museum +handson.museum +harvestcelebration.museum +hawaii.museum +health.museum +heimatunduhren.museum +hellas.museum +helsinki.museum +hembygdsforbund.museum +heritage.museum +histoire.museum +historical.museum +historicalsociety.museum +historichouses.museum +historisch.museum +historisches.museum +history.museum +historyofscience.museum +horology.museum +house.museum +humanities.museum +illustration.museum +imageandsound.museum +indian.museum +indiana.museum +indianapolis.museum +indianmarket.museum +intelligence.museum +interactive.museum +iraq.museum +iron.museum +isleofman.museum +jamison.museum +jefferson.museum +jerusalem.museum +jewelry.museum +jewish.museum +jewishart.museum +jfk.museum +journalism.museum +judaica.museum +judygarland.museum +juedisches.museum +juif.museum +karate.museum +karikatur.museum +kids.museum +koebenhavn.museum +koeln.museum +kunst.museum +kunstsammlung.museum +kunstunddesign.museum +labor.museum +labour.museum +lajolla.museum +lancashire.museum +landes.museum +lans.museum +läns.museum +larsson.museum +lewismiller.museum +lincoln.museum +linz.museum +living.museum +livinghistory.museum +localhistory.museum +london.museum +losangeles.museum +louvre.museum +loyalist.museum +lucerne.museum +luxembourg.museum +luzern.museum +mad.museum +madrid.museum +mallorca.museum +manchester.museum +mansion.museum +mansions.museum +manx.museum +marburg.museum +maritime.museum +maritimo.museum +maryland.museum +marylhurst.museum +media.museum +medical.museum +medizinhistorisches.museum +meeres.museum +memorial.museum +mesaverde.museum +michigan.museum +midatlantic.museum +military.museum +mill.museum +miners.museum +mining.museum +minnesota.museum +missile.museum +missoula.museum +modern.museum +moma.museum +money.museum +monmouth.museum +monticello.museum +montreal.museum +moscow.museum +motorcycle.museum +muenchen.museum +muenster.museum +mulhouse.museum +muncie.museum +museet.museum +museumcenter.museum +museumvereniging.museum +music.museum +national.museum +nationalfirearms.museum +nationalheritage.museum +nativeamerican.museum +naturalhistory.museum +naturalhistorymuseum.museum +naturalsciences.museum +nature.museum +naturhistorisches.museum +natuurwetenschappen.museum +naumburg.museum +naval.museum +nebraska.museum +neues.museum +newhampshire.museum +newjersey.museum +newmexico.museum +newport.museum +newspaper.museum +newyork.museum +niepce.museum +norfolk.museum +north.museum +nrw.museum +nuernberg.museum +nuremberg.museum +nyc.museum +nyny.museum +oceanographic.museum +oceanographique.museum +omaha.museum +online.museum +ontario.museum +openair.museum +oregon.museum +oregontrail.museum +otago.museum +oxford.museum +pacific.museum +paderborn.museum +palace.museum +paleo.museum +palmsprings.museum +panama.museum +paris.museum +pasadena.museum +pharmacy.museum +philadelphia.museum +philadelphiaarea.museum +philately.museum +phoenix.museum +photography.museum +pilots.museum +pittsburgh.museum +planetarium.museum +plantation.museum +plants.museum +plaza.museum +portal.museum +portland.museum +portlligat.museum +posts-and-telecommunications.museum +preservation.museum +presidio.museum +press.museum +project.museum +public.museum +pubol.museum +quebec.museum +railroad.museum +railway.museum +research.museum +resistance.museum +riodejaneiro.museum +rochester.museum +rockart.museum +roma.museum +russia.museum +saintlouis.museum +salem.museum +salvadordali.museum +salzburg.museum +sandiego.museum +sanfrancisco.museum +santabarbara.museum +santacruz.museum +santafe.museum +saskatchewan.museum +satx.museum +savannahga.museum +schlesisches.museum +schoenbrunn.museum +schokoladen.museum +school.museum +schweiz.museum +science.museum +scienceandhistory.museum +scienceandindustry.museum +sciencecenter.museum +sciencecenters.museum +science-fiction.museum +sciencehistory.museum +sciences.museum +sciencesnaturelles.museum +scotland.museum +seaport.museum +settlement.museum +settlers.museum +shell.museum +sherbrooke.museum +sibenik.museum +silk.museum +ski.museum +skole.museum +society.museum +sologne.museum +soundandvision.museum +southcarolina.museum +southwest.museum +space.museum +spy.museum +square.museum +stadt.museum +stalbans.museum +starnberg.museum +state.museum +stateofdelaware.museum +station.museum +steam.museum +steiermark.museum +stjohn.museum +stockholm.museum +stpetersburg.museum +stuttgart.museum +suisse.museum +surgeonshall.museum +surrey.museum +svizzera.museum +sweden.museum +sydney.museum +tank.museum +tcm.museum +technology.museum +telekommunikation.museum +television.museum +texas.museum +textile.museum +theater.museum +time.museum +timekeeping.museum +topology.museum +torino.museum +touch.museum +town.museum +transport.museum +tree.museum +trolley.museum +trust.museum +trustee.museum +uhren.museum +ulm.museum +undersea.museum +university.museum +usa.museum +usantiques.museum +usarts.museum +uscountryestate.museum +usculture.museum +usdecorativearts.museum +usgarden.museum +ushistory.museum +ushuaia.museum +uslivinghistory.museum +utah.museum +uvic.museum +valley.museum +vantaa.museum +versailles.museum +viking.museum +village.museum +virginia.museum +virtual.museum +virtuel.museum +vlaanderen.museum +volkenkunde.museum +wales.museum +wallonie.museum +war.museum +washingtondc.museum +watchandclock.museum +watch-and-clock.museum +western.museum +westfalen.museum +whaling.museum +wildlife.museum +williamsburg.museum +windmill.museum +workshop.museum +york.museum +yorkshire.museum +yosemite.museum +youth.museum +zoological.museum +zoology.museum +ירושלים.museum +иком.museum + +// mv : http://en.wikipedia.org/wiki/.mv +// "mv" included because, contra Wikipedia, google.mv exists. +mv +aero.mv +biz.mv +com.mv +coop.mv +edu.mv +gov.mv +info.mv +int.mv +mil.mv +museum.mv +name.mv +net.mv +org.mv +pro.mv + +// mw : http://www.registrar.mw/ +mw +ac.mw +biz.mw +co.mw +com.mw +coop.mw +edu.mw +gov.mw +int.mw +museum.mw +net.mw +org.mw + +// mx : http://www.nic.mx/ +// Submitted by registry 2008-06-19 +mx +com.mx +org.mx +gob.mx +edu.mx +net.mx + +// my : http://www.mynic.net.my/ +my +com.my +net.my +org.my +gov.my +edu.my +mil.my +name.my + +// mz : http://www.gobin.info/domainname/mz-template.doc +*.mz + +// na : http://www.na-nic.com.na/ +// http://www.info.na/domain/ +na +info.na +pro.na +name.na +school.na +or.na +dr.na +us.na +mx.na +ca.na +in.na +cc.na +tv.na +ws.na +mobi.na +co.na +com.na +org.na + +// name : has 2nd-level tlds, but there's no list of them +name + +// nc : http://www.cctld.nc/ +nc +asso.nc + +// ne : http://en.wikipedia.org/wiki/.ne +ne + +// net : http://en.wikipedia.org/wiki/.net +net + +// nf : http://en.wikipedia.org/wiki/.nf +nf +com.nf +net.nf +per.nf +rec.nf +web.nf +arts.nf +firm.nf +info.nf +other.nf +store.nf + +// ng : http://psg.com/dns/ng/ +// Submitted by registry 2008-06-17 +ac.ng +com.ng +edu.ng +gov.ng +net.ng +org.ng + +// ni : http://www.nic.ni/dominios.htm +*.ni + +// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html +// Confirmed by registry (with technical +// reservations) 2008-06-08 +nl + +// BV.nl will be a registry for dutch BV's (besloten vennootschap) +bv.nl + +// no : http://www.norid.no/regelverk/index.en.html +// The Norwegian registry has declined to notify us of updates. The web pages +// referenced below are the official source of the data. There is also an +// announce mailing list: +// https://postlister.uninett.no/sympa/info/norid-diskusjon +no +// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html +fhs.no +vgs.no +fylkesbibl.no +folkebibl.no +museum.no +idrett.no +priv.no +// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html +mil.no +stat.no +dep.no +kommune.no +herad.no +// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html +// counties +aa.no +ah.no +bu.no +fm.no +hl.no +hm.no +jan-mayen.no +mr.no +nl.no +nt.no +of.no +ol.no +oslo.no +rl.no +sf.no +st.no +svalbard.no +tm.no +tr.no +va.no +vf.no +// primary and lower secondary schools per county +gs.aa.no +gs.ah.no +gs.bu.no +gs.fm.no +gs.hl.no +gs.hm.no +gs.jan-mayen.no +gs.mr.no +gs.nl.no +gs.nt.no +gs.of.no +gs.ol.no +gs.oslo.no +gs.rl.no +gs.sf.no +gs.st.no +gs.svalbard.no +gs.tm.no +gs.tr.no +gs.va.no +gs.vf.no +// cities +akrehamn.no +åkrehamn.no +algard.no +ålgård.no +arna.no +brumunddal.no +bryne.no +bronnoysund.no +brønnøysund.no +drobak.no +drøbak.no +egersund.no +fetsund.no +floro.no +florø.no +fredrikstad.no +hokksund.no +honefoss.no +hønefoss.no +jessheim.no +jorpeland.no +jørpeland.no +kirkenes.no +kopervik.no +krokstadelva.no +langevag.no +langevåg.no +leirvik.no +mjondalen.no +mjøndalen.no +mo-i-rana.no +mosjoen.no +mosjøen.no +nesoddtangen.no +orkanger.no +osoyro.no +osøyro.no +raholt.no +råholt.no +sandnessjoen.no +sandnessjøen.no +skedsmokorset.no +slattum.no +spjelkavik.no +stathelle.no +stavern.no +stjordalshalsen.no +stjørdalshalsen.no +tananger.no +tranby.no +vossevangen.no +// communities +afjord.no +åfjord.no +agdenes.no +al.no +ål.no +alesund.no +ålesund.no +alstahaug.no +alta.no +áltá.no +alaheadju.no +álaheadju.no +alvdal.no +amli.no +åmli.no +amot.no +åmot.no +andebu.no +andoy.no +andøy.no +andasuolo.no +ardal.no +årdal.no +aremark.no +arendal.no +ås.no +aseral.no +åseral.no +asker.no +askim.no +askvoll.no +askoy.no +askøy.no +asnes.no +åsnes.no +audnedaln.no +aukra.no +aure.no +aurland.no +aurskog-holand.no +aurskog-høland.no +austevoll.no +austrheim.no +averoy.no +averøy.no +balestrand.no +ballangen.no +balat.no +bálát.no +balsfjord.no +bahccavuotna.no +báhccavuotna.no +bamble.no +bardu.no +beardu.no +beiarn.no +bajddar.no +bájddar.no +baidar.no +báidár.no +berg.no +bergen.no +berlevag.no +berlevåg.no +bearalvahki.no +bearalváhki.no +bindal.no +birkenes.no +bjarkoy.no +bjarkøy.no +bjerkreim.no +bjugn.no +bodo.no +bodø.no +badaddja.no +bådåddjå.no +budejju.no +bokn.no +bremanger.no +bronnoy.no +brønnøy.no +bygland.no +bykle.no +barum.no +bærum.no +bo.telemark.no +bø.telemark.no +bo.nordland.no +bø.nordland.no +bievat.no +bievát.no +bomlo.no +bømlo.no +batsfjord.no +båtsfjord.no +bahcavuotna.no +báhcavuotna.no +dovre.no +drammen.no +drangedal.no +dyroy.no +dyrøy.no +donna.no +dønna.no +eid.no +eidfjord.no +eidsberg.no +eidskog.no +eidsvoll.no +eigersund.no +elverum.no +enebakk.no +engerdal.no +etne.no +etnedal.no +evenes.no +evenassi.no +evenášši.no +evje-og-hornnes.no +farsund.no +fauske.no +fuossko.no +fuoisku.no +fedje.no +fet.no +finnoy.no +finnøy.no +fitjar.no +fjaler.no +fjell.no +flakstad.no +flatanger.no +flekkefjord.no +flesberg.no +flora.no +fla.no +flå.no +folldal.no +forsand.no +fosnes.no +frei.no +frogn.no +froland.no +frosta.no +frana.no +fræna.no +froya.no +frøya.no +fusa.no +fyresdal.no +forde.no +førde.no +gamvik.no +gangaviika.no +gáŋgaviika.no +gaular.no +gausdal.no +gildeskal.no +gildeskål.no +giske.no +gjemnes.no +gjerdrum.no +gjerstad.no +gjesdal.no +gjovik.no +gjøvik.no +gloppen.no +gol.no +gran.no +grane.no +granvin.no +gratangen.no +grimstad.no +grong.no +kraanghke.no +kråanghke.no +grue.no +gulen.no +hadsel.no +halden.no +halsa.no +hamar.no +hamaroy.no +habmer.no +hábmer.no +hapmir.no +hápmir.no +hammerfest.no +hammarfeasta.no +hámmárfeasta.no +haram.no +hareid.no +harstad.no +hasvik.no +aknoluokta.no +ákŋoluokta.no +hattfjelldal.no +aarborte.no +haugesund.no +hemne.no +hemnes.no +hemsedal.no +heroy.more-og-romsdal.no +herøy.møre-og-romsdal.no +heroy.nordland.no +herøy.nordland.no +hitra.no +hjartdal.no +hjelmeland.no +hobol.no +hobøl.no +hof.no +hol.no +hole.no +holmestrand.no +holtalen.no +holtålen.no +hornindal.no +horten.no +hurdal.no +hurum.no +hvaler.no +hyllestad.no +hagebostad.no +hægebostad.no +hoyanger.no +høyanger.no +hoylandet.no +høylandet.no +ha.no +hå.no +ibestad.no +inderoy.no +inderøy.no +iveland.no +jevnaker.no +jondal.no +jolster.no +jølster.no +karasjok.no +karasjohka.no +kárášjohka.no +karlsoy.no +galsa.no +gálsá.no +karmoy.no +karmøy.no +kautokeino.no +guovdageaidnu.no +klepp.no +klabu.no +klæbu.no +kongsberg.no +kongsvinger.no +kragero.no +kragerø.no +kristiansand.no +kristiansund.no +krodsherad.no +krødsherad.no +kvalsund.no +rahkkeravju.no +ráhkkerávju.no +kvam.no +kvinesdal.no +kvinnherad.no +kviteseid.no +kvitsoy.no +kvitsøy.no +kvafjord.no +kvæfjord.no +giehtavuoatna.no +kvanangen.no +kvænangen.no +navuotna.no +návuotna.no +kafjord.no +kåfjord.no +gaivuotna.no +gáivuotna.no +larvik.no +lavangen.no +lavagis.no +loabat.no +loabát.no +lebesby.no +davvesiida.no +leikanger.no +leirfjord.no +leka.no +leksvik.no +lenvik.no +leangaviika.no +leaŋgaviika.no +lesja.no +levanger.no +lier.no +lierne.no +lillehammer.no +lillesand.no +lindesnes.no +lindas.no +lindås.no +lom.no +loppa.no +lahppi.no +láhppi.no +lund.no +lunner.no +luroy.no +lurøy.no +luster.no +lyngdal.no +lyngen.no +ivgu.no +lardal.no +lerdal.no +lærdal.no +lodingen.no +lødingen.no +lorenskog.no +lørenskog.no +loten.no +løten.no +malvik.no +masoy.no +måsøy.no +muosat.no +muosát.no +mandal.no +marker.no +marnardal.no +masfjorden.no +meland.no +meldal.no +melhus.no +meloy.no +meløy.no +meraker.no +meråker.no +moareke.no +moåreke.no +midsund.no +midtre-gauldal.no +modalen.no +modum.no +molde.no +moskenes.no +moss.no +mosvik.no +malselv.no +målselv.no +malatvuopmi.no +málatvuopmi.no +namdalseid.no +aejrie.no +namsos.no +namsskogan.no +naamesjevuemie.no +nååmesjevuemie.no +laakesvuemie.no +nannestad.no +narvik.no +narviika.no +naustdal.no +nedre-eiker.no +nes.akershus.no +nes.buskerud.no +nesna.no +nesodden.no +nesseby.no +unjarga.no +unjárga.no +nesset.no +nissedal.no +nittedal.no +nord-aurdal.no +nord-fron.no +nord-odal.no +norddal.no +nordkapp.no +davvenjarga.no +davvenjárga.no +nordre-land.no +nordreisa.no +raisa.no +ráisa.no +nore-og-uvdal.no +notodden.no +naroy.no +nærøy.no +notteroy.no +nøtterøy.no +odda.no +oksnes.no +øksnes.no +oppdal.no +oppegard.no +oppegård.no +orkdal.no +orland.no +ørland.no +orskog.no +ørskog.no +orsta.no +ørsta.no +os.hedmark.no +os.hordaland.no +osen.no +osteroy.no +osterøy.no +ostre-toten.no +østre-toten.no +overhalla.no +ovre-eiker.no +øvre-eiker.no +oyer.no +øyer.no +oygarden.no +øygarden.no +oystre-slidre.no +øystre-slidre.no +porsanger.no +porsangu.no +porsáŋgu.no +porsgrunn.no +radoy.no +radøy.no +rakkestad.no +rana.no +ruovat.no +randaberg.no +rauma.no +rendalen.no +rennebu.no +rennesoy.no +rennesøy.no +rindal.no +ringebu.no +ringerike.no +ringsaker.no +rissa.no +risor.no +risør.no +roan.no +rollag.no +rygge.no +ralingen.no +rælingen.no +rodoy.no +rødøy.no +romskog.no +rømskog.no +roros.no +røros.no +rost.no +røst.no +royken.no +røyken.no +royrvik.no +røyrvik.no +rade.no +råde.no +salangen.no +siellak.no +saltdal.no +salat.no +sálát.no +sálat.no +samnanger.no +sande.more-og-romsdal.no +sande.møre-og-romsdal.no +sande.vestfold.no +sandefjord.no +sandnes.no +sandoy.no +sandøy.no +sarpsborg.no +sauda.no +sauherad.no +sel.no +selbu.no +selje.no +seljord.no +sigdal.no +siljan.no +sirdal.no +skaun.no +skedsmo.no +ski.no +skien.no +skiptvet.no +skjervoy.no +skjervøy.no +skierva.no +skiervá.no +skjak.no +skjåk.no +skodje.no +skanland.no +skånland.no +skanit.no +skánit.no +smola.no +smøla.no +snillfjord.no +snasa.no +snåsa.no +snoasa.no +snaase.no +snåase.no +sogndal.no +sokndal.no +sola.no +solund.no +songdalen.no +sortland.no +spydeberg.no +stange.no +stavanger.no +steigen.no +steinkjer.no +stjordal.no +stjørdal.no +stokke.no +stor-elvdal.no +stord.no +stordal.no +storfjord.no +omasvuotna.no +strand.no +stranda.no +stryn.no +sula.no +suldal.no +sund.no +sunndal.no +surnadal.no +sveio.no +svelvik.no +sykkylven.no +sogne.no +søgne.no +somna.no +sømna.no +sondre-land.no +søndre-land.no +sor-aurdal.no +sør-aurdal.no +sor-fron.no +sør-fron.no +sor-odal.no +sør-odal.no +sor-varanger.no +sør-varanger.no +matta-varjjat.no +mátta-várjjat.no +sorfold.no +sørfold.no +sorreisa.no +sørreisa.no +sorum.no +sørum.no +tana.no +deatnu.no +time.no +tingvoll.no +tinn.no +tjeldsund.no +dielddanuorri.no +tjome.no +tjøme.no +tokke.no +tolga.no +torsken.no +tranoy.no +tranøy.no +tromso.no +tromsø.no +tromsa.no +romsa.no +trondheim.no +troandin.no +trysil.no +trana.no +træna.no +trogstad.no +trøgstad.no +tvedestrand.no +tydal.no +tynset.no +tysfjord.no +divtasvuodna.no +divttasvuotna.no +tysnes.no +tysvar.no +tysvær.no +tonsberg.no +tønsberg.no +ullensaker.no +ullensvang.no +ulvik.no +utsira.no +vadso.no +vadsø.no +cahcesuolo.no +čáhcesuolo.no +vaksdal.no +valle.no +vang.no +vanylven.no +vardo.no +vardø.no +varggat.no +várggát.no +vefsn.no +vaapste.no +vega.no +vegarshei.no +vegårshei.no +vennesla.no +verdal.no +verran.no +vestby.no +vestnes.no +vestre-slidre.no +vestre-toten.no +vestvagoy.no +vestvågøy.no +vevelstad.no +vik.no +vikna.no +vindafjord.no +volda.no +voss.no +varoy.no +værøy.no +vagan.no +vågan.no +voagat.no +vagsoy.no +vågsøy.no +vaga.no +vågå.no +valer.ostfold.no +våler.østfold.no +valer.hedmark.no +våler.hedmark.no + +// np : http://www.mos.com.np/register.html +*.np + +// nr : http://cenpac.net.nr/dns/index.html +// Confirmed by registry 2008-06-17 +nr +biz.nr +info.nr +gov.nr +edu.nr +org.nr +net.nr +com.nr + +// nu : http://en.wikipedia.org/wiki/.nu +nu + +// nz : http://en.wikipedia.org/wiki/.nz +*.nz + +// om : http://en.wikipedia.org/wiki/.om +*.om +!mediaphone.om +!nawrastelecom.om +!nawras.om +!omanmobile.om +!omanpost.om +!omantel.om +!rakpetroleum.om +!siemens.om +!songfest.om +!statecouncil.om + +// org : http://en.wikipedia.org/wiki/.org +org + +// pa : http://www.nic.pa/ +// Some additional second level "domains" resolve directly as hostnames, such as +// pannet.pa, so we add a rule for "pa". +pa +ac.pa +gob.pa +com.pa +org.pa +sld.pa +edu.pa +net.pa +ing.pa +abo.pa +med.pa +nom.pa + +// pe : https://www.nic.pe/InformeFinalComision.pdf +pe +edu.pe +gob.pe +nom.pe +mil.pe +org.pe +com.pe +net.pe + +// pf : http://www.gobin.info/domainname/formulaire-pf.pdf +pf +com.pf +org.pf +edu.pf + +// pg : http://en.wikipedia.org/wiki/.pg +*.pg + +// ph : http://www.domains.ph/FAQ2.asp +// Submitted by registry 2008-06-13 +ph +com.ph +net.ph +org.ph +gov.ph +edu.ph +ngo.ph +mil.ph +i.ph + +// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK +pk +com.pk +net.pk +edu.pk +org.pk +fam.pk +biz.pk +web.pk +gov.pk +gob.pk +gok.pk +gon.pk +gop.pk +gos.pk +info.pk + +// pl : http://www.dns.pl/english/ +pl +// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html +aid.pl +agro.pl +atm.pl +auto.pl +biz.pl +com.pl +edu.pl +gmina.pl +gsm.pl +info.pl +mail.pl +miasta.pl +media.pl +mil.pl +net.pl +nieruchomosci.pl +nom.pl +org.pl +pc.pl +powiat.pl +priv.pl +realestate.pl +rel.pl +sex.pl +shop.pl +sklep.pl +sos.pl +szkola.pl +targi.pl +tm.pl +tourism.pl +travel.pl +turystyka.pl +// ICM functional domains (icm.edu.pl) +6bone.pl +art.pl +mbone.pl +// Government domains (administred by ippt.gov.pl) +gov.pl +uw.gov.pl +um.gov.pl +ug.gov.pl +upow.gov.pl +starostwo.gov.pl +so.gov.pl +sr.gov.pl +po.gov.pl +pa.gov.pl +// other functional domains +ngo.pl +irc.pl +usenet.pl +// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html +augustow.pl +babia-gora.pl +bedzin.pl +beskidy.pl +bialowieza.pl +bialystok.pl +bielawa.pl +bieszczady.pl +boleslawiec.pl +bydgoszcz.pl +bytom.pl +cieszyn.pl +czeladz.pl +czest.pl +dlugoleka.pl +elblag.pl +elk.pl +glogow.pl +gniezno.pl +gorlice.pl +grajewo.pl +ilawa.pl +jaworzno.pl +jelenia-gora.pl +jgora.pl +kalisz.pl +kazimierz-dolny.pl +karpacz.pl +kartuzy.pl +kaszuby.pl +katowice.pl +kepno.pl +ketrzyn.pl +klodzko.pl +kobierzyce.pl +kolobrzeg.pl +konin.pl +konskowola.pl +kutno.pl +lapy.pl +lebork.pl +legnica.pl +lezajsk.pl +limanowa.pl +lomza.pl +lowicz.pl +lubin.pl +lukow.pl +malbork.pl +malopolska.pl +mazowsze.pl +mazury.pl +mielec.pl +mielno.pl +mragowo.pl +naklo.pl +nowaruda.pl +nysa.pl +olawa.pl +olecko.pl +olkusz.pl +olsztyn.pl +opoczno.pl +opole.pl +ostroda.pl +ostroleka.pl +ostrowiec.pl +ostrowwlkp.pl +pila.pl +pisz.pl +podhale.pl +podlasie.pl +polkowice.pl +pomorze.pl +pomorskie.pl +prochowice.pl +pruszkow.pl +przeworsk.pl +pulawy.pl +radom.pl +rawa-maz.pl +rybnik.pl +rzeszow.pl +sanok.pl +sejny.pl +siedlce.pl +slask.pl +slupsk.pl +sosnowiec.pl +stalowa-wola.pl +skoczow.pl +starachowice.pl +stargard.pl +suwalki.pl +swidnica.pl +swiebodzin.pl +swinoujscie.pl +szczecin.pl +szczytno.pl +tarnobrzeg.pl +tgory.pl +turek.pl +tychy.pl +ustka.pl +walbrzych.pl +warmia.pl +warszawa.pl +waw.pl +wegrow.pl +wielun.pl +wlocl.pl +wloclawek.pl +wodzislaw.pl +wolomin.pl +wroclaw.pl +zachpomor.pl +zagan.pl +zarow.pl +zgora.pl +zgorzelec.pl +// TASK geographical domains (www.task.gda.pl/uslugi/dns) +gda.pl +gdansk.pl +gdynia.pl +med.pl +sopot.pl +// other geographical domains +gliwice.pl +krakow.pl +poznan.pl +wroc.pl +zakopane.pl + +// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +pm + +// pn : http://www.government.pn/PnRegistry/policies.htm +pn +gov.pn +co.pn +org.pn +edu.pn +net.pn + +// pr : http://www.nic.pr/index.asp?f=1 +pr +com.pr +net.pr +org.pr +gov.pr +edu.pr +isla.pr +pro.pr +biz.pr +info.pr +name.pr +// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr +est.pr +prof.pr +ac.pr + +// pro : http://www.nic.pro/support_faq.htm +pro +aca.pro +bar.pro +cpa.pro +jur.pro +law.pro +med.pro +eng.pro + +// ps : http://en.wikipedia.org/wiki/.ps +// http://www.nic.ps/registration/policy.html#reg +ps +edu.ps +gov.ps +sec.ps +plo.ps +com.ps +org.ps +net.ps + +// pt : http://online.dns.pt/dns/start_dns +pt +net.pt +gov.pt +org.pt +edu.pt +int.pt +publ.pt +com.pt +nome.pt + +// pw : http://en.wikipedia.org/wiki/.pw +pw +co.pw +ne.pw +or.pw +ed.pw +go.pw +belau.pw + +// py : http://www.nic.py/faq_a.html#faq_b +*.py + +// qa : http://domains.qa/en/ +qa +com.qa +edu.qa +gov.qa +mil.qa +name.qa +net.qa +org.qa +sch.qa + +// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs +re +com.re +asso.re +nom.re + +// ro : http://www.rotld.ro/ +ro +com.ro +org.ro +tm.ro +nt.ro +nom.ro +info.ro +rec.ro +arts.ro +firm.ro +store.ro +www.ro + +// rs : http://en.wikipedia.org/wiki/.rs +rs +co.rs +org.rs +edu.rs +ac.rs +gov.rs +in.rs + +// ru : http://www.cctld.ru/ru/docs/aktiv_8.php +// Industry domains +ru +ac.ru +com.ru +edu.ru +int.ru +net.ru +org.ru +pp.ru +// Geographical domains +adygeya.ru +altai.ru +amur.ru +arkhangelsk.ru +astrakhan.ru +bashkiria.ru +belgorod.ru +bir.ru +bryansk.ru +buryatia.ru +cbg.ru +chel.ru +chelyabinsk.ru +chita.ru +chukotka.ru +chuvashia.ru +dagestan.ru +dudinka.ru +e-burg.ru +grozny.ru +irkutsk.ru +ivanovo.ru +izhevsk.ru +jar.ru +joshkar-ola.ru +kalmykia.ru +kaluga.ru +kamchatka.ru +karelia.ru +kazan.ru +kchr.ru +kemerovo.ru +khabarovsk.ru +khakassia.ru +khv.ru +kirov.ru +koenig.ru +komi.ru +kostroma.ru +krasnoyarsk.ru +kuban.ru +kurgan.ru +kursk.ru +lipetsk.ru +magadan.ru +mari.ru +mari-el.ru +marine.ru +mordovia.ru +mosreg.ru +msk.ru +murmansk.ru +nalchik.ru +nnov.ru +nov.ru +novosibirsk.ru +nsk.ru +omsk.ru +orenburg.ru +oryol.ru +palana.ru +penza.ru +perm.ru +pskov.ru +ptz.ru +rnd.ru +ryazan.ru +sakhalin.ru +samara.ru +saratov.ru +simbirsk.ru +smolensk.ru +spb.ru +stavropol.ru +stv.ru +surgut.ru +tambov.ru +tatarstan.ru +tom.ru +tomsk.ru +tsaritsyn.ru +tsk.ru +tula.ru +tuva.ru +tver.ru +tyumen.ru +udm.ru +udmurtia.ru +ulan-ude.ru +vladikavkaz.ru +vladimir.ru +vladivostok.ru +volgograd.ru +vologda.ru +voronezh.ru +vrn.ru +vyatka.ru +yakutia.ru +yamal.ru +yaroslavl.ru +yekaterinburg.ru +yuzhno-sakhalinsk.ru +// More geographical domains +amursk.ru +baikal.ru +cmw.ru +fareast.ru +jamal.ru +kms.ru +k-uralsk.ru +kustanai.ru +kuzbass.ru +magnitka.ru +mytis.ru +nakhodka.ru +nkz.ru +norilsk.ru +oskol.ru +pyatigorsk.ru +rubtsovsk.ru +snz.ru +syzran.ru +vdonsk.ru +zgrad.ru +// State domains +gov.ru +mil.ru +// Technical domains +test.ru + +// rw : http://www.nic.rw/cgi-bin/policy.pl +rw +gov.rw +net.rw +edu.rw +ac.rw +com.rw +co.rw +int.rw +mil.rw +gouv.rw + +// sa : http://www.nic.net.sa/ +sa +com.sa +net.sa +org.sa +gov.sa +med.sa +pub.sa +edu.sa +sch.sa + +// sb : http://www.sbnic.net.sb/ +// Submitted by registry 2008-06-08 +sb +com.sb +edu.sb +gov.sb +net.sb +org.sb + +// sc : http://www.nic.sc/ +sc +com.sc +gov.sc +net.sc +org.sc +edu.sc + +// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm +// Submitted by registry 2008-06-17 +sd +com.sd +net.sd +org.sd +edu.sd +med.sd +gov.sd +info.sd + +// se : http://en.wikipedia.org/wiki/.se +// Submitted by registry 2008-06-24 +se +a.se +ac.se +b.se +bd.se +brand.se +c.se +d.se +e.se +f.se +fh.se +fhsk.se +fhv.se +g.se +h.se +i.se +k.se +komforb.se +kommunalforbund.se +komvux.se +l.se +lanbib.se +m.se +n.se +naturbruksgymn.se +o.se +org.se +p.se +parti.se +pp.se +press.se +r.se +s.se +sshn.se +t.se +tm.se +u.se +w.se +x.se +y.se +z.se + +// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html +sg +com.sg +net.sg +org.sg +gov.sg +edu.sg +per.sg + +// sh : http://www.nic.sh/rules.html +// list of 2nd level domains ? +sh + +// si : http://en.wikipedia.org/wiki/.si +si + +// sj : No registrations at this time. +// Submitted by registry 2008-06-16 + +// sk : http://en.wikipedia.org/wiki/.sk +// list of 2nd level domains ? +sk + +// sl : http://www.nic.sl +// Submitted by registry 2008-06-12 +sl +com.sl +net.sl +edu.sl +gov.sl +org.sl + +// sm : http://en.wikipedia.org/wiki/.sm +sm + +// sn : http://en.wikipedia.org/wiki/.sn +sn +art.sn +com.sn +edu.sn +gouv.sn +org.sn +perso.sn +univ.sn + +// so : http://www.soregistry.com/ +so +com.so +net.so +org.so + +// sr : http://en.wikipedia.org/wiki/.sr +sr + +// st : http://www.nic.st/html/policyrules/ +st +co.st +com.st +consulado.st +edu.st +embaixada.st +gov.st +mil.st +net.st +org.st +principe.st +saotome.st +store.st + +// su : http://en.wikipedia.org/wiki/.su +su + +// sv : http://www.svnet.org.sv/svpolicy.html +*.sv + +// sy : http://en.wikipedia.org/wiki/.sy +// see also: http://www.gobin.info/domainname/sy.doc +sy +edu.sy +gov.sy +net.sy +mil.sy +com.sy +org.sy + +// sz : http://en.wikipedia.org/wiki/.sz +// http://www.sispa.org.sz/ +sz +co.sz +ac.sz +org.sz + +// tc : http://en.wikipedia.org/wiki/.tc +tc + +// td : http://en.wikipedia.org/wiki/.td +td + +// tel: http://en.wikipedia.org/wiki/.tel +// http://www.telnic.org/ +tel + +// tf : http://en.wikipedia.org/wiki/.tf +tf + +// tg : http://en.wikipedia.org/wiki/.tg +// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains, +// although this contradicts wikipedia. +tg + +// th : http://en.wikipedia.org/wiki/.th +// Submitted by registry 2008-06-17 +th +ac.th +co.th +go.th +in.th +mi.th +net.th +or.th + +// tj : http://www.nic.tj/policy.htm +tj +ac.tj +biz.tj +co.tj +com.tj +edu.tj +go.tj +gov.tj +int.tj +mil.tj +name.tj +net.tj +nic.tj +org.tj +test.tj +web.tj + +// tk : http://en.wikipedia.org/wiki/.tk +tk + +// tl : http://en.wikipedia.org/wiki/.tl +tl +gov.tl + +// tm : http://www.nic.tm/rules.html +// list of 2nd level tlds ? +tm + +// tn : http://en.wikipedia.org/wiki/.tn +// http://whois.ati.tn/ +tn +com.tn +ens.tn +fin.tn +gov.tn +ind.tn +intl.tn +nat.tn +net.tn +org.tn +info.tn +perso.tn +tourism.tn +edunet.tn +rnrt.tn +rns.tn +rnu.tn +mincom.tn +agrinet.tn +defense.tn +turen.tn + +// to : http://en.wikipedia.org/wiki/.to +// Submitted by registry 2008-06-17 +to +com.to +gov.to +net.to +org.to +edu.to +mil.to + +// tr : http://en.wikipedia.org/wiki/.tr +*.tr +!nic.tr +// Used by government in the TRNC +// http://en.wikipedia.org/wiki/.nc.tr +gov.nc.tr + +// travel : http://en.wikipedia.org/wiki/.travel +travel + +// tt : http://www.nic.tt/ +tt +co.tt +com.tt +org.tt +net.tt +biz.tt +info.tt +pro.tt +int.tt +coop.tt +jobs.tt +mobi.tt +travel.tt +museum.tt +aero.tt +name.tt +gov.tt +edu.tt + +// tv : http://en.wikipedia.org/wiki/.tv +// Not listing any 2LDs as reserved since none seem to exist in practice, +// Wikipedia notwithstanding. +tv + +// tw : http://en.wikipedia.org/wiki/.tw +tw +edu.tw +gov.tw +mil.tw +com.tw +net.tw +org.tw +idv.tw +game.tw +ebiz.tw +club.tw +網路.tw +組織.tw +商業.tw + +// tz : http://en.wikipedia.org/wiki/.tz +// Submitted by registry 2008-06-17 +// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25 +ac.tz +co.tz +go.tz +mil.tz +ne.tz +or.tz +sc.tz + +// ua : http://www.nic.net.ua/ +ua +com.ua +edu.ua +gov.ua +in.ua +net.ua +org.ua +// ua geo-names +cherkassy.ua +chernigov.ua +chernovtsy.ua +ck.ua +cn.ua +crimea.ua +cv.ua +dn.ua +dnepropetrovsk.ua +donetsk.ua +dp.ua +if.ua +ivano-frankivsk.ua +kh.ua +kharkov.ua +kherson.ua +khmelnitskiy.ua +kiev.ua +kirovograd.ua +km.ua +kr.ua +ks.ua +kv.ua +lg.ua +lugansk.ua +lutsk.ua +lviv.ua +mk.ua +nikolaev.ua +od.ua +odessa.ua +pl.ua +poltava.ua +rovno.ua +rv.ua +sebastopol.ua +sumy.ua +te.ua +ternopil.ua +uzhgorod.ua +vinnica.ua +vn.ua +zaporizhzhe.ua +zp.ua +zhitomir.ua +zt.ua + +// Private registries in .ua +co.ua +pp.ua + +// ug : http://www.registry.co.ug/ +ug +co.ug +ac.ug +sc.ug +go.ug +ne.ug +or.ug + +// uk : http://en.wikipedia.org/wiki/.uk +*.uk +*.sch.uk +!bl.uk +!british-library.uk +!icnet.uk +!jet.uk +!mod.uk +!nel.uk +!nhs.uk +!nic.uk +!nls.uk +!national-library-scotland.uk +!parliament.uk +!police.uk + +// us : http://en.wikipedia.org/wiki/.us +us +dni.us +fed.us +isa.us +kids.us +nsn.us +// us geographic names +ak.us +al.us +ar.us +as.us +az.us +ca.us +co.us +ct.us +dc.us +de.us +fl.us +ga.us +gu.us +hi.us +ia.us +id.us +il.us +in.us +ks.us +ky.us +la.us +ma.us +md.us +me.us +mi.us +mn.us +mo.us +ms.us +mt.us +nc.us +nd.us +ne.us +nh.us +nj.us +nm.us +nv.us +ny.us +oh.us +ok.us +or.us +pa.us +pr.us +ri.us +sc.us +sd.us +tn.us +tx.us +ut.us +vi.us +vt.us +va.us +wa.us +wi.us +wv.us +wy.us +// The registrar notes several more specific domains available in each state, +// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat +// haphazard; in some states these domains resolve as addresses, while in others +// only subdomains are available, or even nothing at all. We include the +// most common ones where it's clear that different sites are different +// entities. +k12.ak.us +k12.al.us +k12.ar.us +k12.as.us +k12.az.us +k12.ca.us +k12.co.us +k12.ct.us +k12.dc.us +k12.de.us +k12.fl.us +k12.ga.us +k12.gu.us +// k12.hi.us Hawaii has a state-wide DOE login: bug 614565 +k12.ia.us +k12.id.us +k12.il.us +k12.in.us +k12.ks.us +k12.ky.us +k12.la.us +k12.ma.us +k12.md.us +k12.me.us +k12.mi.us +k12.mn.us +k12.mo.us +k12.ms.us +k12.mt.us +k12.nc.us +k12.nd.us +k12.ne.us +k12.nh.us +k12.nj.us +k12.nm.us +k12.nv.us +k12.ny.us +k12.oh.us +k12.ok.us +k12.or.us +k12.pa.us +k12.pr.us +k12.ri.us +k12.sc.us +k12.sd.us +k12.tn.us +k12.tx.us +k12.ut.us +k12.vi.us +k12.vt.us +k12.va.us +k12.wa.us +k12.wi.us +k12.wv.us +k12.wy.us + +cc.ak.us +cc.al.us +cc.ar.us +cc.as.us +cc.az.us +cc.ca.us +cc.co.us +cc.ct.us +cc.dc.us +cc.de.us +cc.fl.us +cc.ga.us +cc.gu.us +cc.hi.us +cc.ia.us +cc.id.us +cc.il.us +cc.in.us +cc.ks.us +cc.ky.us +cc.la.us +cc.ma.us +cc.md.us +cc.me.us +cc.mi.us +cc.mn.us +cc.mo.us +cc.ms.us +cc.mt.us +cc.nc.us +cc.nd.us +cc.ne.us +cc.nh.us +cc.nj.us +cc.nm.us +cc.nv.us +cc.ny.us +cc.oh.us +cc.ok.us +cc.or.us +cc.pa.us +cc.pr.us +cc.ri.us +cc.sc.us +cc.sd.us +cc.tn.us +cc.tx.us +cc.ut.us +cc.vi.us +cc.vt.us +cc.va.us +cc.wa.us +cc.wi.us +cc.wv.us +cc.wy.us + +lib.ak.us +lib.al.us +lib.ar.us +lib.as.us +lib.az.us +lib.ca.us +lib.co.us +lib.ct.us +lib.dc.us +lib.de.us +lib.fl.us +lib.ga.us +lib.gu.us +lib.hi.us +lib.ia.us +lib.id.us +lib.il.us +lib.in.us +lib.ks.us +lib.ky.us +lib.la.us +lib.ma.us +lib.md.us +lib.me.us +lib.mi.us +lib.mn.us +lib.mo.us +lib.ms.us +lib.mt.us +lib.nc.us +lib.nd.us +lib.ne.us +lib.nh.us +lib.nj.us +lib.nm.us +lib.nv.us +lib.ny.us +lib.oh.us +lib.ok.us +lib.or.us +lib.pa.us +lib.pr.us +lib.ri.us +lib.sc.us +lib.sd.us +lib.tn.us +lib.tx.us +lib.ut.us +lib.vi.us +lib.vt.us +lib.va.us +lib.wa.us +lib.wi.us +lib.wv.us +lib.wy.us + +// k12.ma.us contains school districts in Massachusetts. The 4LDs are +// managed indepedently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated dorectly to the +// 5LD operators. +pvt.k12.ma.us +chtr.k12.ma.us +paroch.k12.ma.us + +// uy : http://www.antel.com.uy/ +*.uy + +// uz : http://www.reg.uz/registerr.html +// are there other 2nd level tlds ? +uz +com.uz +co.uz + +// va : http://en.wikipedia.org/wiki/.va +va + +// vc : http://en.wikipedia.org/wiki/.vc +// Submitted by registry 2008-06-13 +vc +com.vc +net.vc +org.vc +gov.vc +mil.vc +edu.vc + +// ve : http://registro.nic.ve/nicve/registro/index.html +*.ve + +// vg : http://en.wikipedia.org/wiki/.vg +vg + +// vi : http://www.nic.vi/newdomainform.htm +// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other +// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they +// are available for registration (which they do not seem to be). +vi +co.vi +com.vi +k12.vi +net.vi +org.vi + +// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp +vn +com.vn +net.vn +org.vn +edu.vn +gov.vn +int.vn +ac.vn +biz.vn +info.vn +name.vn +pro.vn +health.vn + +// vu : http://en.wikipedia.org/wiki/.vu +// list of 2nd level tlds ? +vu + +// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +wf + +// ws : http://en.wikipedia.org/wiki/.ws +// http://samoanic.ws/index.dhtml +ws +com.ws +net.ws +org.ws +gov.ws +edu.ws + +// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +yt + +// IDN ccTLDs +// Please sort by ISO 3166 ccTLD, then punicode string +// when submitting patches and follow this format: +// ("" ) : +// [optional sponsoring org] +// + +// xn--mgbaam7a8h ("Emerat" Arabic) : AE +//http://nic.ae/english/arabicdomain/rules.jsp +امارات + +// xn--54b7fta0cc ("Bangla" Bangla) : BD +বাংলা + +// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +中国 + +// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +中國 + +// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ +الجزائر + +// xn--wgbh1c ("Egypt" Arabic .masr) : EG +// http://www.dotmasr.eg/ +مصر + +// xn--node ("ge" Georgian (Mkhedruli)) : GE +გე + +// xn--j6w193g ("Hong Kong" Chinese-Han) : HK +// https://www2.hkirc.hk/register/rules.jsp +香港 + +// xn--h2brj9c ("Bharat" Devanagari) : IN +// India +भारत + +// xn--mgbbh1a71e ("Bharat" Arabic) : IN +// India +بھارت + +// xn--fpcrj9c3d ("Bharat" Telugu) : IN +// India +భారత్ + +// xn--gecrj9c ("Bharat" Gujarati) : IN +// India +ભારત + +// xn--s9brj9c ("Bharat" Gurmukhi) : IN +// India +ਭਾਰਤ + +// xn--45brj9c ("Bharat" Bengali) : IN +// India +ভারত + +// xn--xkc2dl3a5ee0h ("India" Tamil) : IN +// India +இந்தியா + +// xn--mgba3a4f16a ("Iran" Persian) : IR +ایران + +// xn--mgba3a4fra ("Iran" Arabic) : IR +ايران + +//xn--mgbayh7gpa ("al-Ordon" Arabic) JO +//National Information Technology Center (NITC) +//Royal Scientific Society, Al-Jubeiha +الاردن + +// xn--3e0b707e ("Republic of Korea" Hangul) : KR +한국 + +// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK +// http://nic.lk +ලංකා + +// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK +// http://nic.lk +இலங்கை + +// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA +المغرب + +// xn--mgb9awbf ("Oman" Arabic) : OM +عمان + +// xn--ygbi2ammx ("Falasteen" Arabic) : PS +// The Palestinian National Internet Naming Authority (PNINA) +// http://www.pnina.ps +فلسطين + +// xn--90a3ac ("srb" Cyrillic) : RS +срб + +// xn--p1ai ("rf" Russian-Cyrillic) : RU +// http://www.cctld.ru/en/docs/rulesrf.php +рф + +// xn--wgbl6a ("Qatar" Arabic) : QA +// http://www.ict.gov.qa/ +قطر + +// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA +// http://www.nic.net.sa/ +السعودية + +// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA +السعودیة + +// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA +السعودیۃ + +// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA +السعوديه + +// xn--ogbpf8fl ("Syria" Arabic) : SY +سورية + +// xn--mgbtf8fl ("Syria" Arabic) variant : SY +سوريا + +// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG +新加坡 + +// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG +சிங்கப்பூர் + +// xn--o3cw4h ("Thai" Thai) : TH +// http://www.thnic.co.th +ไทย + +// xn--pgbs0dh ("Tunis") : TN +// http://nic.tn +تونس + +// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台灣 + +// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台湾 + +// xn--nnx388a ("Taiwan") variant : TW +臺灣 + +// xn--j1amh ("ukr" Cyrillic) : UA +укр + +// xn--mgb2ddes ("AlYemen" Arabic) : YE +اليمن + +// xxx : http://icmregistry.com +xxx + +// ye : http://www.y.net.ye/services/domain_name.htm +*.ye + +// za : http://www.zadna.org.za/slds.html +*.za + +// zm : http://en.wikipedia.org/wiki/.zm +*.zm + +// zw : http://en.wikipedia.org/wiki/.zw +*.zw + +// ===END ICANN DOMAINS=== +// ===BEGIN PRIVATE DOMAINS=== + +// info.at : http://www.info.at/ +biz.at +info.at + +// priv.at : http://www.nic.priv.at/ +// Submitted by registry 2008-06-09 +priv.at + +// co.ca : http://registry.co.ca +co.ca + +// CentralNic : http://www.centralnic.com/names/domains +// Confirmed by registry 2008-06-09 +ar.com +br.com +cn.com +de.com +eu.com +gb.com +gr.com +hu.com +jpn.com +kr.com +no.com +qc.com +ru.com +sa.com +se.com +uk.com +us.com +uy.com +za.com +gb.net +jp.net +se.net +uk.net +ae.org +us.org +com.de + +// Opera Software, A.S.A. +// Requested by Yngve Pettersen 2009-11-26 +operaunite.com + +// Google, Inc. +// Requested by Eduardo Vela 2010-09-06 +appspot.com + +// iki.fi : Submitted by Hannu Aronsson 2009-11-05 +iki.fi + +// c.la : http://www.c.la/ +c.la + +// ZaNiC : http://www.za.net/ +// Confirmed by registry 2009-10-03 +za.net +za.org + +// CoDNS B.V. +// Added 2010-05-23. +co.nl +co.no + +// Mainseek Sp. z o.o. : http://www.co.pl/ +co.pl + +// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ +dyndns-at-home.com +dyndns-at-work.com +dyndns-blog.com +dyndns-free.com +dyndns-home.com +dyndns-ip.com +dyndns-mail.com +dyndns-office.com +dyndns-pics.com +dyndns-remote.com +dyndns-server.com +dyndns-web.com +dyndns-wiki.com +dyndns-work.com +dyndns.biz +dyndns.info +dyndns.org +dyndns.tv +at-band-camp.net +ath.cx +barrel-of-knowledge.info +barrell-of-knowledge.info +better-than.tv +blogdns.com +blogdns.net +blogdns.org +blogsite.org +boldlygoingnowhere.org +broke-it.net +buyshouses.net +cechire.com +dnsalias.com +dnsalias.net +dnsalias.org +dnsdojo.com +dnsdojo.net +dnsdojo.org +does-it.net +doesntexist.com +doesntexist.org +dontexist.com +dontexist.net +dontexist.org +doomdns.com +doomdns.org +dvrdns.org +dyn-o-saur.com +dynalias.com +dynalias.net +dynalias.org +dynathome.net +dyndns.ws +endofinternet.net +endofinternet.org +endoftheinternet.org +est-a-la-maison.com +est-a-la-masion.com +est-le-patron.com +est-mon-blogueur.com +for-better.biz +for-more.biz +for-our.info +for-some.biz +for-the.biz +forgot.her.name +forgot.his.name +from-ak.com +from-al.com +from-ar.com +from-az.net +from-ca.com +from-co.net +from-ct.com +from-dc.com +from-de.com +from-fl.com +from-ga.com +from-hi.com +from-ia.com +from-id.com +from-il.com +from-in.com +from-ks.com +from-ky.com +from-la.net +from-ma.com +from-md.com +from-me.org +from-mi.com +from-mn.com +from-mo.com +from-ms.com +from-mt.com +from-nc.com +from-nd.com +from-ne.com +from-nh.com +from-nj.com +from-nm.com +from-nv.com +from-ny.net +from-oh.com +from-ok.com +from-or.com +from-pa.com +from-pr.com +from-ri.com +from-sc.com +from-sd.com +from-tn.com +from-tx.com +from-ut.com +from-va.com +from-vt.com +from-wa.com +from-wi.com +from-wv.com +from-wy.com +ftpaccess.cc +fuettertdasnetz.de +game-host.org +game-server.cc +getmyip.com +gets-it.net +go.dyndns.org +gotdns.com +gotdns.org +groks-the.info +groks-this.info +ham-radio-op.net +here-for-more.info +hobby-site.com +hobby-site.org +home.dyndns.org +homedns.org +homeftp.net +homeftp.org +homeip.net +homelinux.com +homelinux.net +homelinux.org +homeunix.com +homeunix.net +homeunix.org +iamallama.com +in-the-band.net +is-a-anarchist.com +is-a-blogger.com +is-a-bookkeeper.com +is-a-bruinsfan.org +is-a-bulls-fan.com +is-a-candidate.org +is-a-caterer.com +is-a-celticsfan.org +is-a-chef.com +is-a-chef.net +is-a-chef.org +is-a-conservative.com +is-a-cpa.com +is-a-cubicle-slave.com +is-a-democrat.com +is-a-designer.com +is-a-doctor.com +is-a-financialadvisor.com +is-a-geek.com +is-a-geek.net +is-a-geek.org +is-a-green.com +is-a-guru.com +is-a-hard-worker.com +is-a-hunter.com +is-a-knight.org +is-a-landscaper.com +is-a-lawyer.com +is-a-liberal.com +is-a-libertarian.com +is-a-linux-user.org +is-a-llama.com +is-a-musician.com +is-a-nascarfan.com +is-a-nurse.com +is-a-painter.com +is-a-patsfan.org +is-a-personaltrainer.com +is-a-photographer.com +is-a-player.com +is-a-republican.com +is-a-rockstar.com +is-a-socialist.com +is-a-soxfan.org +is-a-student.com +is-a-teacher.com +is-a-techie.com +is-a-therapist.com +is-an-accountant.com +is-an-actor.com +is-an-actress.com +is-an-anarchist.com +is-an-artist.com +is-an-engineer.com +is-an-entertainer.com +is-by.us +is-certified.com +is-found.org +is-gone.com +is-into-anime.com +is-into-cars.com +is-into-cartoons.com +is-into-games.com +is-leet.com +is-lost.org +is-not-certified.com +is-saved.org +is-slick.com +is-uberleet.com +is-very-bad.org +is-very-evil.org +is-very-good.org +is-very-nice.org +is-very-sweet.org +is-with-theband.com +isa-geek.com +isa-geek.net +isa-geek.org +isa-hockeynut.com +issmarterthanyou.com +isteingeek.de +istmein.de +kicks-ass.net +kicks-ass.org +knowsitall.info +land-4-sale.us +lebtimnetz.de +leitungsen.de +likes-pie.com +likescandy.com +merseine.nu +mine.nu +misconfused.org +mypets.ws +myphotos.cc +neat-url.com +office-on-the.net +on-the-web.tv +podzone.net +podzone.org +readmyblog.org +saves-the-whales.com +scrapper-site.net +scrapping.cc +selfip.biz +selfip.com +selfip.info +selfip.net +selfip.org +sells-for-less.com +sells-for-u.com +sells-it.net +sellsyourhome.org +servebbs.com +servebbs.net +servebbs.org +serveftp.net +serveftp.org +servegame.org +shacknet.nu +simple-url.com +space-to-rent.com +stuff-4-sale.org +stuff-4-sale.us +teaches-yoga.com +thruhere.net +traeumtgerade.de +webhop.biz +webhop.info +webhop.net +webhop.org +worse-than.tv +writesthisblog.com + +// ===END PRIVATE DOMAINS=== diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js new file mode 100644 index 00000000..3cce815e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js @@ -0,0 +1,1340 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +var vows = require('vows'); +var assert = require('assert'); +var async = require('async'); + +// NOTE use require("tough-cookie") in your own code: +var tough = require('./lib/cookie'); +var Cookie = tough.Cookie; +var CookieJar = tough.CookieJar; + + +function dateVows(table) { + var theVows = { }; + var keys = Object.keys(table).forEach(function(date) { + var expect = table[date]; + theVows[date] = function() { + var got = tough.parseDate(date) ? 'valid' : 'invalid'; + assert.equal(got, expect ? 'valid' : 'invalid'); + }; + }); + return { "date parsing": theVows }; +} + +function matchVows(func,table) { + var theVows = {}; + table.forEach(function(item) { + var str = item[0]; + var dom = item[1]; + var expect = item[2]; + var label = str+(expect?" matches ":" doesn't match ")+dom; + theVows[label] = function() { + assert.equal(func(str,dom),expect); + }; + }); + return theVows; +} + +function defaultPathVows(table) { + var theVows = {}; + table.forEach(function(item) { + var str = item[0]; + var expect = item[1]; + var label = str+" gives "+expect; + theVows[label] = function() { + assert.equal(tough.defaultPath(str),expect); + }; + }); + return theVows; +} + +var atNow = Date.now(); +function at(offset) { return {now: new Date(atNow+offset)} } + +vows.describe('Cookie Jar') +.addBatch({ + "all defined": function() { + assert.ok(Cookie); + assert.ok(CookieJar); + }, +}) +.addBatch( + dateVows({ + "Wed, 09 Jun 2021 10:18:14 GMT": true, + "Wed, 09 Jun 2021 22:18:14 GMT": true, + "Tue, 18 Oct 2011 07:42:42.123 GMT": true, + "18 Oct 2011 07:42:42 GMT": true, + "8 Oct 2011 7:42:42 GMT": true, + "8 Oct 2011 7:2:42 GMT": false, + "Oct 18 2011 07:42:42 GMT": true, + "Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)": true, + "09 Jun 2021 10:18:14 GMT": true, + "99 Jix 3038 48:86:72 ZMT": false, + '01 Jan 1970 00:00:00 GMT': true, + '01 Jan 1600 00:00:00 GMT': false, // before 1601 + '01 Jan 1601 00:00:00 GMT': true, + '10 Feb 81 13:00:00 GMT': true, // implicit year + 'Thu, 01 Jan 1970 00:00:010 GMT': true, // strange time, non-strict OK + 'Thu, 17-Apr-2014 02:12:29 GMT': true, // dashes + 'Thu, 17-Apr-2014 02:12:29 UTC': true, // dashes and UTC + }) +) +.addBatch({ + "strict date parse of Thu, 01 Jan 1970 00:00:010 GMT": { + topic: function() { + return tough.parseDate('Thu, 01 Jan 1970 00:00:010 GMT', true) ? true : false; + }, + "invalid": function(date) { + assert.equal(date,false); + }, + } +}) +.addBatch({ + "formatting": { + "a simple cookie": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b'); + }, + }, + "a cookie with spaces in the value": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'beta gamma'; + return c; + }, + "doesn't validate": function(c) { + assert.ok(!c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a="beta gamma"'); + }, + }, + "with an empty value and HttpOnly": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.httpOnly = true; + return c; + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=; HttpOnly'); + } + }, + "with an expiry": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT'); + }, + "to short string": function(c) { + assert.equal(c.cookieString(), 'a=b'); + }, + }, + "with a max-age": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + c.maxAge = 12345; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); // mabe this one *shouldn't*? + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345'); + }, + }, + "with a bunch of things": function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + c.maxAge = 12345; + c.domain = 'example.com'; + c.path = '/foo'; + c.secure = true; + c.httpOnly = true; + c.extensions = ['MyExtension']; + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345; Domain=example.com; Path=/foo; Secure; HttpOnly; MyExtension'); + }, + "a host-only cookie": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.hostOnly = true; + c.domain = 'shouldnt-stringify.example.com'; + c.path = '/should-stringify'; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Path=/should-stringify'); + }, + }, + "minutes are '10'": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.expires = new Date(1284113410000); + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + var str = c.toString(); + assert.notEqual(str, 'a=b; Expires=Fri, 010 Sep 2010 010:010:010 GMT'); + assert.equal(str, 'a=b; Expires=Fri, 10 Sep 2010 10:10:10 GMT'); + }, + } + } +}) +.addBatch({ + "TTL with max-age": function() { + var c = new Cookie(); + c.maxAge = 123; + assert.equal(c.TTL(), 123000); + assert.equal(c.expiryTime(new Date(9000000)), 9123000); + }, + "TTL with zero max-age": function() { + var c = new Cookie(); + c.key = 'a'; c.value = 'b'; + c.maxAge = 0; // should be treated as "earliest representable" + assert.equal(c.TTL(), 0); + assert.equal(c.expiryTime(new Date(9000000)), -Infinity); + assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT + }, + "TTL with negative max-age": function() { + var c = new Cookie(); + c.key = 'a'; c.value = 'b'; + c.maxAge = -1; // should be treated as "earliest representable" + assert.equal(c.TTL(), 0); + assert.equal(c.expiryTime(new Date(9000000)), -Infinity); + assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT + }, + "TTL with max-age and expires": function() { + var c = new Cookie(); + c.maxAge = 123; + c.expires = new Date(Date.now()+9000); + assert.equal(c.TTL(), 123000); + assert.ok(c.isPersistent()); + }, + "TTL with expires": function() { + var c = new Cookie(); + var now = Date.now(); + c.expires = new Date(now+9000); + assert.equal(c.TTL(now), 9000); + assert.equal(c.expiryTime(), c.expires.getTime()); + }, + "TTL with old expires": function() { + var c = new Cookie(); + c.setExpires('17 Oct 2010 00:00:00 GMT'); + assert.ok(c.TTL() < 0); + assert.ok(c.isPersistent()); + }, + "default TTL": { + topic: function() { return new Cookie() }, + "is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) }, + "is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) }, + }, +}).addBatch({ + "Parsing": { + "simple": { + topic: function() { + return Cookie.parse('a=bcd',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'a') }, + "value": function(c) { assert.equal(c.value, 'bcd') }, + "no path": function(c) { assert.equal(c.path, null) }, + "no domain": function(c) { assert.equal(c.domain, null) }, + "no extensions": function(c) { assert.ok(!c.extensions) }, + }, + "with expiry": { + topic: function() { + return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'a') }, + "value": function(c) { assert.equal(c.value, 'bcd') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + }, + "with expiry and path": { + topic: function() { + return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'abc') }, + "value": function(c) { assert.equal(c.value, 'xyzzy!') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + "has path": function(c) { assert.equal(c.path, '/aBc'); }, + "no httponly or secure": function(c) { + assert.ok(!c.httpOnly); + assert.ok(!c.secure); + }, + }, + "with everything": { + topic: function() { + return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz', true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'abc') }, + "value": function(c) { assert.equal(c.value, 'xyzzy!') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + "has path": function(c) { assert.equal(c.path, '/aBc'); }, + "has domain": function(c) { assert.equal(c.domain, 'example.com'); }, + "has httponly": function(c) { assert.equal(c.httpOnly, true); }, + "has secure": function(c) { assert.equal(c.secure, true); }, + "has max-age": function(c) { assert.equal(c.maxAge, 1234); }, + "has extensions": function(c) { + assert.ok(c.extensions); + assert.equal(c.extensions[0], 'Foo=Bar'); + assert.equal(c.extensions[1], 'Baz'); + }, + }, + "invalid expires": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Expires=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Expires=xyzzy"); + assert.ok(c); + assert.equal(c.expires, Infinity); + }, + }, + "zero max-age": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=0", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Max-Age=0"); + assert.ok(c); + assert.equal(c.maxAge, 0); + }, + }, + "negative max-age": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=-1", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Max-Age=-1"); + assert.ok(c); + assert.equal(c.maxAge, -1); + }, + }, + "empty domain": { + "strict": function() { assert.ok(!Cookie.parse("a=b; domain=", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; domain="); + assert.ok(c); + assert.equal(c.domain, null); + }, + }, + "dot domain": { + "strict": function() { assert.ok(!Cookie.parse("a=b; domain=.", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; domain=."); + assert.ok(c); + assert.equal(c.domain, null); + }, + }, + "uppercase domain": { + "strict lowercases": function() { + var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); + assert.ok(c); + assert.equal(c.domain, 'example.com'); + }, + "non-strict lowercases": function() { + var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); + assert.ok(c); + assert.equal(c.domain, 'example.com'); + }, + }, + "trailing dot in domain": { + topic: function() { + return Cookie.parse("a=b; Domain=example.com.", true) || null; + }, + "has the domain": function(c) { assert.equal(c.domain,"example.com.") }, + "but doesn't validate": function(c) { assert.equal(c.validate(),false) }, + }, + "empty path": { + "strict": function() { assert.ok(!Cookie.parse("a=b; path=", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; path="); + assert.ok(c); + assert.equal(c.path, null); + }, + }, + "no-slash path": { + "strict": function() { assert.ok(!Cookie.parse("a=b; path=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; path=xyzzy"); + assert.ok(c); + assert.equal(c.path, null); + }, + }, + "trailing semi-colons after path": { + topic: function () { + return [ + "a=b; path=/;", + "c=d;;;;" + ]; + }, + "strict": function (t) { + assert.ok(!Cookie.parse(t[0], true)); + assert.ok(!Cookie.parse(t[1], true)); + }, + "non-strict": function (t) { + var c1 = Cookie.parse(t[0]); + var c2 = Cookie.parse(t[1]); + assert.ok(c1); + assert.ok(c2); + assert.equal(c1.path, '/'); + } + }, + "secure-with-value": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Secure=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Secure=xyzzy"); + assert.ok(c); + assert.equal(c.secure, true); + }, + }, + "httponly-with-value": { + "strict": function() { assert.ok(!Cookie.parse("a=b; HttpOnly=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; HttpOnly=xyzzy"); + assert.ok(c); + assert.equal(c.httpOnly, true); + }, + }, + "garbage": { + topic: function() { + return Cookie.parse("\x08", true) || null; + }, + "doesn't parse": function(c) { assert.equal(c,null) }, + }, + "public suffix domain": { + topic: function() { + return Cookie.parse("a=b; domain=kyoto.jp", true) || null; + }, + "parses fine": function(c) { + assert.ok(c); + assert.equal(c.domain, 'kyoto.jp'); + }, + "but fails validation": function(c) { + assert.ok(c); + assert.ok(!c.validate()); + }, + }, + "Ironically, Google 'GAPS' cookie has very little whitespace": { + topic: function() { + return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly"); + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'GAPS') }, + "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') }, + "path": function(c) { + assert.notEqual(c.path, '/;Expires'); // BUG + assert.equal(c.path, '/'); + }, + "expires": function(c) { + assert.notEqual(c.expires, Infinity); + assert.equal(c.expires.getTime(), 1397700749000); + }, + "secure": function(c) { assert.ok(c.secure) }, + "httponly": function(c) { assert.ok(c.httpOnly) }, + }, + "lots of equal signs": { + topic: function() { + return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly"); + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'queryPref') }, + "value": function(c) { assert.equal(c.value, 'b=c&d=e') }, + "path": function(c) { + assert.equal(c.path, '/f=g'); + }, + "expires": function(c) { + assert.notEqual(c.expires, Infinity); + assert.equal(c.expires.getTime(), 1397700749000); + }, + "httponly": function(c) { assert.ok(c.httpOnly) }, + } + } +}) +.addBatch({ + "domain normalization": { + "simple": function() { + var c = new Cookie(); + c.domain = "EXAMPLE.com"; + assert.equal(c.canonicalizedDomain(), "example.com"); + }, + "extra dots": function() { + var c = new Cookie(); + c.domain = ".EXAMPLE.com"; + assert.equal(c.cdomain(), "example.com"); + }, + "weird trailing dot": function() { + var c = new Cookie(); + c.domain = "EXAMPLE.ca."; + assert.equal(c.canonicalizedDomain(), "example.ca."); + }, + "weird internal dots": function() { + var c = new Cookie(); + c.domain = "EXAMPLE...ca."; + assert.equal(c.canonicalizedDomain(), "example...ca."); + }, + "IDN": function() { + var c = new Cookie(); + c.domain = "δοκιμή.δοκιμή"; // "test.test" in greek + assert.equal(c.canonicalizedDomain(), "xn--jxalpdlp.xn--jxalpdlp"); + } + } +}) +.addBatch({ + "Domain Match":matchVows(tough.domainMatch, [ + // str, dom, expect + ["example.com", "example.com", true], + ["eXaMpLe.cOm", "ExAmPlE.CoM", true], + ["no.ca", "yes.ca", false], + ["wwwexample.com", "example.com", false], + ["www.example.com", "example.com", true], + ["example.com", "www.example.com", false], + ["www.subdom.example.com", "example.com", true], + ["www.subdom.example.com", "subdom.example.com", true], + ["example.com", "example.com.", false], // RFC6265 S4.1.2.3 + ["192.168.0.1", "168.0.1", false], // S5.1.3 "The string is a host name" + [null, "example.com", null], + ["example.com", null, null], + [null, null, null], + [undefined, undefined, null], + ]) +}) +.addBatch({ + "default-path": defaultPathVows([ + [null,"/"], + ["/","/"], + ["/file","/"], + ["/dir/file","/dir"], + ["noslash","/"], + ]) +}) +.addBatch({ + "Path-Match": matchVows(tough.pathMatch, [ + // request, cookie, match + ["/","/",true], + ["/dir","/",true], + ["/","/dir",false], + ["/dir/","/dir/", true], + ["/dir/file","/dir/",true], + ["/dir/file","/dir",true], + ["/directory","/dir",false], + ]) +}) +.addBatch({ + "Cookie Sorting": { + topic: function() { + var cookies = []; + var now = Date.now(); + cookies.push(Cookie.parse("a=0; Domain=example.com")); + cookies.push(Cookie.parse("b=1; Domain=www.example.com")); + cookies.push(Cookie.parse("c=2; Domain=example.com; Path=/pathA")); + cookies.push(Cookie.parse("d=3; Domain=www.example.com; Path=/pathA")); + cookies.push(Cookie.parse("e=4; Domain=example.com; Path=/pathA/pathB")); + cookies.push(Cookie.parse("f=5; Domain=www.example.com; Path=/pathA/pathB")); + + // force a stable creation time consistent with the order above since + // some may have been created at now + 1ms. + var i = cookies.length; + cookies.forEach(function(cookie) { + cookie.creation = new Date(now - 100*(i--)); + }); + + // weak shuffle: + cookies = cookies.sort(function(){return Math.random()-0.5}); + + cookies = cookies.sort(tough.cookieCompare); + return cookies; + }, + "got": function(cookies) { + assert.lengthOf(cookies, 6); + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['e','f','c','d','a','b']); + }, + } +}) +.addBatch({ + "CookieJar": { + "Setting a basic cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "works": function(c) { assert.instanceOf(c,Cookie) }, // C is for Cookie, good enough for me + "gets timestamped": function(c) { + assert.ok(c.creation); + assert.ok(Date.now() - c.creation.getTime() < 5000); // recently stamped + assert.ok(c.lastAccessed); + assert.equal(c.creation, c.lastAccessed); + assert.equal(c.TTL(), Infinity); + assert.ok(!c.isPersistent()); + }, + }, + "Setting a no-path cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "domain": function(c) { assert.equal(c.domain, 'example.com') }, + "path is /": function(c) { assert.equal(c.path, '/') }, + "path was derived": function(c) { assert.strictEqual(c.pathIsDefault, true) }, + }, + "Setting a cookie already marked as host-only": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + c.hostOnly = true; + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "domain": function(c) { assert.equal(c.domain, 'example.com') }, + "still hostOnly": function(c) { assert.strictEqual(c.hostOnly, true) }, + }, + "Setting a session cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b"); + assert.strictEqual(c.path, null); + cj.setCookie(c, 'http://www.example.com/dir/index.html', this.callback); + }, + "works": function(c) { assert.instanceOf(c,Cookie) }, + "gets the domain": function(c) { assert.equal(c.domain, 'www.example.com') }, + "gets the default path": function(c) { assert.equal(c.path, '/dir') }, + "is 'hostOnly'": function(c) { assert.ok(c.hostOnly) }, + }, + "Setting wrong domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=fooxample.com; Path=/"); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "fails": function(err,c) { + assert.ok(err.message.match(/domain/i)); + assert.ok(!c); + }, + }, + "Setting sub-domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=www.example.com; Path=/"); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "fails": function(err,c) { + assert.ok(err.message.match(/domain/i)); + assert.ok(!c); + }, + }, + "Setting super-domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/"); + cj.setCookie(c, 'http://www.app.example.com/index.html', this.callback); + }, + "success": function(err,c) { + assert.ok(!err); + assert.equal(c.domain, 'example.com'); + }, + }, + "Setting HttpOnly cookie over non-HTTP API": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/; HttpOnly"); + cj.setCookie(c, 'http://example.com/index.html', {http:false}, this.callback); + }, + "fails": function(err,c) { + assert.match(err.message, /HttpOnly/i); + assert.ok(!c); + }, + }, + }, + "Cookie Jar store eight cookies": { + topic: function() { + var cj = new CookieJar(); + var ex = 'http://example.com/index.html'; + var tasks = []; + tasks.push(function(next) { + cj.setCookie('a=1; Domain=example.com; Path=/',ex,at(0),next); + }); + tasks.push(function(next) { + cj.setCookie('b=2; Domain=example.com; Path=/; HttpOnly',ex,at(1000),next); + }); + tasks.push(function(next) { + cj.setCookie('c=3; Domain=example.com; Path=/; Secure',ex,at(2000),next); + }); + tasks.push(function(next) { // path + cj.setCookie('d=4; Domain=example.com; Path=/foo',ex,at(3000),next); + }); + tasks.push(function(next) { // host only + cj.setCookie('e=5',ex,at(4000),next); + }); + tasks.push(function(next) { // other domain + cj.setCookie('f=6; Domain=nodejs.org; Path=/','http://nodejs.org',at(5000),next); + }); + tasks.push(function(next) { // expired + cj.setCookie('g=7; Domain=example.com; Path=/; Expires=Tue, 18 Oct 2011 00:00:00 GMT',ex,at(6000),next); + }); + tasks.push(function(next) { // expired via Max-Age + cj.setCookie('h=8; Domain=example.com; Path=/; Max-Age=1',ex,next); + }); + var cb = this.callback; + async.parallel(tasks, function(err,results){ + setTimeout(function() { + cb(err,cj,results); + }, 2000); // so that 'h=8' expires + }); + }, + "setup ok": function(err,cj,results) { + assert.ok(1); + }, + "then retrieving for http://nodejs.org": { + topic: function(cj,results) { + cj.getCookies('http://nodejs.org',this.callback); + }, + "get a nodejs cookie": function(cookies) { + assert.lengthOf(cookies, 1); + var cookie = cookies[0]; + assert.equal(cookie.domain, 'nodejs.org'); + }, + }, + "then retrieving for https://example.com": { + topic: function(cj,results) { + cj.getCookies('https://example.com',{secure:true},this.callback); + }, + "get a secure example cookie with others": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','c','e']); + }, + }, + "then retrieving for https://example.com (missing options)": { + topic: function(cj,results) { + cj.getCookies('https://example.com',this.callback); + }, + "get a secure example cookie with others": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','c','e']); + }, + }, + "then retrieving for http://example.com": { + topic: function(cj,results) { + cj.getCookies('http://example.com',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','e']); + }, + }, + "then retrieving for http://EXAMPlE.com": { + topic: function(cj,results) { + cj.getCookies('http://EXAMPlE.com',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','e']); + }, + }, + "then retrieving for http://example.com, non-HTTP": { + topic: function(cj,results) { + cj.getCookies('http://example.com',{http:false},this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','e']); + }, + }, + "then retrieving for http://example.com/foo/bar": { + topic: function(cj,results) { + cj.getCookies('http://example.com/foo/bar',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['d','a','b','e']); + }, + }, + "then retrieving for http://example.com as a string": { + topic: function(cj,results) { + cj.getCookieString('http://example.com',this.callback); + }, + "get a single string": function(cookieHeader) { + assert.equal(cookieHeader, "a=1; b=2; e=5"); + }, + }, + "then retrieving for http://example.com as a set-cookie header": { + topic: function(cj,results) { + cj.getSetCookieStrings('http://example.com',this.callback); + }, + "get a single string": function(cookieHeaders) { + assert.lengthOf(cookieHeaders, 3); + assert.equal(cookieHeaders[0], "a=1; Domain=example.com; Path=/"); + assert.equal(cookieHeaders[1], "b=2; Domain=example.com; Path=/; HttpOnly"); + assert.equal(cookieHeaders[2], "e=5; Path=/"); + }, + }, + "then retrieving for http://www.example.com/": { + topic: function(cj,results) { + cj.getCookies('http://www.example.com/foo/bar',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['d','a','b']); // note lack of 'e' + }, + }, + }, + "Repeated names": { + topic: function() { + var cb = this.callback; + var cj = new CookieJar(); + var ex = 'http://www.example.com/'; + var sc = cj.setCookie; + var tasks = []; + var now = Date.now(); + tasks.push(sc.bind(cj,'aaaa=xxxx',ex,at(0))); + tasks.push(sc.bind(cj,'aaaa=1111; Domain=www.example.com',ex,at(1000))); + tasks.push(sc.bind(cj,'aaaa=2222; Domain=example.com',ex,at(2000))); + tasks.push(sc.bind(cj,'aaaa=3333; Domain=www.example.com; Path=/pathA',ex,at(3000))); + async.series(tasks,function(err,results) { + results = results.filter(function(e) {return e !== undefined}); + cb(err,{cj:cj, cookies:results, now:now}); + }); + }, + "all got set": function(err,t) { + assert.lengthOf(t.cookies,4); + }, + "then getting 'em back": { + topic: function(t) { + var cj = t.cj; + cj.getCookies('http://www.example.com/pathA',this.callback); + }, + "there's just three": function (err,cookies) { + var vals = cookies.map(function(c) {return c.value}); + // may break with sorting; sorting should put 3333 first due to longest path: + assert.deepEqual(vals, ['3333','1111','2222']); + } + }, + }, + "CookieJar setCookie errors": { + "public-suffix domain": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('i=9; Domain=kyoto.jp; Path=/','kyoto.jp',this.callback); + }, + "errors": function(err,cookie) { + assert.ok(err); + assert.ok(!cookie); + assert.match(err.message, /public suffix/i); + }, + }, + "wrong domain": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('j=10; Domain=google.com; Path=/','google.ca',this.callback); + }, + "errors": function(err,cookie) { + assert.ok(err); + assert.ok(!cookie); + assert.match(err.message, /not in this host's domain/i); + }, + }, + "old cookie is HttpOnly": { + topic: function() { + var cb = this.callback; + var next = function (err,c) { + return cb(err,cj); + }; + var cj = new CookieJar(); + cj.setCookie('k=11; Domain=example.ca; Path=/; HttpOnly','http://example.ca',{http:true},next); + }, + "initial cookie is set": function(err,cj) { + assert.ok(!err); + }, + "but when trying to overwrite": { + topic: function(cj) { + var cb = this.callback; + cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},function(err,c) {cb(null,err)}); + }, + "it's an error": function(err) { + assert.ok(err); + }, + "then, checking the original": { + topic: function(ignored,cj) { + assert.ok(cj instanceof CookieJar); + cj.getCookies('http://example.ca',{http:true},this.callback); + }, + "cookie has original value": function(err,cookies) { + assert.equal(err,null); + assert.lengthOf(cookies, 1); + assert.equal(cookies[0].value,11); + }, + }, + }, + }, + }, +}) +.addBatch({ + "JSON": { + "serialization": { + topic: function() { + var c = Cookie.parse('alpha=beta; Domain=example.com; Path=/foo; Expires=Tue, 19 Jan 2038 03:14:07 GMT; HttpOnly'); + return JSON.stringify(c); + }, + "gives a string": function(str) { + assert.equal(typeof str, "string"); + }, + "date is in ISO format": function(str) { + assert.match(str, /"expires":"2038-01-19T03:14:07\.000Z"/, 'expires is in ISO format'); + }, + }, + "deserialization": { + topic: function() { + var json = '{"key":"alpha","value":"beta","domain":"example.com","path":"/foo","expires":"2038-01-19T03:14:07.000Z","httpOnly":true,"lastAccessed":2000000000123}'; + return Cookie.fromJSON(json); + }, + "works": function(c) { + assert.ok(c); + }, + "key": function(c) { assert.equal(c.key, "alpha") }, + "value": function(c) { assert.equal(c.value, "beta") }, + "domain": function(c) { assert.equal(c.domain, "example.com") }, + "path": function(c) { assert.equal(c.path, "/foo") }, + "httpOnly": function(c) { assert.strictEqual(c.httpOnly, true) }, + "secure": function(c) { assert.strictEqual(c.secure, false) }, + "hostOnly": function(c) { assert.strictEqual(c.hostOnly, null) }, + "expires is a date object": function(c) { + assert.equal(c.expires.getTime(), 2147483647000); + }, + "lastAccessed is a date object": function(c) { + assert.equal(c.lastAccessed.getTime(), 2000000000123); + }, + "creation defaulted": function(c) { + assert.ok(c.creation.getTime()); + } + }, + "null deserialization": { + topic: function() { + return Cookie.fromJSON(null); + }, + "is null": function(cookie) { + assert.equal(cookie,null); + }, + }, + }, + "expiry deserialization": { + "Infinity": { + topic: Cookie.fromJSON.bind(null, '{"expires":"Infinity"}'), + "is infinite": function(c) { + assert.strictEqual(c.expires, "Infinity"); + assert.equal(c.expires, Infinity); + }, + }, + }, + "maxAge serialization": { + topic: function() { + return function(toSet) { + var c = new Cookie(); + c.key = 'foo'; c.value = 'bar'; + c.setMaxAge(toSet); + return JSON.stringify(c); + }; + }, + "zero": { + topic: function(f) { return f(0) }, + "looks good": function(str) { + assert.match(str, /"maxAge":0/); + }, + }, + "Infinity": { + topic: function(f) { return f(Infinity) }, + "looks good": function(str) { + assert.match(str, /"maxAge":"Infinity"/); + }, + }, + "-Infinity": { + topic: function(f) { return f(-Infinity) }, + "looks good": function(str) { + assert.match(str, /"maxAge":"-Infinity"/); + }, + }, + "null": { + topic: function(f) { return f(null) }, + "looks good": function(str) { + assert.match(str, /"maxAge":null/); + }, + }, + }, + "maxAge deserialization": { + "number": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":123}'), + "is the number": function(c) { + assert.strictEqual(c.maxAge, 123); + }, + }, + "null": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":null}'), + "is null": function(c) { + assert.strictEqual(c.maxAge, null); + }, + }, + "less than zero": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":-123}'), + "is -123": function(c) { + assert.strictEqual(c.maxAge, -123); + }, + }, + "Infinity": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"Infinity"}'), + "is inf-as-string": function(c) { + assert.strictEqual(c.maxAge, "Infinity"); + }, + }, + "-Infinity": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"-Infinity"}'), + "is inf-as-string": function(c) { + assert.strictEqual(c.maxAge, "-Infinity"); + }, + }, + } +}) +.addBatch({ + "permuteDomain": { + "base case": { + topic: tough.permuteDomain.bind(null,'example.com'), + "got the domain": function(list) { + assert.deepEqual(list, ['example.com']); + }, + }, + "two levels": { + topic: tough.permuteDomain.bind(null,'foo.bar.example.com'), + "got three things": function(list) { + assert.deepEqual(list, ['example.com','bar.example.com','foo.bar.example.com']); + }, + }, + "invalid domain": { + topic: tough.permuteDomain.bind(null,'foo.bar.example.localduhmain'), + "got three things": function(list) { + assert.equal(list, null); + }, + }, + }, + "permutePath": { + "base case": { + topic: tough.permutePath.bind(null,'/'), + "just slash": function(list) { + assert.deepEqual(list,['/']); + }, + }, + "single case": { + topic: tough.permutePath.bind(null,'/foo'), + "two things": function(list) { + assert.deepEqual(list,['/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo',e)); + }); + }, + }, + "double case": { + topic: tough.permutePath.bind(null,'/foo/bar'), + "four things": function(list) { + assert.deepEqual(list,['/foo/bar','/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo/bar',e)); + }); + }, + }, + "trailing slash": { + topic: tough.permutePath.bind(null,'/foo/bar/'), + "three things": function(list) { + assert.deepEqual(list,['/foo/bar','/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo/bar/',e)); + }); + }, + }, + } +}) +.addBatch({ + "Issue 1": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function(err,cookie) { + this.callback(err,{cj:cj, cookie:cookie}); + }.bind(this)); + }, + "stored a cookie": function(t) { + assert.ok(t.cookie); + }, + "cookie's path was modified to remove unnecessary slash": function(t) { + assert.equal(t.cookie.path, '/some/path'); + }, + "getting it back": { + topic: function(t) { + t.cj.getCookies('http://domain/some/path/file', function(err,cookies) { + this.callback(err, {cj:t.cj, cookies:cookies||[]}); + }.bind(this)); + }, + "got one cookie": function(t) { + assert.lengthOf(t.cookies, 1); + }, + "it's the right one": function(t) { + var c = t.cookies[0]; + assert.equal(c.key, 'hello'); + assert.equal(c.value, 'world'); + }, + } + } +}) +.addBatch({ + "expiry option": { + topic: function() { + var cb = this.callback; + var cj = new CookieJar(); + cj.setCookie('near=expiry; Domain=example.com; Path=/; Max-Age=1','http://www.example.com',at(-1), function(err,cookie) { + + cb(err, {cj:cj, cookie:cookie}); + }); + }, + "set the cookie": function(t) { + assert.ok(t.cookie, "didn't set?!"); + assert.equal(t.cookie.key, 'near'); + }, + "then, retrieving": { + topic: function(t) { + var cb = this.callback; + setTimeout(function() { + t.cj.getCookies('http://www.example.com', {http:true, expire:false}, function(err,cookies) { + t.cookies = cookies; + cb(err,t); + }); + },2000); + }, + "got the cookie": function(t) { + assert.lengthOf(t.cookies, 1); + assert.equal(t.cookies[0].key, 'near'); + }, + } + } +}) +.addBatch({ + "trailing semi-colon set into cj": { + topic: function () { + var cb = this.callback; + var cj = new CookieJar(); + var ex = 'http://www.example.com'; + var tasks = []; + tasks.push(function(next) { + cj.setCookie('broken_path=testme; path=/;',ex,at(-1),next); + }); + tasks.push(function(next) { + cj.setCookie('b=2; Path=/;;;;',ex,at(-1),next); + }); + async.parallel(tasks, function (err, cookies) { + cb(null, { + cj: cj, + cookies: cookies + }); + }); + }, + "check number of cookies": function (t) { + assert.lengthOf(t.cookies, 2, "didn't set"); + }, + "check *broken_path* was set properly": function (t) { + assert.equal(t.cookies[0].key, "broken_path"); + assert.equal(t.cookies[0].value, "testme"); + assert.equal(t.cookies[0].path, "/"); + }, + "check *b* was set properly": function (t) { + assert.equal(t.cookies[1].key, "b"); + assert.equal(t.cookies[1].value, "2"); + assert.equal(t.cookies[1].path, "/"); + }, + "retrieve the cookie": { + topic: function (t) { + var cb = this.callback; + t.cj.getCookies('http://www.example.com', {}, function (err, cookies) { + t.cookies = cookies; + cb(err, t); + }); + }, + "get the cookie": function(t) { + assert.lengthOf(t.cookies, 2); + assert.equal(t.cookies[0].key, 'broken_path'); + assert.equal(t.cookies[0].value, 'testme'); + assert.equal(t.cookies[1].key, "b"); + assert.equal(t.cookies[1].value, "2"); + assert.equal(t.cookies[1].path, "/"); + }, + }, + } +}) +.addBatch({ + "Constructor":{ + topic: function () { + return new Cookie({ + key: 'test', + value: 'b', + maxAge: 60 + }); + }, + 'check for key property': function (c) { + assert.ok(c); + assert.equal(c.key, 'test'); + }, + 'check for value property': function (c) { + assert.equal(c.value, 'b'); + }, + 'check for maxAge': function (c) { + assert.equal(c.maxAge, 60); + }, + 'check for default values for unspecified properties': function (c) { + assert.equal(c.expires, "Infinity"); + assert.equal(c.secure, false); + assert.equal(c.httpOnly, false); + } + } +}) +.addBatch({ + "allPaths option": { + topic: function() { + var cj = new CookieJar(); + var tasks = []; + tasks.push(cj.setCookie.bind(cj, 'nopath_dom=qq; Path=/; Domain=example.com', 'http://example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'path_dom=qq; Path=/foo; Domain=example.com', 'http://example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'nopath_host=qq; Path=/', 'http://www.example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'path_host=qq; Path=/foo', 'http://www.example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'other=qq; Path=/', 'http://other.example.com/', {})); + tasks.push(cj.setCookie.bind(cj, 'other2=qq; Path=/foo', 'http://other.example.com/foo', {})); + var cb = this.callback; + async.parallel(tasks, function(err,results) { + cb(err, {cj:cj, cookies: results}); + }); + }, + "all set": function(t) { + assert.equal(t.cookies.length, 6); + assert.ok(t.cookies.every(function(c) { return !!c })); + }, + "getting without allPaths": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/', {}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found just two cookies": function(t) { + assert.equal(t.cookies.length, 2); + }, + "all are path=/": function(t) { + assert.ok(t.cookies.every(function(c) { return c.path === '/' })); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + "getting without allPaths for /foo": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/foo', {}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found four cookies": function(t) { + assert.equal(t.cookies.length, 4); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + "getting with allPaths:true": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/', {allPaths:true}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found four cookies": function(t) { + assert.equal(t.cookies.length, 4); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + } +}) +.export(module); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md new file mode 100644 index 00000000..bb533d56 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md @@ -0,0 +1,4 @@ +tunnel-agent +============ + +HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js new file mode 100644 index 00000000..3f7bbb90 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js @@ -0,0 +1,227 @@ +'use strict' + +var net = require('net') + , tls = require('tls') + , http = require('http') + , https = require('https') + , events = require('events') + , assert = require('assert') + , util = require('util') + ; + +exports.httpOverHttp = httpOverHttp +exports.httpsOverHttp = httpsOverHttp +exports.httpOverHttps = httpOverHttps +exports.httpsOverHttps = httpsOverHttps + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + return agent +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + agent.createSocket = createSecureSocket + return agent +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + return agent +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + agent.createSocket = createSecureSocket + return agent +} + + +function TunnelingAgent(options) { + var self = this + self.options = options || {} + self.proxyOptions = self.options.proxy || {} + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets + self.requests = [] + self.sockets = [] + + self.on('free', function onFree(socket, host, port) { + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i] + if (pending.host === host && pending.port === port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1) + pending.request.onSocket(socket) + return + } + } + socket.destroy() + self.removeSocket(socket) + }) +} +util.inherits(TunnelingAgent, events.EventEmitter) + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) { + var self = this + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push({host: host, port: port, request: req}) + return + } + + // If we are under maxSockets create a new one. + self.createSocket({host: host, port: port, request: req}, function(socket) { + socket.on('free', onFree) + socket.on('close', onCloseOrRemove) + socket.on('agentRemove', onCloseOrRemove) + req.onSocket(socket) + + function onFree() { + self.emit('free', socket, host, port) + } + + function onCloseOrRemove(err) { + self.removeSocket() + socket.removeListener('free', onFree) + socket.removeListener('close', onCloseOrRemove) + socket.removeListener('agentRemove', onCloseOrRemove) + } + }) +} + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this + var placeholder = {} + self.sockets.push(placeholder) + + var connectOptions = mergeOptions({}, self.proxyOptions, + { method: 'CONNECT' + , path: options.host + ':' + options.port + , agent: false + } + ) + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {} + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64') + } + + debug('making CONNECT request') + var connectReq = self.request(connectOptions) + connectReq.useChunkedEncodingByDefault = false // for v0.6 + connectReq.once('response', onResponse) // for v0.6 + connectReq.once('upgrade', onUpgrade) // for v0.6 + connectReq.once('connect', onConnect) // for v0.7 or later + connectReq.once('error', onError) + connectReq.end() + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head) + }) + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners() + socket.removeAllListeners() + + if (res.statusCode === 200) { + assert.equal(head.length, 0) + debug('tunneling connection has established') + self.sockets[self.sockets.indexOf(placeholder)] = socket + cb(socket) + } else { + debug('tunneling socket could not be established, statusCode=%d', res.statusCode) + var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } + } + + function onError(cause) { + connectReq.removeAllListeners() + + debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) + var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } +} + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) return + + this.sockets.splice(pos, 1) + + var pending = this.requests.shift() + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket) + }) + } +} + +function createSecureSocket(options, cb) { + var self = this + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, mergeOptions({}, self.options, + { servername: options.host + , socket: socket + } + )) + cb(secureSocket) + }) +} + + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i] + if (typeof overrides === 'object') { + var keys = Object.keys(overrides) + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j] + if (overrides[k] !== undefined) { + target[k] = overrides[k] + } + } + } + } + return target +} + + +var debug +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments) + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0] + } else { + args.unshift('TUNNEL:') + } + console.error.apply(console, args) + } +} else { + debug = function() {} +} +exports.debug = debug // for test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json new file mode 100644 index 00000000..acfa6e1c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json @@ -0,0 +1,32 @@ +{ + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "name": "tunnel-agent", + "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", + "version": "0.3.0", + "repository": { + "url": "https://github.com/mikeal/tunnel-agent" + }, + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/mikeal/tunnel-agent/issues" + }, + "homepage": "https://github.com/mikeal/tunnel-agent", + "_id": "tunnel-agent@0.3.0", + "dist": { + "shasum": "ad681b68f5321ad2827c4cfb1b7d5df2cfe942ee" + }, + "_from": "tunnel-agent@~0.3.0", + "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json new file mode 100755 index 00000000..57c99c02 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json @@ -0,0 +1,61 @@ +{ + "name": "request", + "description": "Simplified HTTP request client.", + "tags": [ + "http", + "simple", + "util", + "utility" + ], + "version": "2.31.0", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com" + }, + "repository": { + "type": "git", + "url": "http://github.com/mikeal/request.git" + }, + "bugs": { + "url": "http://github.com/mikeal/request/issues" + }, + "engines": [ + "node >= 0.8.0" + ], + "main": "index.js", + "dependencies": { + "qs": "~0.6.0", + "json-stringify-safe": "~5.0.0", + "forever-agent": "~0.5.0", + "node-uuid": "~1.4.0", + "mime": "~1.2.9", + "tough-cookie": "~0.9.15", + "form-data": "~0.1.0", + "tunnel-agent": "~0.3.0", + "http-signature": "~0.10.0", + "oauth-sign": "~0.3.0", + "hawk": "~1.0.0", + "aws-sign2": "~0.5.0" + }, + "optionalDependencies": { + "tough-cookie": "~0.9.15", + "form-data": "~0.1.0", + "tunnel-agent": "~0.3.0", + "http-signature": "~0.10.0", + "oauth-sign": "~0.3.0", + "hawk": "~1.0.0", + "aws-sign2": "~0.5.0" + }, + "scripts": { + "test": "node tests/run.js" + }, + "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```javascript\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\nNote that `setCookie` requires at least three parameters, and the last is required to be a callback.\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.setCookie(cookie, uri, function (err, cookie){})\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/mikeal/request", + "_id": "request@2.31.0", + "dist": { + "shasum": "4c8ac967c9a4b9410cb4ba1a61fdb644267eeeff" + }, + "_from": "request@~2.31.0", + "_resolved": "https://registry.npmjs.org/request/-/request-2.31.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js new file mode 100644 index 00000000..3c03c47d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js @@ -0,0 +1,1260 @@ +var optional = require('./lib/optional') + , http = require('http') + , https = optional('https') + , tls = optional('tls') + , url = require('url') + , util = require('util') + , stream = require('stream') + , qs = require('qs') + , querystring = require('querystring') + , crypto = require('crypto') + + , oauth = optional('oauth-sign') + , hawk = optional('hawk') + , aws = optional('aws-sign') + , httpSignature = optional('http-signature') + , uuid = require('node-uuid') + , mime = require('mime') + , tunnel = optional('tunnel-agent') + , _safeStringify = require('json-stringify-safe') + + , ForeverAgent = require('forever-agent') + , FormData = optional('form-data') + + , Cookie = optional('tough-cookie') + , CookieJar = Cookie && Cookie.CookieJar + , cookieJar = CookieJar && new CookieJar + + , copy = require('./lib/copy') + , debug = require('./lib/debug') + , getSafe = require('./lib/getSafe') + ; + +function safeStringify (obj) { + var ret + try { ret = JSON.stringify(obj) } + catch (e) { ret = _safeStringify(obj) } + return ret +} + +var globalPool = {} +var isUrl = /^https?:/i + + +// Hacky fix for pre-0.4.4 https +if (https && !https.Agent) { + https.Agent = function (options) { + http.Agent.call(this, options) + } + util.inherits(https.Agent, http.Agent) + https.Agent.prototype._getConnection = function (host, port, cb) { + var s = tls.connect(port, host, this.options, function () { + // do other checks here? + if (cb) cb() + }) + return s + } +} + +function isReadStream (rs) { + if (rs.readable && rs.path && rs.mode) { + return true + } +} + +function toBase64 (str) { + return (new Buffer(str || "", "ascii")).toString("base64") +} + +function md5 (str) { + return crypto.createHash('md5').update(str).digest('hex') +} + +function Request (options) { + stream.Stream.call(this) + this.readable = true + this.writable = true + + if (typeof options === 'string') { + options = {uri:options} + } + + var reserved = Object.keys(Request.prototype) + for (var i in options) { + if (reserved.indexOf(i) === -1) { + this[i] = options[i] + } else { + if (typeof options[i] === 'function') { + delete options[i] + } + } + } + + if (options.method) { + this.explicitMethod = true + } + + this.canTunnel = options.tunnel !== false && tunnel; + + this.init(options) +} +util.inherits(Request, stream.Stream) +Request.prototype.init = function (options) { + // init() contains all the code to setup the request object. + // the actual outgoing request is not started until start() is called + // this function is called from both the constructor and on redirect. + var self = this + if (!options) options = {} + + if (!self.method) self.method = options.method || 'GET' + self.localAddress = options.localAddress + + debug(options) + if (!self.pool && self.pool !== false) self.pool = globalPool + self.dests = self.dests || [] + self.__isRequestRequest = true + + // Protect against double callback + if (!self._callback && self.callback) { + self._callback = self.callback + self.callback = function () { + if (self._callbackCalled) return // Print a warning maybe? + self._callbackCalled = true + self._callback.apply(self, arguments) + } + self.on('error', self.callback.bind()) + self.on('complete', self.callback.bind(self, null)) + } + + if (self.url && !self.uri) { + // People use this property instead all the time so why not just support it. + self.uri = self.url + delete self.url + } + + if (!self.uri) { + // this will throw if unhandled but is handleable when in a redirect + return self.emit('error', new Error("options.uri is a required argument")) + } else { + if (typeof self.uri == "string") self.uri = url.parse(self.uri) + } + + if (self.strictSSL === false) { + self.rejectUnauthorized = false + } + + if (self.proxy) { + if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy) + + // do the HTTP CONNECT dance using koichik/node-tunnel + if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) { + var tunnelFn = self.proxy.protocol === "http:" + ? tunnel.httpsOverHttp : tunnel.httpsOverHttps + + var tunnelOptions = { proxy: { host: self.proxy.hostname + , port: +self.proxy.port + , proxyAuth: self.proxy.auth + , headers: { Host: self.uri.hostname + ':' + + (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }} + , rejectUnauthorized: self.rejectUnauthorized + , ca: this.ca } + + self.agent = tunnelFn(tunnelOptions) + self.tunnel = true + } + } + + if (!self.uri.pathname) {self.uri.pathname = '/'} + + if (!self.uri.host) { + // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar + // Detect and reject it as soon as possible + var faultyUri = url.format(self.uri) + var message = 'Invalid URI "' + faultyUri + '"' + if (Object.keys(options).length === 0) { + // No option ? This can be the sign of a redirect + // As this is a case where the user cannot do anything (they didn't call request directly with this URL) + // they should be warned that it can be caused by a redirection (can save some hair) + message += '. This can be caused by a crappy redirection.' + } + self.emit('error', new Error(message)) + return // This error was fatal + } + + self._redirectsFollowed = self._redirectsFollowed || 0 + self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10 + self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true + self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false + if (self.followRedirect || self.followAllRedirects) + self.redirects = self.redirects || [] + + self.headers = self.headers ? copy(self.headers) : {} + + self.setHost = false + if (!self.hasHeader('host')) { + self.setHeader('host', self.uri.hostname) + if (self.uri.port) { + if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && + !(self.uri.port === 443 && self.uri.protocol === 'https:') ) + self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) ) + } + self.setHost = true + } + + self.jar(self._jar || options.jar) + + if (!self.uri.port) { + if (self.uri.protocol == 'http:') {self.uri.port = 80} + else if (self.uri.protocol == 'https:') {self.uri.port = 443} + } + + if (self.proxy && !self.tunnel) { + self.port = self.proxy.port + self.host = self.proxy.hostname + } else { + self.port = self.uri.port + self.host = self.uri.hostname + } + + self.clientErrorHandler = function (error) { + if (self._aborted) return + if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' + && self.agent.addRequestNoreuse) { + self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } + self.start() + self.req.end() + return + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + self.emit('error', error) + } + + self._parserErrorHandler = function (error) { + if (this.res) { + if (this.res.request) { + this.res.request.emit('error', error) + } else { + this.res.emit('error', error) + } + } else { + this._httpMessage.emit('error', error) + } + } + + if (options.form) { + self.form(options.form) + } + + if (options.qs) self.qs(options.qs) + + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || "") + } + + if (self.path.length === 0) self.path = '/' + + + // Auth must happen last in case signing is dependent on other headers + if (options.oauth) { + self.oauth(options.oauth) + } + + if (options.aws) { + self.aws(options.aws) + } + + if (options.hawk) { + self.hawk(options.hawk) + } + + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } + + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password + + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately + ) + } + + if (self.uri.auth && !self.hasHeader('authorization')) { + var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) + self.auth(authPieces[0], authPieces.slice(1).join(':'), true) + } + if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { + self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) + } + + + if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + + if (options.json) { + self.json(options.json) + } else if (options.multipart) { + self.boundary = uuid() + self.multipart(options.multipart) + } + + if (self.body) { + var length = 0 + if (!Buffer.isBuffer(self.body)) { + if (Array.isArray(self.body)) { + for (var i = 0; i < self.body.length; i++) { + length += self.body[i].length + } + } else { + self.body = new Buffer(self.body) + length = self.body.length + } + } else { + length = self.body.length + } + if (length) { + if (!self.hasHeader('content-length')) self.setHeader('content-length', length) + } else { + throw new Error('Argument error, options.body.') + } + } + + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + , defaultModules = {'http:':http, 'https:':https} + , httpModules = self.httpModules || {} + ; + self.httpModule = httpModules[protocol] || defaultModules[protocol] + + if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) + + if (options.ca) self.ca = options.ca + + if (!self.agent) { + if (options.agentOptions) self.agentOptions = options.agentOptions + + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + } + } + + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getAgent() + if (self.maxSockets) { + // Don't use our pooling if node has the refactored client + self.agent.maxSockets = self.maxSockets + } + if (self.pool.maxSockets) { + // Don't use our pooling if node has the refactored client + self.agent.maxSockets = self.pool.maxSockets + } + } + + self.on('pipe', function (src) { + if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) + } + } + } + if (self._json && !self.hasHeader('content-type')) + self.setHeader('content-type', 'application/json') + if (src.method && !self.explicitMethod) { + self.method = src.method + } + } + + // self.on('pipe', function () { + // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") + // }) + }) + + process.nextTick(function () { + if (self._aborted) return + + if (self._form) { + self.setHeaders(self._form.getHeaders()) + self._form.pipe(self) + } + if (self.body) { + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } else if (self.requestBodyStream) { + console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() + } + self.ntick = true + }) +} + +// Must call this when following a redirect from https to http or vice versa +// Attempts to keep everything as identical as possible, but update the +// httpModule, Tunneling agent, and/or Forever Agent in use. +Request.prototype._updateProtocol = function () { + var self = this + var protocol = self.uri.protocol + + if (protocol === 'https:') { + // previously was doing http, now doing https + // if it's https, then we might need to tunnel now. + if (self.proxy && self.canTunnel) { + self.tunnel = true + var tunnelFn = self.proxy.protocol === 'http:' + ? tunnel.httpsOverHttp : tunnel.httpsOverHttps + var tunnelOptions = { proxy: { host: self.proxy.hostname + , port: +self.proxy.port + , proxyAuth: self.proxy.auth } + , rejectUnauthorized: self.rejectUnauthorized + , ca: self.ca } + self.agent = tunnelFn(tunnelOptions) + return + } + + self.httpModule = https + switch (self.agentClass) { + case ForeverAgent: + self.agentClass = ForeverAgent.SSL + break + case http.Agent: + self.agentClass = https.Agent + break + default: + // nothing we can do. Just hope for the best. + return + } + + // if there's an agent, we need to get a new one. + if (self.agent) self.agent = self.getAgent() + + } else { + // previously was doing https, now doing http + // stop any tunneling. + if (self.tunnel) self.tunnel = false + self.httpModule = http + switch (self.agentClass) { + case ForeverAgent.SSL: + self.agentClass = ForeverAgent + break + case https.Agent: + self.agentClass = http.Agent + break + default: + // nothing we can do. just hope for the best + return + } + + // if there's an agent, then get a new one. + if (self.agent) { + self.agent = null + self.agent = self.getAgent() + } + } +} + +Request.prototype.getAgent = function () { + var Agent = this.agentClass + var options = {} + if (this.agentOptions) { + for (var i in this.agentOptions) { + options[i] = this.agentOptions[i] + } + } + if (this.ca) options.ca = this.ca + if (this.ciphers) options.ciphers = this.ciphers + if (this.secureProtocol) options.secureProtocol = this.secureProtocol + if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized + + if (this.cert && this.key) { + options.key = this.key + options.cert = this.cert + } + + var poolKey = '' + + // different types of agents are in different pools + if (Agent !== this.httpModule.Agent) { + poolKey += Agent.name + } + + if (!this.httpModule.globalAgent) { + // node 0.4.x + options.host = this.host + options.port = this.port + if (poolKey) poolKey += ':' + poolKey += this.host + ':' + this.port + } + + // ca option is only relevant if proxy or destination are https + var proxy = this.proxy + if (typeof proxy === 'string') proxy = url.parse(proxy) + var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + if (isHttps) { + if (options.ca) { + if (poolKey) poolKey += ':' + poolKey += options.ca + } + + if (typeof options.rejectUnauthorized !== 'undefined') { + if (poolKey) poolKey += ':' + poolKey += options.rejectUnauthorized + } + + if (options.cert) + poolKey += options.cert.toString('ascii') + options.key.toString('ascii') + + if (options.ciphers) { + if (poolKey) poolKey += ':' + poolKey += options.ciphers + } + + if (options.secureProtocol) { + if (poolKey) poolKey += ':' + poolKey += options.secureProtocol + } + } + + if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) { + // not doing anything special. Use the globalAgent + return this.httpModule.globalAgent + } + + // we're using a stored agent. Make sure it's protocol-specific + poolKey = this.uri.protocol + poolKey + + // already generated an agent for this setting + if (this.pool[poolKey]) return this.pool[poolKey] + + return this.pool[poolKey] = new Agent(options) +} + +Request.prototype.start = function () { + // start() is called once we are ready to send the outgoing HTTP request. + // this is usually called on the first write(), end() or on nextTick() + var self = this + + if (self._aborted) return + + self._started = true + self.method = self.method || 'GET' + self.href = self.uri.href + + if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { + self.setHeader('content-length', self.src.stat.size) + } + if (self._aws) { + self.aws(self._aws, true) + } + + // We have a method named auth, which is completely different from the http.request + // auth option. If we don't remove it, we're gonna have a bad time. + var reqOptions = copy(self) + delete reqOptions.auth + + debug('make request', self.uri.href) + self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self)) + + if (self.timeout && !self.timeoutTimer) { + self.timeoutTimer = setTimeout(function () { + self.req.abort() + var e = new Error("ETIMEDOUT") + e.code = "ETIMEDOUT" + self.emit("error", e) + }, self.timeout) + + // Set additional timeout on socket - in case if remote + // server freeze after sending headers + if (self.req.setTimeout) { // only works on node 0.6+ + self.req.setTimeout(self.timeout, function () { + if (self.req) { + self.req.abort() + var e = new Error("ESOCKETTIMEDOUT") + e.code = "ESOCKETTIMEDOUT" + self.emit("error", e) + } + }) + } + } + + self.req.on('error', self.clientErrorHandler) + self.req.on('drain', function() { + self.emit('drain') + }) + self.on('end', function() { + if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler) + }) + self.emit('request', self.req) +} +Request.prototype.onResponse = function (response) { + var self = this + debug('onResponse', self.uri.href, response.statusCode, response.headers) + response.on('end', function() { + debug('response end', self.uri.href, response.statusCode, response.headers) + }); + + if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { + response.connection.once('error', self._parserErrorHandler) + } + if (self._aborted) { + debug('aborted', self.uri.href) + response.resume() + return + } + if (self._paused) response.pause() + else response.resume() + + self.response = response + response.request = self + response.toJSON = toJSON + + // XXX This is different on 0.10, because SSL is strict by default + if (self.httpModule === https && + self.strictSSL && + !response.client.authorized) { + debug('strict ssl error', self.uri.href) + var sslErr = response.client.authorizationError + self.emit('error', new Error('SSL Error: '+ sslErr)) + return + } + + if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')] + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + + var addCookie = function (cookie) { + if (self._jar){ + var targetCookieJar = self._jar.setCookie?self._jar:cookieJar; + + //set the cookie if it's domain in the href's domain. + targetCookieJar.setCookie(cookie, self.uri.href, function(err){ + if (err){ + console.warn('set cookie failed,'+ err) + } + }) + } + + } + + if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) { + var headerName = hasHeader('set-cookie', response.headers) + if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie) + else addCookie(response.headers[headerName]) + } + + var redirectTo = null + if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) { + var location = response.headers[hasHeader('location', response.headers)] + debug('redirect', location) + + if (self.followAllRedirects) { + redirectTo = location + } else if (self.followRedirect) { + switch (self.method) { + case 'PATCH': + case 'PUT': + case 'POST': + case 'DELETE': + // Do not follow redirects + break + default: + redirectTo = location + break + } + } + } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) { + var authHeader = response.headers[hasHeader('www-authenticate', response.headers)] + var authVerb = authHeader && authHeader.split(' ')[0] + debug('reauth', authVerb) + + switch (authVerb) { + case 'Basic': + self.auth(self._user, self._pass, true) + redirectTo = self.uri + break + + case 'Digest': + // TODO: More complete implementation of RFC 2617. + // - check challenge.algorithm + // - support algorithm="MD5-sess" + // - handle challenge.domain + // - support qop="auth-int" only + // - handle Authentication-Info (not necessarily?) + // - check challenge.stale (not necessarily?) + // - increase nc (not necessarily?) + // For reference: + // http://tools.ietf.org/html/rfc2617#section-3 + // https://github.com/bagder/curl/blob/master/lib/http_digest.c + + var challenge = {} + var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi + for (;;) { + var match = re.exec(authHeader) + if (!match) break + challenge[match[1]] = match[2] || match[3]; + } + + var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass) + var ha2 = md5(self.method + ':' + self.uri.path) + var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' + var nc = qop && '00000001' + var cnonce = qop && uuid().replace(/-/g, '') + var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2) + var authValues = { + username: self._user, + realm: challenge.realm, + nonce: challenge.nonce, + uri: self.uri.path, + qop: qop, + response: digestResponse, + nc: nc, + cnonce: cnonce, + algorithm: challenge.algorithm, + opaque: challenge.opaque + } + + authHeader = [] + for (var k in authValues) { + if (!authValues[k]) { + //ignore + } else if (k === 'qop' || k === 'nc' || k === 'algorithm') { + authHeader.push(k + '=' + authValues[k]) + } else { + authHeader.push(k + '="' + authValues[k] + '"') + } + } + authHeader = 'Digest ' + authHeader.join(', ') + self.setHeader('authorization', authHeader) + self._sentAuth = true + + redirectTo = self.uri + break + } + } + + if (redirectTo) { + debug('redirect to', redirectTo) + + // ignore any potential response body. it cannot possibly be useful + // to us at this point. + if (self._paused) response.resume() + + if (self._redirectsFollowed >= self.maxRedirects) { + self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href)) + return + } + self._redirectsFollowed += 1 + + if (!isUrl.test(redirectTo)) { + redirectTo = url.resolve(self.uri.href, redirectTo) + } + + var uriPrev = self.uri + self.uri = url.parse(redirectTo) + + // handle the case where we change protocol from https to http or vice versa + if (self.uri.protocol !== uriPrev.protocol) { + self._updateProtocol() + } + + self.redirects.push( + { statusCode : response.statusCode + , redirectUri: redirectTo + } + ) + if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET' + // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215 + delete self.src + delete self.req + delete self.agent + delete self._started + if (response.statusCode != 401) { + // Remove parameters from the previous response, unless this is the second request + // for a server that requires digest authentication. + delete self.body + delete self._form + if (self.headers) { + if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')] + if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')] + if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')] + } + } + + self.emit('redirect'); + + self.init() + return // Ignore the rest of the response + } else { + self._redirectsFollowed = self._redirectsFollowed || 0 + // Be a good stream and emit end when the response is finished. + // Hack to emit end on close because of a core bug that never fires end + response.on('close', function () { + if (!self._ended) self.response.emit('end') + }) + + if (self.encoding) { + if (self.dests.length !== 0) { + console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") + } else { + response.setEncoding(self.encoding) + } + } + + self.emit('response', response) + + self.dests.forEach(function (dest) { + self.pipeDest(dest) + }) + + response.on("data", function (chunk) { + self._destdata = true + self.emit("data", chunk) + }) + response.on("end", function (chunk) { + self._ended = true + self.emit("end", chunk) + }) + response.on("close", function () {self.emit("close")}) + + if (self.callback) { + var buffer = [] + var bodyLen = 0 + self.on("data", function (chunk) { + buffer.push(chunk) + bodyLen += chunk.length + }) + self.on("end", function () { + debug('end event', self.uri.href) + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + + if (buffer.length && Buffer.isBuffer(buffer[0])) { + debug('has body', self.uri.href, bodyLen) + var body = new Buffer(bodyLen) + var i = 0 + buffer.forEach(function (chunk) { + chunk.copy(body, i, 0, chunk.length) + i += chunk.length + }) + if (self.encoding === null) { + response.body = body + } else { + response.body = body.toString(self.encoding) + } + } else if (buffer.length) { + // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. + // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). + if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") { + buffer[0] = buffer[0].substring(1) + } + response.body = buffer.join('') + } + + if (self._json) { + try { + response.body = JSON.parse(response.body) + } catch (e) {} + } + debug('emitting complete', self.uri.href) + if(response.body == undefined && !self._json) { + response.body = ""; + } + self.emit('complete', response, response.body) + }) + } + //if no callback + else{ + self.on("end", function () { + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + self.emit('complete', response); + }); + } + } + debug('finish init function', self.uri.href) +} + +Request.prototype.abort = function () { + this._aborted = true + + if (this.req) { + this.req.abort() + } + else if (this.response) { + this.response.abort() + } + + this.emit("abort") +} + +Request.prototype.pipeDest = function (dest) { + var response = this.response + // Called after the response is received + if (dest.headers && !dest.headersSent) { + if (hasHeader('content-type', response.headers)) { + var ctname = hasHeader('content-type', response.headers) + if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname]) + else dest.headers[ctname] = response.headers[ctname] + } + + if (hasHeader('content-length', response.headers)) { + var clname = hasHeader('content-length', response.headers) + if (dest.setHeader) dest.setHeader(clname, response.headers[clname]) + else dest.headers[clname] = response.headers[clname] + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i in response.headers) { + dest.setHeader(i, response.headers[i]) + } + dest.statusCode = response.statusCode + } + if (this.pipefilter) this.pipefilter(response, dest) +} + +// Composable API +Request.prototype.setHeader = function (name, value, clobber) { + if (clobber === undefined) clobber = true + if (clobber || !this.hasHeader(name)) this.headers[name] = value + else this.headers[this.hasHeader(name)] += ',' + value + return this +} +Request.prototype.setHeaders = function (headers) { + for (var i in headers) {this.setHeader(i, headers[i])} + return this +} +Request.prototype.hasHeader = function (header, headers) { + var headers = Object.keys(headers || this.headers) + , lheaders = headers.map(function (h) {return h.toLowerCase()}) + ; + header = header.toLowerCase() + for (var i=0;i + +[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) + + + +**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** + +Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. + +```js +fs.createReadStream('ex.txt') + .pipe(through2(function (chunk, enc, callback) { + + for (var i = 0; i < chunk.length; i++) + if (chunk[i] == 97) + chunk[i] = 122 // swap 'a' for 'z' + + this.push(chunk) + + callback() + + })) + .pipe(fs.createWriteStream('out.txt')) +``` + +Or object streams: + +```js +var all = [] + +fs.createReadStream('data.csv') + .pipe(csv2()) + .pipe(through2.obj(function (chunk, enc, callback) { + + var data = { + name : chunk[0] + , address : chunk[3] + , phone : chunk[10] + } + + this.push(data) + + callback() + + })) + .on('data', function (data) { + all.push(data) + }) + .on('end', function () { + doSomethingSpecial(all) + }) +``` + +Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. + +## API + +through2([ options, ] [ transformFunction ] [, flushFunction ]) + +Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). + +### options + +The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). + +The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { + + this.push(new Buffer('wut?')) + cb() + + }) + .pipe(fs.createWriteStream('/tmp/wut.txt')) +``` + +### transformFunction + +The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. + +To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. + +If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. + +### flushFunction + +The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. + +through2.ctor([ options, ] transformFunction[, flushFunction ]) + +Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. + +```js +var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { + if (record.temp != null && record.unit = "F") { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = "C" + } + this.push(record) + callback() +}) + +// Create instances of FToC like so: +var converter = new FToC() +// Or: +var converter = FToC() +// Or specify/override options when you instantiate, if you prefer: +var converter = FToC({objectMode: true}) +``` + +## License + +**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore new file mode 100644 index 00000000..38344f87 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE new file mode 100644 index 00000000..0c44ae71 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md new file mode 100644 index 00000000..be976683 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md @@ -0,0 +1,768 @@ +# readable-stream + +A new class of streams for Node.js + +This module provides the new Stream base classes introduced in Node +v0.10, for use in Node v0.8. You can use it to have programs that +have to work with node v0.8, while being forward-compatible for v0.10 +and beyond. When you drop support for v0.8, you can remove this +module, and only use the native streams. + +This is almost exactly the same codebase as appears in Node v0.10. +However: + +1. The exported object is actually the Readable class. Decorating the + native `stream` module would be global pollution. +2. In v0.10, you can safely use `base64` as an argument to + `setEncoding` in Readable streams. However, in v0.8, the + StringDecoder class has no `end()` method, which is problematic for + Base64. So, don't use that, because it'll break and be weird. + +Other than that, the API is the same as `require('stream')` in v0.10, +so the API docs are reproduced below. + +---------- + + Stability: 2 - Unstable + +A stream is an abstract interface implemented by various objects in +Node. For example a request to an HTTP server is a stream, as is +stdout. Streams are readable, writable, or both. All streams are +instances of [EventEmitter][] + +You can load the Stream base classes by doing `require('stream')`. +There are base classes provided for Readable streams, Writable +streams, Duplex streams, and Transform streams. + +## Compatibility + +In earlier versions of Node, the Readable stream interface was +simpler, but also less powerful and less useful. + +* Rather than waiting for you to call the `read()` method, `'data'` + events would start emitting immediately. If you needed to do some + I/O to decide how to handle data, then you had to store the chunks + in some kind of buffer so that they would not be lost. +* The `pause()` method was advisory, rather than guaranteed. This + meant that you still had to be prepared to receive `'data'` events + even when the stream was in a paused state. + +In Node v0.10, the Readable class described below was added. For +backwards compatibility with older Node programs, Readable streams +switch into "old mode" when a `'data'` event handler is added, or when +the `pause()` or `resume()` methods are called. The effect is that, +even if you are not using the new `read()` method and `'readable'` +event, you no longer have to worry about losing `'data'` chunks. + +Most programs will continue to function normally. However, this +introduces an edge case in the following conditions: + +* No `'data'` event handler is added. +* The `pause()` and `resume()` methods are never called. + +For example, consider the following code: + +```javascript +// WARNING! BROKEN! +net.createServer(function(socket) { + + // we add an 'end' method, but never consume the data + socket.on('end', function() { + // It will never get here. + socket.end('I got your message (but didnt read it)\n'); + }); + +}).listen(1337); +``` + +In versions of node prior to v0.10, the incoming message data would be +simply discarded. However, in Node v0.10 and beyond, the socket will +remain paused forever. + +The workaround in this situation is to call the `resume()` method to +trigger "old mode" behavior: + +```javascript +// Workaround +net.createServer(function(socket) { + + socket.on('end', function() { + socket.end('I got your message (but didnt read it)\n'); + }); + + // start the flow of data, discarding it. + socket.resume(); + +}).listen(1337); +``` + +In addition to new Readable streams switching into old-mode, pre-v0.10 +style streams can be wrapped in a Readable class using the `wrap()` +method. + +## Class: stream.Readable + + + +A `Readable Stream` has the following methods, members, and events. + +Note that `stream.Readable` is an abstract class designed to be +extended with an underlying implementation of the `_read(size)` +method. (See below.) + +### new stream.Readable([options]) + +* `options` {Object} + * `highWaterMark` {Number} The maximum number of bytes to store in + the internal buffer before ceasing to read from the underlying + resource. Default=16kb + * `encoding` {String} If specified, then buffers will be decoded to + strings using the specified encoding. Default=null + * `objectMode` {Boolean} Whether this stream should behave + as a stream of objects. Meaning that stream.read(n) returns + a single value instead of a Buffer of size n + +In classes that extend the Readable class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### readable.\_read(size) + +* `size` {Number} Number of bytes to read asynchronously + +Note: **This function should NOT be called directly.** It should be +implemented by child classes, and called by the internal Readable +class methods only. + +All Readable stream implementations must provide a `_read` method +to fetch data from the underlying resource. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +When data is available, put it into the read queue by calling +`readable.push(chunk)`. If `push` returns false, then you should stop +reading. When `_read` is called again, you should start pushing more +data. + +The `size` argument is advisory. Implementations where a "read" is a +single call that returns data can use this to know how much data to +fetch. Implementations where that is not relevant, such as TCP or +TLS, may ignore this argument, and simply provide data whenever it +becomes available. There is no need, for example to "wait" until +`size` bytes are available before calling `stream.push(chunk)`. + +### readable.push(chunk) + +* `chunk` {Buffer | null | String} Chunk of data to push into the read queue +* return {Boolean} Whether or not more pushes should be performed + +Note: **This function should be called by Readable implementors, NOT +by consumers of Readable subclasses.** The `_read()` function will not +be called again until at least one `push(chunk)` call is made. If no +data is available, then you MAY call `push('')` (an empty string) to +allow a future `_read` call, without adding any data to the queue. + +The `Readable` class works by putting data into a read queue to be +pulled out later by calling the `read()` method when the `'readable'` +event fires. + +The `push()` method will explicitly insert some data into the read +queue. If it is called with `null` then it will signal the end of the +data. + +In some cases, you may be wrapping a lower-level source which has some +sort of pause/resume mechanism, and a data callback. In those cases, +you could wrap the low-level source object by doing something like +this: + +```javascript +// source is an object with readStop() and readStart() methods, +// and an `ondata` member that gets called when it has data, and +// an `onend` member that gets called when the data is over. + +var stream = new Readable(); + +source.ondata = function(chunk) { + // if push() returns false, then we need to stop reading from source + if (!stream.push(chunk)) + source.readStop(); +}; + +source.onend = function() { + stream.push(null); +}; + +// _read will be called when the stream wants to pull more data in +// the advisory size argument is ignored in this case. +stream._read = function(n) { + source.readStart(); +}; +``` + +### readable.unshift(chunk) + +* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue +* return {Boolean} Whether or not more pushes should be performed + +This is the corollary of `readable.push(chunk)`. Rather than putting +the data at the *end* of the read queue, it puts it at the *front* of +the read queue. + +This is useful in certain use-cases where a stream is being consumed +by a parser, which needs to "un-consume" some data that it has +optimistically pulled out of the source. + +```javascript +// A parser for a simple data protocol. +// The "header" is a JSON object, followed by 2 \n characters, and +// then a message body. +// +// Note: This can be done more simply as a Transform stream. See below. + +function SimpleProtocol(source, options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Readable.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + + // source is a readable stream, such as a socket or file + this._source = source; + + var self = this; + source.on('end', function() { + self.push(null); + }); + + // give it a kick whenever the source is readable + // read(0) will not consume any bytes + source.on('readable', function() { + self.read(0); + }); + + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype = Object.create( + Readable.prototype, { constructor: { value: SimpleProtocol }}); + +SimpleProtocol.prototype._read = function(n) { + if (!this._inBody) { + var chunk = this._source.read(); + + // if the source doesn't have data, we don't have data yet. + if (chunk === null) + return this.push(''); + + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + this.push(''); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // now, because we got some extra data, unshift the rest + // back into the read queue so that our consumer will see it. + var b = chunk.slice(split); + this.unshift(b); + + // and let them know that we are done parsing the header. + this.emit('header', this.header); + } + } else { + // from there on, just provide the data to our consumer. + // careful not to push(null), since that would indicate EOF. + var chunk = this._source.read(); + if (chunk) this.push(chunk); + } +}; + +// Usage: +var parser = new SimpleProtocol(source); +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + +### readable.wrap(stream) + +* `stream` {Stream} An "old style" readable stream + +If you are using an older Node library that emits `'data'` events and +has a `pause()` method that is advisory only, then you can use the +`wrap()` method to create a Readable stream that uses the old stream +as its data source. + +For example: + +```javascript +var OldReader = require('./old-api-module.js').OldReader; +var oreader = new OldReader; +var Readable = require('stream').Readable; +var myReader = new Readable().wrap(oreader); + +myReader.on('readable', function() { + myReader.read(); // etc. +}); +``` + +### Event: 'readable' + +When there is data ready to be consumed, this event will fire. + +When this event emits, call the `read()` method to consume the data. + +### Event: 'end' + +Emitted when the stream has received an EOF (FIN in TCP terminology). +Indicates that no more `'data'` events will happen. If the stream is +also writable, it may be possible to continue writing. + +### Event: 'data' + +The `'data'` event emits either a `Buffer` (by default) or a string if +`setEncoding()` was used. + +Note that adding a `'data'` event listener will switch the Readable +stream into "old mode", where data is emitted as soon as it is +available, rather than waiting for you to call `read()` to consume it. + +### Event: 'error' + +Emitted if there was an error receiving data. + +### Event: 'close' + +Emitted when the underlying resource (for example, the backing file +descriptor) has been closed. Not all streams will emit this. + +### readable.setEncoding(encoding) + +Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` +can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. + +The encoding can also be set by specifying an `encoding` field to the +constructor. + +### readable.read([size]) + +* `size` {Number | null} Optional number of bytes to read. +* Return: {Buffer | String | null} + +Note: **This function SHOULD be called by Readable stream users.** + +Call this method to consume data once the `'readable'` event is +emitted. + +The `size` argument will set a minimum number of bytes that you are +interested in. If not set, then the entire content of the internal +buffer is returned. + +If there is no data to consume, or if there are fewer bytes in the +internal buffer than the `size` argument, then `null` is returned, and +a future `'readable'` event will be emitted when more is available. + +Calling `stream.read(0)` will always return `null`, and will trigger a +refresh of the internal buffer, but otherwise be a no-op. + +### readable.pipe(destination, [options]) + +* `destination` {Writable Stream} +* `options` {Object} Optional + * `end` {Boolean} Default=true + +Connects this readable stream to `destination` WriteStream. Incoming +data on this stream gets written to `destination`. Properly manages +back-pressure so that a slow destination will not be overwhelmed by a +fast readable stream. + +This function returns the `destination` stream. + +For example, emulating the Unix `cat` command: + + process.stdin.pipe(process.stdout); + +By default `end()` is called on the destination when the source stream +emits `end`, so that `destination` is no longer writable. Pass `{ end: +false }` as `options` to keep the destination stream open. + +This keeps `writer` open so that "Goodbye" can be written at the +end. + + reader.pipe(writer, { end: false }); + reader.on("end", function() { + writer.end("Goodbye\n"); + }); + +Note that `process.stderr` and `process.stdout` are never closed until +the process exits, regardless of the specified options. + +### readable.unpipe([destination]) + +* `destination` {Writable Stream} Optional + +Undo a previously established `pipe()`. If no destination is +provided, then all previously established pipes are removed. + +### readable.pause() + +Switches the readable stream into "old mode", where data is emitted +using a `'data'` event rather than being buffered for consumption via +the `read()` method. + +Ceases the flow of data. No `'data'` events are emitted while the +stream is in a paused state. + +### readable.resume() + +Switches the readable stream into "old mode", where data is emitted +using a `'data'` event rather than being buffered for consumption via +the `read()` method. + +Resumes the incoming `'data'` events after a `pause()`. + + +## Class: stream.Writable + + + +A `Writable` Stream has the following methods, members, and events. + +Note that `stream.Writable` is an abstract class designed to be +extended with an underlying implementation of the +`_write(chunk, encoding, cb)` method. (See below.) + +### new stream.Writable([options]) + +* `options` {Object} + * `highWaterMark` {Number} Buffer level when `write()` starts + returning false. Default=16kb + * `decodeStrings` {Boolean} Whether or not to decode strings into + Buffers before passing them to `_write()`. Default=true + +In classes that extend the Writable class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### writable.\_write(chunk, encoding, callback) + +* `chunk` {Buffer | String} The chunk to be written. Will always + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. Ignore chunk is a buffer. Note that chunk will + **always** be a buffer unless the `decodeStrings` option is + explicitly set to `false`. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. + +All Writable stream implementations must provide a `_write` method to +send data to the underlying resource. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Writable +class methods only. + +Call the callback using the standard `callback(error)` pattern to +signal that the write completed successfully or with an error. + +If the `decodeStrings` flag is set in the constructor options, then +`chunk` may be a string rather than a Buffer, and `encoding` will +indicate the sort of string that it is. This is to support +implementations that have an optimized handling for certain string +data encodings. If you do not explicitly set the `decodeStrings` +option to `false`, then you can safely ignore the `encoding` argument, +and assume that `chunk` will always be a Buffer. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + + +### writable.write(chunk, [encoding], [callback]) + +* `chunk` {Buffer | String} Data to be written +* `encoding` {String} Optional. If `chunk` is a string, then encoding + defaults to `'utf8'` +* `callback` {Function} Optional. Called when this chunk is + successfully written. +* Returns {Boolean} + +Writes `chunk` to the stream. Returns `true` if the data has been +flushed to the underlying resource. Returns `false` to indicate that +the buffer is full, and the data will be sent out in the future. The +`'drain'` event will indicate when the buffer is empty again. + +The specifics of when `write()` will return false, is determined by +the `highWaterMark` option provided to the constructor. + +### writable.end([chunk], [encoding], [callback]) + +* `chunk` {Buffer | String} Optional final data to be written +* `encoding` {String} Optional. If `chunk` is a string, then encoding + defaults to `'utf8'` +* `callback` {Function} Optional. Called when the final chunk is + successfully written. + +Call this method to signal the end of the data being written to the +stream. + +### Event: 'drain' + +Emitted when the stream's write queue empties and it's safe to write +without buffering again. Listen for it when `stream.write()` returns +`false`. + +### Event: 'close' + +Emitted when the underlying resource (for example, the backing file +descriptor) has been closed. Not all streams will emit this. + +### Event: 'finish' + +When `end()` is called and there are no more chunks to write, this +event is emitted. + +### Event: 'pipe' + +* `source` {Readable Stream} + +Emitted when the stream is passed to a readable stream's pipe method. + +### Event 'unpipe' + +* `source` {Readable Stream} + +Emitted when a previously established `pipe()` is removed using the +source Readable stream's `unpipe()` method. + +## Class: stream.Duplex + + + +A "duplex" stream is one that is both Readable and Writable, such as a +TCP socket connection. + +Note that `stream.Duplex` is an abstract class designed to be +extended with an underlying implementation of the `_read(size)` +and `_write(chunk, encoding, callback)` methods as you would with a Readable or +Writable stream class. + +Since JavaScript doesn't have multiple prototypal inheritance, this +class prototypally inherits from Readable, and then parasitically from +Writable. It is thus up to the user to implement both the lowlevel +`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method +on extension duplex classes. + +### new stream.Duplex(options) + +* `options` {Object} Passed to both Writable and Readable + constructors. Also has the following fields: + * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then + the stream will automatically end the readable side when the + writable side ends and vice versa. + +In classes that extend the Duplex class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +## Class: stream.Transform + +A "transform" stream is a duplex stream where the output is causally +connected in some way to the input, such as a zlib stream or a crypto +stream. + +There is no requirement that the output be the same size as the input, +the same number of chunks, or arrive at the same time. For example, a +Hash stream will only ever have a single chunk of output which is +provided when the input is ended. A zlib stream will either produce +much smaller or much larger than its input. + +Rather than implement the `_read()` and `_write()` methods, Transform +classes must implement the `_transform()` method, and may optionally +also implement the `_flush()` method. (See below.) + +### new stream.Transform([options]) + +* `options` {Object} Passed to both Writable and Readable + constructors. + +In classes that extend the Transform class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### transform.\_transform(chunk, encoding, callback) + +* `chunk` {Buffer | String} The chunk to be transformed. Will always + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. (Ignore if `decodeStrings` chunk is a buffer.) +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Transform +class methods only. + +All Transform stream implementations must provide a `_transform` +method to accept input and produce output. + +`_transform` should do whatever has to be done in this specific +Transform class, to handle the bytes being written, and pass them off +to the readable portion of the interface. Do asynchronous I/O, +process things, and so on. + +Call `transform.push(outputChunk)` 0 or more times to generate output +from this input chunk, depending on how much data you want to output +as a result of this chunk. + +Call the callback function only when the current chunk is completely +consumed. Note that there may or may not be output as a result of any +particular input chunk. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +### transform.\_flush(callback) + +* `callback` {Function} Call this function (optionally with an error + argument) when you are done flushing any remaining data. + +Note: **This function MUST NOT be called directly.** It MAY be implemented +by child classes, and if so, will be called by the internal Transform +class methods only. + +In some cases, your transform operation may need to emit a bit more +data at the end of the stream. For example, a `Zlib` compression +stream will store up some internal state so that it can optimally +compress the output. At the end, however, it needs to do the best it +can with what is left, so that the data will be complete. + +In those cases, you can implement a `_flush` method, which will be +called at the very end, after all the written data is consumed, but +before emitting `end` to signal the end of the readable side. Just +like with `_transform`, call `transform.push(chunk)` zero or more +times, as appropriate, and call `callback` when the flush operation is +complete. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +### Example: `SimpleProtocol` parser + +The example above of a simple protocol parser can be implemented much +more simply by using the higher level `Transform` stream class. + +In this example, rather than providing the input as an argument, it +would be piped into the parser, which is a more idiomatic Node stream +approach. + +```javascript +function SimpleProtocol(options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Transform.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype = Object.create( + Transform.prototype, { constructor: { value: SimpleProtocol }}); + +SimpleProtocol.prototype._transform = function(chunk, encoding, done) { + if (!this._inBody) { + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // and let them know that we are done parsing the header. + this.emit('header', this.header); + + // now, because we got some extra data, emit this first. + this.push(b); + } + } else { + // from there on, just provide the data to our consumer as-is. + this.push(b); + } + done(); +}; + +var parser = new SimpleProtocol(); +source.pipe(parser) + +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + + +## Class: stream.PassThrough + +This is a trivial implementation of a `Transform` stream that simply +passes the input bytes across to the output. Its purpose is mainly +for examples and testing, but there are occasionally use cases where +it can come in handy. + + +[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js new file mode 100644 index 00000000..ca807af8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch new file mode 100644 index 00000000..0ad71a1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch @@ -0,0 +1,68 @@ +diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js +index c5a741c..a2e0d8e 100644 +--- a/lib/_stream_duplex.js ++++ b/lib/_stream_duplex.js +@@ -26,8 +26,8 @@ + + module.exports = Duplex; + var util = require('util'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('./_stream_readable'); ++var Writable = require('./_stream_writable'); + + util.inherits(Duplex, Readable); + +diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js +index a5e9864..330c247 100644 +--- a/lib/_stream_passthrough.js ++++ b/lib/_stream_passthrough.js +@@ -25,7 +25,7 @@ + + module.exports = PassThrough; + +-var Transform = require('_stream_transform'); ++var Transform = require('./_stream_transform'); + var util = require('util'); + util.inherits(PassThrough, Transform); + +diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js +index 2259d2e..e6681ee 100644 +--- a/lib/_stream_readable.js ++++ b/lib/_stream_readable.js +@@ -23,6 +23,9 @@ module.exports = Readable; + Readable.ReadableState = ReadableState; + + var EE = require('events').EventEmitter; ++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { ++ return emitter.listeners(type).length; ++}; + var Stream = require('stream'); + var util = require('util'); + var StringDecoder; +diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js +index e925b4b..f08b05e 100644 +--- a/lib/_stream_transform.js ++++ b/lib/_stream_transform.js +@@ -64,7 +64,7 @@ + + module.exports = Transform; + +-var Duplex = require('_stream_duplex'); ++var Duplex = require('./_stream_duplex'); + var util = require('util'); + util.inherits(Transform, Duplex); + +diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js +index a26f711..56ca47d 100644 +--- a/lib/_stream_writable.js ++++ b/lib/_stream_writable.js +@@ -109,7 +109,7 @@ function WritableState(options, stream) { + function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. +- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) ++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000..a2e0d8e0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,69 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +module.exports = Duplex; +var util = require('util'); +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +Object.keys(Writable.prototype).forEach(function(method) { + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; +}); + +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000..330c247d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,41 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); +var util = require('util'); +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000..323f3305 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,927 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +module.exports = Readable; +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +var Stream = require('stream'); +var util = require('util'); +var StringDecoder; + +util.inherits(Readable, Stream); + +function ReadableState(options, stream) { + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = false; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // In streams that never have any data, and do push(null) right away, + // the consumer can miss the 'end' event if they do some I/O before + // consuming the stream. So, we don't emit('end') until some reading + // happens. + this.calledRead = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (typeof chunk === 'string' && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null || chunk === undefined) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) { + state.buffer.unshift(chunk); + } else { + state.reading = false; + state.buffer.push(chunk); + } + + if (state.needReadable) + emitReadable(stream); + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (isNaN(n) || n === null) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + var state = this._readableState; + state.calledRead = true; + var nOrig = n; + + if (typeof n !== 'number' || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + + // if we currently have less than the highWaterMark, then also read some + if (state.length - n <= state.highWaterMark) + doRead = true; + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) + doRead = false; + + if (doRead) { + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read called its callback synchronously, then `reading` + // will be false, and we need to re-evaluate how much data we + // can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we happened to read() exactly the remaining amount in the + // buffer, and the EOF has been seen at this point, then make sure + // that we emit 'end' on the very next tick. + if (state.ended && !state.endEmitted && state.length === 0) + endReadable(this); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode && + !er) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // if we've ended and we have some data left, then emit + // 'readable' now to make sure it gets picked up. + if (state.length > 0) + emitReadable(stream); + else + endReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (state.emittedReadable) + return; + + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); +} + +function emitReadable_(stream) { + stream.emit('readable'); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + if (readable !== src) return; + cleanup(); + } + + function onend() { + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (!dest._writableState || dest._writableState.needDrain) + ondrain(); + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (Array.isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; + + + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + // the handler that waits for readable events after all + // the data gets sucked out in flow. + // This would be easier to follow with a .once() handler + // in flow(), but that is too slow. + this.on('readable', pipeOnReadable); + + state.flowing = true; + process.nextTick(function() { + flow(src); + }); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var dest = this; + var state = src._readableState; + state.awaitDrain--; + if (state.awaitDrain === 0) + flow(src); + }; +} + +function flow(src) { + var state = src._readableState; + var chunk; + state.awaitDrain = 0; + + function write(dest, i, list) { + var written = dest.write(chunk); + if (false === written) { + state.awaitDrain++; + } + } + + while (state.pipesCount && null !== (chunk = src.read())) { + + if (state.pipesCount === 1) + write(state.pipes, 0, null); + else + state.pipes.forEach(write); + + src.emit('data', chunk); + + // if anyone needs a drain, then we have to wait for that. + if (state.awaitDrain > 0) + return; + } + + // if every destination was unpiped, either before entering this + // function, or in the while loop, then stop flowing. + // + // NB: This is a pretty rare edge case. + if (state.pipesCount === 0) { + state.flowing = false; + + // if there were data event listeners added, then switch to old mode. + if (EE.listenerCount(src, 'data') > 0) + emitDataEvents(src); + return; + } + + // at this point, no one needed a drain, so we just ran out of data + // on the next readable event, start it over again. + state.ranOut = true; +} + +function pipeOnReadable() { + if (this._readableState.ranOut) { + this._readableState.ranOut = false; + flow(this); + } +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = state.pipes.indexOf(dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data' && !this._readableState.flowing) + emitDataEvents(this); + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + this.read(0); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + emitDataEvents(this); + this.read(0); + this.emit('resume'); +}; + +Readable.prototype.pause = function() { + emitDataEvents(this, true); + this.emit('pause'); +}; + +function emitDataEvents(stream, startPaused) { + var state = stream._readableState; + + if (state.flowing) { + // https://github.com/isaacs/readable-stream/issues/16 + throw new Error('Cannot switch to old mode now.'); + } + + var paused = startPaused || false; + var readable = false; + + // convert to an old-style stream. + stream.readable = true; + stream.pipe = Stream.prototype.pipe; + stream.on = stream.addListener = Stream.prototype.on; + + stream.on('readable', function() { + readable = true; + + var c; + while (!paused && (null !== (c = stream.read()))) + stream.emit('data', c); + + if (c === null) { + readable = false; + stream._readableState.needReadable = true; + } + }); + + stream.pause = function() { + paused = true; + this.emit('pause'); + }; + + stream.resume = function() { + paused = false; + if (readable) + process.nextTick(function() { + stream.emit('readable'); + }); + else + this.read(0); + this.emit('resume'); + }; + + // now make it start, just in case it hadn't already. + stream.emit('readable'); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + if (state.decoder) + chunk = state.decoder.write(chunk); + if (!chunk || !state.objectMode && !chunk.length) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (typeof stream[i] === 'function' && + typeof this[i] === 'undefined') { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + events.forEach(function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted && state.calledRead) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000..707e4b3b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,205 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); +var util = require('util'); +util.inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + var ts = this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + this.once('finish', function() { + if ('function' === typeof this._flush) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error('not implemented'); +}; + +Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || + rs.needReadable || + rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function(n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var rs = stream._readableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000..9eaf4ec2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,371 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; +Writable.WritableState = WritableState; + +var util = require('util'); +var assert = require('assert'); +var Stream = require('stream'); + +util.inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + options = options || {}; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function(er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.buffer = []; +} + +function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (typeof cb !== 'function') + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) + ret = writeOrBuffer(this, state, chunk, encoding, cb); + + return ret; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + typeof chunk === 'string') { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) + state.needDrain = true; + + if (state.writing) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + else + doWrite(stream, state, len, chunk, encoding, cb); + + return ret; +} + +function doWrite(stream, state, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + process.nextTick(function() { + cb(er); + }); + else + cb(er); + + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) + onwriteError(stream, state, sync, er, cb); + else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(stream, state); + + if (!finished && !state.bufferProcessing && state.buffer.length) + clearBuffer(stream, state); + + if (sync) { + process.nextTick(function() { + afterWrite(stream, state, finished, cb); + }); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + cb(); + if (finished) + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, len, chunk, encoding, cb); + + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + c++; + break; + } + } + + state.bufferProcessing = false; + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); +}; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (typeof chunk !== 'undefined' && chunk !== null) + this.write(chunk, encoding); + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + state.finished = true; + stream.emit('finish'); + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once('finish', cb); + } + state.ended = true; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore new file mode 100644 index 00000000..b512c09d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE new file mode 100644 index 00000000..6de584a4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE @@ -0,0 +1,20 @@ +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md new file mode 100644 index 00000000..4d2aa001 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md @@ -0,0 +1,7 @@ +**string_decoder.js** (`require('string_decoder')`) from Node.js core + +Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. + +Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** + +The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js new file mode 100755 index 00000000..46470cfd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js @@ -0,0 +1,94 @@ +#!/usr/bin/env node + +const hyperquest = require('hyperzip')(require('hyperdirect')) + , bl = require('bl') + , fs = require('fs') + , path = require('path') + , cheerio = require('cheerio') + + , files = require('./files') + , testReplace = require('./test-replacements') + + , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' + , libsrcurl = srcurlpfx + 'lib/' + , testsrcurl = srcurlpfx + 'test/simple/' + , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' + , libourroot = path.join(__dirname, '../') + , testourroot = path.join(__dirname, '../test/simple/') + + +function processFile (url, out, replacements) { + hyperquest(url).pipe(bl(function (err, data) { + if (err) + throw err + + data = data.toString() + replacements.forEach(function (replacement) { + data = data.replace.apply(data, replacement) + }) + + fs.writeFile(out, data, 'utf8', function (err) { + if (err) + throw err + + console.log('Wrote', out) + }) + })) +} + +function processLibFile (file) { + var replacements = files[file] + , url = libsrcurl + file + , out = path.join(libourroot, replacements.out || file) + + processFile(url, out, replacements) +} + + +function processTestFile (file) { + var replacements = testReplace.all + , url = testsrcurl + file + , out = path.join(testourroot, file) + + if (testReplace[file]) + replacements = replacements.concat(testReplace[file]) + + processFile(url, out, replacements) +} + + +if (!/0\.1\d\.\d+/.test(process.argv[2])) { + console.log('Usage: build.js ') + return process.exit(-1) +} + + +//-------------------------------------------------------------------- +// Grab & process files in ../lib/ + +Object.keys(files).forEach(processLibFile) + +//-------------------------------------------------------------------- +// Discover, grab and process all test-string-decoder* files on joyent/node + +hyperquest(testlisturl).pipe(bl(function (err, data) { + if (err) + throw err + + var $ = cheerio.load(data.toString()) + + $('table.files .js-directory-link').each(function () { + var file = $(this).text() + if (/^test-string-decoder/.test(file) || file == 'common.js') + processTestFile(file) + }) +})) + +//-------------------------------------------------------------------- +// Grab the joyent/node test/common.js + +processFile( + testsrcurl + '../common.js' + , path.join(testourroot, '../common.js') + , testReplace['common.js'] +) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js new file mode 100644 index 00000000..7396a4f4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js @@ -0,0 +1,36 @@ +/* This file lists the files to be fetched from the node repo + * in the /lib/ directory which will be placed in the ../lib/ + * directory after having each of the "replacements" in the + * array for that file applied to it. The replacements are + * simply the arguments to String#replace, so they can be + * strings, regexes, functions. + */ + +module.exports['string_decoder.js'] = [ + + // pull in Bufer as a require + // add Buffer.isEncoding where missing + [ + /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m + , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' + + '\n' + + '\nvar isBufferEncoding = Buffer.isEncoding' + + '\n || function(encoding) {' + + '\n switch (encoding && encoding.toLowerCase()) {' + + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' + + '\n default: return false;' + + '\n }' + + '\n }' + + '\n' + + ] + + // use custom Buffer.isEncoding reference + , [ + /Buffer\.isEncoding\(/g + , 'isBufferEncoding\(' + ] + +] + +module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json new file mode 100644 index 00000000..f7ee6a46 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json @@ -0,0 +1,12 @@ +{ + "name": "string_decoder-build", + "version": "0.0.0", + "description": "", + "main": "build.js", + "dependencies": { + "bl": "~0.6.0", + "hyperzip": "0.0.0", + "hyperdirect": "0.0.0", + "cheerio": "~0.13.1" + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js new file mode 100644 index 00000000..5bbf6028 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js @@ -0,0 +1,24 @@ +module.exports.all = [ + [ + /require\(['"]string_decoder['"]\)/g + , 'require(\'../../\')' + ] + +] + +module.exports['common.js'] = [ + [ + /^ setImmediate,$/m + , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' + ] + + , [ + /^ clearImmediate,$/m + , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' + ] + + , [ + /^ global];$/m + , ' global].filter(Boolean);' + ] +] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js new file mode 100644 index 00000000..2e44a03e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -0,0 +1,200 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + this.charBuffer = new Buffer(6); + this.charReceived = 0; + this.charLength = 0; +}; + + +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + var offset = 0; + + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var i = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, offset, i); + this.charReceived += (i - offset); + offset = i; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (i == buffer.length) return charStr; + + // otherwise cut off the characters end from the beginning of this buffer + buffer = buffer.slice(i, buffer.length); + break; + } + + var lenIncomplete = this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); + this.charReceived = lenIncomplete; + end -= lenIncomplete; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + + return i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + var incomplete = this.charReceived = buffer.length % 2; + this.charLength = incomplete ? 2 : 0; + return incomplete; +} + +function base64DetectIncompleteChar(buffer) { + var incomplete = this.charReceived = buffer.length % 3; + this.charLength = incomplete ? 3 : 0; + return incomplete; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json new file mode 100644 index 00000000..c7cac1a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -0,0 +1,36 @@ +{ + "name": "string_decoder", + "version": "0.10.25", + "description": "The string_decoder module from Node core", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tap": "~0.4.8" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "_id": "string_decoder@0.10.25", + "dist": { + "shasum": "aa026a29a0177ff13c8df4472dcda2f26d646900" + }, + "_from": "string_decoder@~0.10.x", + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js new file mode 100644 index 00000000..ed5ff08d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js @@ -0,0 +1,200 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var path = require('path'); +var assert = require('assert'); + +exports.testDir = path.dirname(__filename); +exports.fixturesDir = path.join(exports.testDir, 'fixtures'); +exports.libDir = path.join(exports.testDir, '../lib'); +exports.tmpDir = path.join(exports.testDir, 'tmp'); +exports.PORT = +process.env.NODE_COMMON_PORT || 12346; + +if (process.platform === 'win32') { + exports.PIPE = '\\\\.\\pipe\\libuv-test'; +} else { + exports.PIPE = exports.tmpDir + '/test.sock'; +} + +var util = require('util'); +for (var i in util) exports[i] = util[i]; +//for (var i in exports) global[i] = exports[i]; + +function protoCtrChain(o) { + var result = []; + for (; o; o = o.__proto__) { result.push(o.constructor); } + return result.join(); +} + +exports.indirectInstanceOf = function(obj, cls) { + if (obj instanceof cls) { return true; } + var clsChain = protoCtrChain(cls.prototype); + var objChain = protoCtrChain(obj); + return objChain.slice(-clsChain.length) === clsChain; +}; + + +exports.ddCommand = function(filename, kilobytes) { + if (process.platform === 'win32') { + var p = path.resolve(exports.fixturesDir, 'create-file.js'); + return '"' + process.argv[0] + '" "' + p + '" "' + + filename + '" ' + (kilobytes * 1024); + } else { + return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; + } +}; + + +exports.spawnCat = function(options) { + var spawn = require('child_process').spawn; + + if (process.platform === 'win32') { + return spawn('more', [], options); + } else { + return spawn('cat', [], options); + } +}; + + +exports.spawnPwd = function(options) { + var spawn = require('child_process').spawn; + + if (process.platform === 'win32') { + return spawn('cmd.exe', ['/c', 'cd'], options); + } else { + return spawn('pwd', [], options); + } +}; + + +// Turn this off if the test should not check for global leaks. +exports.globalCheck = true; + +process.on('exit', function() { + if (!exports.globalCheck) return; + var knownGlobals = [setTimeout, + setInterval, + typeof setImmediate == 'undefined' ? null : setImmediate, + clearTimeout, + clearInterval, + typeof clearImmediate == 'undefined' ? null : clearImmediate, + console, + Buffer, + process, + global].filter(Boolean); + + if (global.gc) { + knownGlobals.push(gc); + } + + if (global.DTRACE_HTTP_SERVER_RESPONSE) { + knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); + knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); + knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); + knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); + knownGlobals.push(DTRACE_NET_STREAM_END); + knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); + knownGlobals.push(DTRACE_NET_SOCKET_READ); + knownGlobals.push(DTRACE_NET_SOCKET_WRITE); + } + if (global.COUNTER_NET_SERVER_CONNECTION) { + knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); + knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); + knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); + knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); + knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); + knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); + } + + if (global.ArrayBuffer) { + knownGlobals.push(ArrayBuffer); + knownGlobals.push(Int8Array); + knownGlobals.push(Uint8Array); + knownGlobals.push(Uint8ClampedArray); + knownGlobals.push(Int16Array); + knownGlobals.push(Uint16Array); + knownGlobals.push(Int32Array); + knownGlobals.push(Uint32Array); + knownGlobals.push(Float32Array); + knownGlobals.push(Float64Array); + knownGlobals.push(DataView); + } + + for (var x in global) { + var found = false; + + for (var y in knownGlobals) { + if (global[x] === knownGlobals[y]) { + found = true; + break; + } + } + + if (!found) { + console.error('Unknown global: %s', x); + assert.ok(false, 'Unknown global found'); + } + } +}); + + +var mustCallChecks = []; + + +function runCallChecks(exitCode) { + if (exitCode !== 0) return; + + var failed = mustCallChecks.filter(function(context) { + return context.actual !== context.expected; + }); + + failed.forEach(function(context) { + console.log('Mismatched %s function calls. Expected %d, actual %d.', + context.name, + context.expected, + context.actual); + console.log(context.stack.split('\n').slice(2).join('\n')); + }); + + if (failed.length) process.exit(1); +} + + +exports.mustCall = function(fn, expected) { + if (typeof expected !== 'number') expected = 1; + + var context = { + expected: expected, + actual: 0, + stack: (new Error).stack, + name: fn.name || '' + }; + + // add the exit listener only once to avoid listener leak warnings + if (mustCallChecks.length === 0) process.on('exit', runCallChecks); + + mustCallChecks.push(context); + + return function() { + context.actual++; + return fn.apply(this, arguments); + }; +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js new file mode 100644 index 00000000..869a4116 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js @@ -0,0 +1,75 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// verify that the string decoder works getting 1 byte at a time, +// the whole buffer at once, and that both match the .toString(enc) +// result of the entire buffer. + +var assert = require('assert'); +var SD = require('../../').StringDecoder; +var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; + +var bufs = [ '☃💩', 'asdf' ].map(function(b) { + return new Buffer(b); +}); + +// also test just arbitrary bytes from 0-15. +for (var i = 1; i <= 16; i++) { + var bytes = new Array(i).join('.').split('.').map(function(_, j) { + return j + 0x78; + }); + bufs.push(new Buffer(bytes)); +} + +encodings.forEach(testEncoding); + +console.log('ok'); + +function testEncoding(encoding) { + bufs.forEach(function(buf) { + testBuf(encoding, buf); + }); +} + +function testBuf(encoding, buf) { + console.error('# %s', encoding, buf); + + // write one byte at a time. + var s = new SD(encoding); + var res1 = ''; + for (var i = 0; i < buf.length; i++) { + res1 += s.write(buf.slice(i, i + 1)); + } + res1 += s.end(); + + // write the whole buffer at once. + var res2 = ''; + var s = new SD(encoding); + res2 += s.write(buf); + res2 += s.end(); + + // .toString() on the buffer + var res3 = buf.toString(encoding); + + console.log('expect=%j', res3); + assert.equal(res1, res3, 'one byte at a time should match toString'); + assert.equal(res2, res3, 'all bytes at once should match toString'); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js new file mode 100644 index 00000000..7f69f7ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js @@ -0,0 +1,163 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('../common'); +var assert = require('assert'); +var StringDecoder = require('../../').StringDecoder; +var decoder = new StringDecoder('utf8'); + + + +var buffer = new Buffer('$'); +assert.deepEqual('$', decoder.write(buffer)); + +buffer = new Buffer('¢'); +assert.deepEqual('', decoder.write(buffer.slice(0, 1))); +assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); + +buffer = new Buffer('€'); +assert.deepEqual('', decoder.write(buffer.slice(0, 1))); +assert.deepEqual('', decoder.write(buffer.slice(1, 2))); +assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); + +buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); +s += decoder.write(buffer.slice(2, 3)); +s += decoder.write(buffer.slice(3, 4)); +assert.ok(s.length > 0); + +// CESU-8 +buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); +s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 4)); +s += decoder.write(buffer.slice(4, 5)); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 2)); +s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(4, 5)); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 6)); +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + + +// UCS-2 +decoder = new StringDecoder('ucs2'); +buffer = new Buffer('ab', 'ucs2'); +assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars +buffer = new Buffer('abc', 'ucs2'); +assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' +assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' + + +// UTF-16LE +buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(2, 3)); +s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 4)); +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + + +// A mixed ascii and non-ascii string +// Test stolen from deps/v8/test/cctest/test-strings.cc +// U+02E4 -> CB A4 +// U+0064 -> 64 +// U+12E4 -> E1 8B A4 +// U+0030 -> 30 +// U+3045 -> E3 81 85 +var expected = '\u02e4\u0064\u12e4\u0030\u3045'; +var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, + 0x30, 0xE3, 0x81, 0x85]); +var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; + +// Split the buffer into 3 segments +// |----|------|-------| +// 0 i j buffer.length +// Scan through every possible 3 segment combination +// and make sure that the string is always parsed. +common.print('scanning '); +for (var j = 2; j < buffer.length; j++) { + for (var i = 1; i < j; i++) { + var decoder = new StringDecoder('utf8'); + + var sum = decoder.write(buffer.slice(0, i)); + + // just check that we've received the right amount + // after the first write + assert.equal(charLengths[i], sum.length); + + sum += decoder.write(buffer.slice(i, j)); + sum += decoder.write(buffer.slice(j, buffer.length)); + assert.equal(expected, sum); + common.print('.'); + } +} +console.log(' crayon!'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json new file mode 100644 index 00000000..c9e268d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json @@ -0,0 +1,42 @@ +{ + "name": "readable-stream", + "version": "1.0.25", + "description": "An exploration of a new kind of readable streams for Node.js", + "main": "readable.js", + "dependencies": { + "string_decoder": "~0.10.x" + }, + "devDependencies": { + "tap": "~0.2.6" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "BSD", + "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/readable-stream/issues" + }, + "homepage": "https://github.com/isaacs/readable-stream", + "_id": "readable-stream@1.0.25", + "dist": { + "shasum": "3d234b55fd2a25db8327618f088e50a32044df50" + }, + "_from": "readable-stream@~1.0.17", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.25.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js new file mode 100644 index 00000000..27e8d8a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js new file mode 100644 index 00000000..4d1ddfc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js @@ -0,0 +1,6 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js new file mode 100644 index 00000000..5d482f07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js new file mode 100644 index 00000000..e1e9efdf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE new file mode 100644 index 00000000..a23e08a8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile new file mode 100644 index 00000000..d583fcf4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile @@ -0,0 +1,4 @@ +browser: + node ./support/compile + +.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md new file mode 100644 index 00000000..389adae3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md @@ -0,0 +1,27 @@ +# xtend + +[![browser support][3]][4] + +Extend like a boss + +xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. + +## Examples + +```js +var extend = require("xtend") + +var combination = extend({ + a: "a" +}, { + b: "b" +}) +// { a: "a", b: "b" } +``` + + +## MIT Licenced + + + [3]: http://ci.testling.com/Raynos/xtend.png + [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js new file mode 100644 index 00000000..62391e78 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js @@ -0,0 +1,7 @@ +module.exports = hasKeys + +function hasKeys(source) { + return source !== null && + (typeof source === "object" || + typeof source === "function") +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js new file mode 100644 index 00000000..20937d19 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js @@ -0,0 +1,25 @@ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js new file mode 100644 index 00000000..17454ae4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js @@ -0,0 +1,25 @@ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend(target) { + var sources = [].slice.call(arguments, 1) + + for (var i = 0; i < sources.length; i++) { + var source = sources[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml new file mode 100644 index 00000000..60d00ce1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + - "0.8" + - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md new file mode 100644 index 00000000..ab32d0ad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md @@ -0,0 +1,39 @@ +#object-keys [![Version Badge][2]][1] + +[![Build Status][3]][4] [![dependency status][5]][6] + +[![browser support][7]][8] + +An Object.keys shim. Uses Object.keys if available. + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.equal(keys(obj), ['a', 'b', 'c']); +``` + +## Source +Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/object-keys +[2]: http://vb.teelaun.ch/ljharb/object-keys.svg +[3]: https://travis-ci.org/ljharb/object-keys.png +[4]: https://travis-ci.org/ljharb/object-keys +[5]: https://david-dm.org/ljharb/object-keys.png +[6]: https://david-dm.org/ljharb/object-keys +[7]: https://ci.testling.com/ljharb/object-keys.png +[8]: https://ci.testling.com/ljharb/object-keys +[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 +[10]: https://github.com/bestiejs/lodash + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js new file mode 100644 index 00000000..db32d458 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js @@ -0,0 +1,40 @@ +var hasOwn = Object.prototype.hasOwnProperty; +var toString = Object.prototype.toString; + +var isFunction = function (fn) { + var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; + if (!isFunc && typeof window !== 'undefined') { + isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; + } + return isFunc; +}; + +module.exports = function forEach(obj, fn) { + if (!isFunction(fn)) { + throw new TypeError('iterator must be a function'); + } + var i, k, + isString = typeof obj === 'string', + l = obj.length, + context = arguments.length > 2 ? arguments[2] : null; + if (l === +l) { + for (i = 0; i < l; i++) { + if (context === null) { + fn(isString ? obj.charAt(i) : obj[i], i, obj); + } else { + fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); + } + } + } else { + for (k in obj) { + if (hasOwn.call(obj, k)) { + if (context === null) { + fn(obj[k], k, obj); + } else { + fn.call(context, obj[k], k, obj); + } + } + } + } +}; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js new file mode 100644 index 00000000..f5b24b6d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js @@ -0,0 +1,2 @@ +module.exports = Object.keys || require('./shim'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js new file mode 100644 index 00000000..74a09897 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js @@ -0,0 +1,16 @@ +var toString = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toString.call(value); + var isArguments = str === '[object Arguments]'; + if (!isArguments) { + isArguments = str !== '[object Array]' + && value !== null + && typeof value === 'object' + && typeof value.length === 'number' + && value.length >= 0 + && toString.call(value.callee) === '[object Function]'; + } + return isArguments; +}; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json new file mode 100644 index 00000000..9dfda8dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json @@ -0,0 +1,60 @@ +{ + "name": "object-keys", + "version": "0.4.0", + "author": { + "name": "Jordan Harband" + }, + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "node test/index.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "foreach": "~2.0.3", + "is": "~0.2.6", + "tape": "~1.0.4", + "indexof": "~0.0.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "readme": "#object-keys [![Version Badge][2]][1]\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/ljharb/object-keys/issues" + }, + "homepage": "https://github.com/ljharb/object-keys", + "_id": "object-keys@0.4.0", + "dist": { + "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336" + }, + "_from": "object-keys@~0.4.0", + "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js new file mode 100644 index 00000000..b88421be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js @@ -0,0 +1,62 @@ +(function () { + "use strict"; + + // modified from https://github.com/kriskowal/es5-shim + var has = Object.prototype.hasOwnProperty, + toString = Object.prototype.toString, + forEach = require('./foreach'), + isArgs = require('./isArguments'), + hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), + hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + keysShim; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object', + isFunction = toString.call(object) === '[object Function]', + isArguments = isArgs(object), + theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + + if (isArguments) { + forEach(object, function (value) { + theKeys.push(value); + }); + } else { + var name, + skipProto = hasProtoEnumBug && isFunction; + + for (name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(name); + } + } + } + + if (hasDontEnumBug) { + var ctor = object.constructor, + skipConstructor = ctor && ctor.prototype === object; + + forEach(dontEnums, function (dontEnum) { + if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { + theKeys.push(dontEnum); + } + }); + } + return theKeys; + }; + + module.exports = keysShim; +}()); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js new file mode 100644 index 00000000..f29f065a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js @@ -0,0 +1,156 @@ +var test = require('tape'); +var forEach = require('../foreach.js'); + +test('second argument: iterator', function (t) { + var arr = []; + t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); + t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); + t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); + t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); + t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); + t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); + t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); + t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); + t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); + t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); + if (typeof window !== 'undefined') { + t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); + } + t.end(); +}); + +test('array', function (t) { + var arr = [1, 2, 3]; + + t.test('iterates over every item', function (st) { + var index = 0; + forEach(arr, function () { index += 1; }); + st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(arr.length); + forEach(arr, function (item) { + st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(arr.length); + forEach(arr, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(arr.length); + forEach(arr, function (item, index, array) { + st.deepEqual(arr, array, 'array is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(arr.length); + forEach(arr, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('object', function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + var keys = ['a', 'b', 'c']; + + var F = function () { + this.a = 1; + this.b = 2; + }; + F.prototype.c = 3; + var fKeys = ['a', 'b']; + + t.test('iterates over every object literal key', function (st) { + var counter = 0; + forEach(obj, function () { counter += 1; }); + st.equal(counter, keys.length, 'iterated ' + counter + ' times'); + st.end(); + }); + + t.test('iterates only over own keys', function (st) { + var counter = 0; + forEach(new F(), function () { counter += 1; }); + st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(keys.length); + forEach(obj, function (item) { + st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(keys.length); + forEach(obj, function (item, key) { + st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(keys.length); + forEach(obj, function (item, key, object) { + st.deepEqual(obj, object, 'object is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(1); + forEach({foo: 'bar'}, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + + +test('string', function (t) { + var str = 'str'; + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(str.length * 2 + 1); + forEach(str, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + st.equal(str.charAt(index), item); + counter += 1; + }); + st.equal(counter, str.length, 'iterates ' + str.length + ' times'); + }); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js new file mode 100644 index 00000000..8b77b1fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js @@ -0,0 +1,6 @@ + +require('./foreach'); +require('./isArguments'); + +require('./shim'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js new file mode 100644 index 00000000..62a07c2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js @@ -0,0 +1,10 @@ +var test = require('tape'); +var isArguments = require('../isArguments'); + +test('is.arguments', function (t) { + t.notOk(isArguments([]), 'array is not arguments'); + (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); + (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js new file mode 100644 index 00000000..9d932712 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js @@ -0,0 +1,134 @@ +var test = require('tape'); +var shimmedKeys = require('../index.js'); +var is = require('is'); +var keys = require('../shim.js'); +var forEach = require('foreach'); +var indexOf = require('indexof'); + +var obj = { + "str": "boz", + "obj": {}, + "arr": [], + "bool": true, + "num": 42, + "aNull": null, + "undef": undefined +}; +var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; + +test('exports a function', function (t) { + if (Object.keys) { + t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); + } else { + t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); + } + t.end(); +}); + +test('working with actual shim', function (t) { + t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); + t.end(); +}); + +test('works with an object literal', function (t) { + var theKeys = keys(obj); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, objKeys, 'Object has expected keys'); + t.end(); +}); + +test('works with an array', function (t) { + var arr = [1, 2, 3]; + var theKeys = keys(arr); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); + t.end(); +}); + +test('works with a function', function (t) { + var foo = function () {}; + foo.a = true; + + t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); + t.deepEqual(keys(foo), ['a'], 'returns expected keys'); + t.end(); +}); + +test('returns names which are own properties', function (t) { + forEach(keys(obj), function (name) { + t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); + }); + t.end(); +}); + +test('returns names which are enumerable', function (t) { + var k, loopedValues = []; + for (k in obj) { + loopedValues.push(k); + } + forEach(keys(obj), function (name) { + t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); + }); + t.end(); +}); + +test('throws an error for a non-object', function (t) { + t.throws( + function () { return keys(42); }, + new TypeError('Object.keys called on a non-object'), + 'throws on a non-object' + ); + t.end(); +}); + +test('works with an object instance', function (t) { + var Prototype = function () {}; + Prototype.prototype.foo = true; + var obj = new Prototype(); + obj.bar = true; + var theKeys = keys(obj); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); + t.end(); +}); + +test('works in iOS 5 mobile Safari', function (t) { + var Foo = function () {}; + Foo.a = function () {}; + + // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] + t.deepEqual(keys(Foo), ['a'], 'has expected keys'); + t.end(); +}); + +test('works in environments with the dontEnum bug (IE < 9)', function (t) { + var Foo = function () {}; + Foo.prototype.a = function () {}; + + // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] + t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); + t.end(); +}); + +test('shadowed properties', function (t) { + var shadowedProps = [ + 'dummyControlProp', /* just to be sure */ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + shadowedProps.sort(); + var shadowedObject = {}; + forEach(shadowedProps, function (value, index) { + shadowedObject[value] = index; + }); + var shadowedObjectKeys = keys(shadowedObject); + shadowedObjectKeys.sort(); + t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json new file mode 100644 index 00000000..a761197d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json @@ -0,0 +1,76 @@ +{ + "name": "xtend", + "version": "2.1.2", + "description": "extend like a boss", + "keywords": [ + "extend", + "merge", + "options", + "opts", + "object", + "array" + ], + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/Raynos/xtend.git" + }, + "main": "index", + "scripts": { + "test": "node test" + }, + "dependencies": { + "object-keys": "~0.4.0" + }, + "devDependencies": { + "tape": "~1.1.0" + }, + "homepage": "https://github.com/Raynos/xtend", + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "bugs": { + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/raynos/xtend/raw/master/LICENSE" + } + ], + "testling": { + "files": "test.js", + "browsers": [ + "ie/7..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] + }, + "engines": { + "node": ">=0.4" + }, + "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", + "readmeFilename": "README.md", + "_id": "xtend@2.1.2", + "dist": { + "shasum": "5e8f75d1b0d9ca976fee0f1aa88f80c7619210d5" + }, + "_from": "xtend@~2.1.1", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js new file mode 100644 index 00000000..3369d796 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js @@ -0,0 +1,63 @@ +var test = require("tape") +var extend = require("./") +var mutableExtend = require("./mutable") + +test("merge", function(assert) { + var a = { a: "foo" } + var b = { b: "bar" } + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("replace", function(assert) { + var a = { a: "foo" } + var b = { a: "bar" } + + assert.deepEqual(extend(a, b), { a: "bar" }) + assert.end() +}) + +test("undefined", function(assert) { + var a = { a: undefined } + var b = { b: "foo" } + + assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) + assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) + assert.end() +}) + +test("handle 0", function(assert) { + var a = { a: "default" } + var b = { a: 0 } + + assert.deepEqual(extend(a, b), { a: 0 }) + assert.deepEqual(extend(b, a), { a: "default" }) + assert.end() +}) + +test("is immutable", function (assert) { + var record = {} + + extend(record, { foo: "bar" }) + assert.equal(record.foo, undefined) + assert.end() +}) + +test("null as argument", function (assert) { + var a = { foo: "bar" } + var b = null + var c = void 0 + + assert.deepEqual(extend(b, a, c), { foo: "bar" }) + assert.end() +}) + +test("mutable", function (assert) { + var a = { foo: "bar" } + + mutableExtend(a, { bar: "baz" }) + + assert.equal(a.bar, "baz") + assert.end() +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json new file mode 100644 index 00000000..9612fee2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json @@ -0,0 +1,48 @@ +{ + "name": "through2", + "version": "0.4.1", + "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", + "main": "through2.js", + "scripts": { + "test": "node test/test.js", + "test-local": "brtapsauce-local test/basic-test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/rvagg/through2.git" + }, + "keywords": [ + "stream", + "streams2", + "through", + "transform" + ], + "author": { + "name": "Rod Vagg", + "email": "r@va.gg", + "url": "https://github.com/rvagg" + }, + "license": "MIT", + "dependencies": { + "readable-stream": "~1.0.17", + "xtend": "~2.1.1" + }, + "devDependencies": { + "tape": "~2.3.0", + "bl": "~0.6.0", + "stream-spigot": "~3.0.1", + "brtapsauce": "~0.2.2" + }, + "readme": "# through2\n\n\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\nthrough2([ options, ] [ transformFunction ] [, flushFunction ])\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\nthrough2.ctor([ options, ] transformFunction[, flushFunction ])\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/rvagg/through2/issues" + }, + "homepage": "https://github.com/rvagg/through2", + "_id": "through2@0.4.1", + "dist": { + "shasum": "48772c8b50c4955c25e7cdbe69f4220f4138178b" + }, + "_from": "through2@~0.4.0", + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.4.1.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js new file mode 100644 index 00000000..9d137c7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js @@ -0,0 +1,334 @@ +const test = require('tape') + , through2 = require('../') + , crypto = require('crypto') + , bl = require('bl') + , spigot = require('stream-spigot') + +test('plain through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('pipeable through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + // bl() acts like a proper streams2 stream and passes as much as it's + // asked for, so we really only get one write with such a small amount + // of data + t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') + t.end() + })) + + var bufs = bl() + bufs.append(crypto.randomBytes(10)) + bufs.append(crypto.randomBytes(5)) + bufs.append(crypto.randomBytes(10)) + bufs.pipe(th2) +}) + +test('object through', function (t) { + t.plan(3) + + var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object through with through2.obj', function (t) { + t.plan(3) + + var th2 = through2.obj(function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('flushing through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }, function (callback) { + this.push(new Buffer([ 101, 110, 100 ])) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('plain through ctor', function (t) { + var Th2 = through2.ctor(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + var th2 = new Th2() + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('reuse through ctor', function (t) { + t.plan(4) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + if (!this._i) { + t.ok(1, 'did not contain previous instance data (this._i)') + this._i = 97 // 'a' + } else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + var th2 = Th2() + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + + var newInstance = Th2() + newInstance.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') + })) + + newInstance.write(crypto.randomBytes(7)) + newInstance.write(crypto.randomBytes(4)) + newInstance.write(crypto.randomBytes(7)) + newInstance.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('object through ctor', function (t) { + t.plan(3) + + var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = new Th2() + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('pipeable object through ctor', function (t) { + t.plan(4) + + var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { + if (record.temp != null && record.unit == 'F') { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = 'C' + } + this.push(record) + callback() + }) + + var th2 = Th2() + + var expect = [-19, -40, 100, 22] + th2.on('data', function (o) { + t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') + }) + + spigot({objectMode: true}, [ + {temp: -2.2, unit: 'F'}, + {temp: -40, unit: 'F'}, + {temp: 212, unit: 'F'}, + {temp: 22, unit: 'C'} + ]).pipe(th2) +}) + +test('object through ctor override', function (t) { + t.plan(3) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({objectMode: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object settings available in transform', function (t) { + t.plan(6) + + var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2() + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object settings available in transform override', function (t) { + t.plan(6) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({objectMode: true, peek: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object override extends options', function (t) { + t.plan(6) + + var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({peek: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js new file mode 100644 index 00000000..cc10868b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js @@ -0,0 +1,42 @@ +/* +on rvagg@fletcher: + @0.2.3: Ran 36719 iterations in 10000 ms +*/ + +const through2 = require('../') + , bl = require('bl') + , crypto = require('crypto') + , assert = require('assert') + +function run (callback) { + var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) + , stream = through2(function (chunk, env, callback) { + callback(null, chunk.toString('hex')) + }) + + stream.pipe(bl(function (err, data) { + assert(!err) + assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) + callback() + })) + + bufs.forEach(function (b) { + stream.write(b) + }) + stream.end() +} + +var count = 0 + , start = Date.now() + +;(function exec () { + count++ + run(function () { + if (Date.now() - start < 1000 * 10) { + return setImmediate(exec) + } + console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') + }) +}()) + +console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js new file mode 100644 index 00000000..a6d28625 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js @@ -0,0 +1,38 @@ +#!/usr/bin/env node + +const user = process.env.SAUCE_USER + , key = process.env.SAUCE_KEY + , path = require('path') + , brtapsauce = require('brtapsauce') + , testFile = path.join(__dirname, 'basic-test.js') + + , capabilities = [ + { browserName: 'chrome' , platform: 'Windows XP', version: '' } + , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } + , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } + , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } + , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } + , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } + , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } + , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } + , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } + , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } + , { browserName: 'opera' , platform: 'Windows 7' , version: '' } + , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } + , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } + , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } + ] + +if (!user) + throw new Error('Must set a SAUCE_USER env var') +if (!key) + throw new Error('Must set a SAUCE_KEY env var') + +brtapsauce({ + name : 'Traversty' + , user : user + , key : key + , brsrc : testFile + , capabilities : capabilities + , options : { timeout: 60 * 6 } +}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js new file mode 100644 index 00000000..aa9b4877 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js @@ -0,0 +1,9 @@ +require('./basic-test') + +if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) + return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') + +if (!/v0\.10/.test(process.version)) + return console.log('Not Node v0.10.x, not running sauce tests') + +require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js new file mode 100644 index 00000000..c1104848 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js @@ -0,0 +1,78 @@ +var Transform = require('readable-stream/transform') + , inherits = require('util').inherits + , xtend = require('xtend') + + +// a noop _transform function +function noop (chunk, enc, callback) { + callback(null, chunk) +} + + +// create a new export function, used by both the main export and +// the .ctor export, contains common logic for dealing with arguments +function through2 (construct) { + return function (options, transform, flush) { + if (typeof options == 'function') { + flush = transform + transform = options + options = {} + } + + if (typeof transform != 'function') + transform = noop + + if (typeof flush != 'function') + flush = null + + return construct(options, transform, flush) + } +} + + +// main export, just make me a transform stream! +module.exports = through2(function (options, transform, flush) { + var t2 = new Transform(options) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +// make me a reusable prototype that I can `new`, or implicitly `new` +// with a constructor call +module.exports.ctor = through2(function (options, transform, flush) { + function Through2 (override) { + if (!(this instanceof Through2)) + return new Through2(override) + + this.options = xtend(options, override) + + Transform.call(this, this.options) + } + + inherits(Through2, Transform) + + Through2.prototype._transform = transform + + if (flush) + Through2.prototype._flush = flush + + return Through2 +}) + + +module.exports.obj = through2(function (options, transform, flush) { + var t2 = new Transform(xtend({ objectMode: true }, options)) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/package.json new file mode 100644 index 00000000..d289871c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/package.json @@ -0,0 +1,55 @@ +{ + "name": "download", + "version": "0.1.10", + "description": "Download and extract files effortlessly", + "keywords": [ + "url", + "http", + "download", + "extract" + ], + "homepage": "https://github.com/kevva/download", + "bugs": { + "url": "https://github.com/kevva/download/issues" + }, + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "http://kevinmartensson.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/kevva/download.git" + }, + "scripts": { + "test": "mocha --reporter list" + }, + "main": "download.js", + "files": [ + "download.js" + ], + "dependencies": { + "decompress": "~0.1.5", + "each-async": "~0.1.1", + "mkdirp": "~0.3.5", + "request": "~2.31.0", + "through2": "~0.4.0" + }, + "devDependencies": { + "mocha": "~1.17.0", + "nock": "~0.27.1", + "rimraf": "~2.2.5" + }, + "engines": { + "node": ">=0.10.0" + }, + "readme": "# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)\n\nDownload and extract files effortlessly in Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/download): `npm install download`\n\n## Examples\n\nIf you're fetching an archive you can set `extract: true` in options and\nit'll extract it for you.\n\n```js\nvar download = require('download');\n\n// download and extract `foo.tar.gz` into `bar/`\ndownload('foo.tar.gz', 'bar', { extract: true });\n\n// download and save `foo.exe` into `bar/foo.exe` with mode `0755`\ndownload('foo.exe', 'bar', { mode: '0755' });\n\n// download and save `foo.zip` into `bar/foobar.zip`\ndownload({ url: 'foo.zip', name: 'foobar.zip' }, 'bar');\n\n// download and save an array of files in `bar/`\nvar files = ['foo.jpg', 'bar.jpg', 'cat.jpg'];\ndownload(files, 'bar');\n\n// download, save and rename an array of files in `bar/`\nvar files = [{\n url: 'foo.jpg',\n name: 'foobar.jpg'\n}, {\n url: 'cat.jpg',\n name: 'dog.jpg'\n}];\ndownload(files, 'bar');\n```\n\n## API\n\n### download(url, dest, opts)\n\nDownload a file or an array of files to a given destination. Returns an EventEmitter \nthat emits the following possible events:\n\n* `response` — Relayed when the underlying `http.ClientRequest` emits the same \nevent. Listeners called with a `http.IncomingMessage` instance.\n* `data` — Relayed when the underlying `http.IncomingMessage` emits the same \nevent. Listeners called with a `Buffer` instance.\n* `error` — Relayed when the underlying `http.ClientRequest` emits the same event \nor when the response status code is not in the 200s. Listeners called with an \n`Error` instance (in the first case) or the response status code.\n* `close` — Relayed when the underlying `stream.Duplex` emits the same event.\n\n## Options\n\nYou can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below.\n\n### extract\n\nType: `Boolean` \nDefault: `false`\n\nIf set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/).\n\n### mode\n\nType: `String` \nDefault: `undefined`\n\nSet mode on the downloaded files.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", + "readmeFilename": "README.md", + "_id": "download@0.1.10", + "dist": { + "shasum": "dc5d3ab4a7fc78e374e2de0381273b7b999bc29d" + }, + "_from": "download@~0.1.2", + "_resolved": "https://registry.npmjs.org/download/-/download-0.1.10.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.npmignore new file mode 100644 index 00000000..2ccbe465 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.npmignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.travis.yml new file mode 100644 index 00000000..c1ffcb31 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/History.md new file mode 100644 index 00000000..d1fa5334 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/History.md @@ -0,0 +1,20 @@ + +0.0.2 / 2013-05-29 +================== + + * Updated github url + * Fix bug calling isbin with list of paths + * Add tests for sync version + * Added travis CI passing image to readme + * Added node engines and keywords + * Added travis CI config + * Added basic readme + * Added basic test suite and Makefile + * Add async version + * Some refactorings using 'some' function + * Fixed issue with wrong paths if called multiple times + +0.0.1 / 2012-12-06 +================== + + * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/Makefile new file mode 100644 index 00000000..1a2444a1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/Makefile @@ -0,0 +1,6 @@ +REPORTER ?= dot + +test: + @NODE_ENV=test ./node_modules/mocha/bin/mocha -R $(REPORTER) + +.PHONY: test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/README.md new file mode 100644 index 00000000..5224d614 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/README.md @@ -0,0 +1,59 @@ +[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin) + +# Isbin + +Tiny little helper library to determine if a certain binary is available within $PATH or any additional folder. + +# Installation + +```bash +$ npm install isbin +``` + +# Usage + +```js +var isbin = require('isbin'); + +// Test against $PATH +isbin('mysql', function(exists) { + console.log(exists); // ==> Boolean +}); + +// With additional path to test +isbin('mysql', '/usr/local/bin', function(exists) { + console.log(exists); // ==> Boolean +}); + +// Or multiple ones +isbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) { + console.log(exists); // ==> Boolean +}); +``` + +There are also synchronous versions available + +```js +var exists = isbin('mysql'); +var exists = isbin('mysql', '/usr/local/bin'); +var exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']); +``` + +# Running the tests + +```bash +$ npm install +$ make test +``` + +# License + +(The MIT License) + +Copyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/index.js new file mode 100644 index 00000000..bb0a047c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/index.js @@ -0,0 +1 @@ +module.exports = require('./lib'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/lib/index.js new file mode 100644 index 00000000..1b8a5cac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/lib/index.js @@ -0,0 +1,51 @@ +/** + * Require dependencies + */ + +var fs = require('fs') + , async = require('async'); + +/** + * Check if given binary exists + * + * @param {String} bin Binary to test + * @param {String|Array} additional Additional paths to check + * @param {Function(result)} isbinChecked Callback when check is done async, optional + * @return {Boolean} True if binary was found + */ + +function isbin(bin, additional, isbinChecked) { + // isbin(bin, cb) + if (!isbinChecked) isbinChecked = additional; + + // Read $PATH to get set up bin folders + var paths = process.env.PATH.split(':') || []; + + // isbin(bin, 'path', cb) + if ('string' === typeof additional) { + paths.push(additional); + } + + // isbin(bin, ['path1', 'path2'], cb) + if ('object' === typeof additional && additional.length !== null) { + paths.concat(additional); + } + + // async check + if ('function' === typeof isbinChecked) { + return async.some(paths, function(path, pathChecked) { + fs.exists(path + '/' + bin, pathChecked); + }, isbinChecked); + } + + // sync check + return paths.reverse().some(function(path) { + return fs.existsSync(path + '/' + bin); + }); +}; + +/** + * Expose module + */ + +module.exports = isbin; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules new file mode 100644 index 00000000..a9aae984 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules @@ -0,0 +1,9 @@ +[submodule "deps/nodeunit"] + path = deps/nodeunit + url = git://github.com/caolan/nodeunit.git +[submodule "deps/UglifyJS"] + path = deps/UglifyJS + url = https://github.com/mishoo/UglifyJS.git +[submodule "deps/nodelint"] + path = deps/nodelint + url = https://github.com/tav/nodelint.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore new file mode 100644 index 00000000..9bdfc97c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore @@ -0,0 +1,4 @@ +deps +dist +test +nodelint.cfg \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE new file mode 100644 index 00000000..b7f9d500 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile new file mode 100644 index 00000000..bad647c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile @@ -0,0 +1,25 @@ +PACKAGE = asyncjs +NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) +CWD := $(shell pwd) +NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit +UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs +NODELINT = $(CWD)/node_modules/nodelint/nodelint + +BUILDDIR = dist + +all: clean test build + +build: $(wildcard lib/*.js) + mkdir -p $(BUILDDIR) + $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js + +test: + $(NODEUNIT) test + +clean: + rm -rf $(BUILDDIR) + +lint: + $(NODELINT) --config nodelint.cfg lib/async.js + +.PHONY: test build all diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md new file mode 100644 index 00000000..1bbbc477 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md @@ -0,0 +1,1021 @@ +# Async.js + +Async is a utility module which provides straight-forward, powerful functions +for working with asynchronous JavaScript. Although originally designed for +use with [node.js](http://nodejs.org), it can also be used directly in the +browser. + +Async provides around 20 functions that include the usual 'functional' +suspects (map, reduce, filter, forEach…) as well as some common patterns +for asynchronous control flow (parallel, series, waterfall…). All these +functions assume you follow the node.js convention of providing a single +callback as the last argument of your async function. + + +## Quick Examples + + async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file + }); + + async.filter(['file1','file2','file3'], path.exists, function(results){ + // results now equals an array of the existing files + }); + + async.parallel([ + function(){ ... }, + function(){ ... } + ], callback); + + async.series([ + function(){ ... }, + function(){ ... } + ]); + +There are many more functions available so take a look at the docs below for a +full list. This module aims to be comprehensive, so if you feel anything is +missing please create a GitHub issue for it. + + +## Download + +Releases are available for download from +[GitHub](http://github.com/caolan/async/downloads). +Alternatively, you can install using Node Package Manager (npm): + + npm install async + + +__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed + +__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped + + +## In the Browser + +So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: + + + + + +## Documentation + +### Collections + +* [forEach](#forEach) +* [map](#map) +* [filter](#filter) +* [reject](#reject) +* [reduce](#reduce) +* [detect](#detect) +* [sortBy](#sortBy) +* [some](#some) +* [every](#every) +* [concat](#concat) + +### Control Flow + +* [series](#series) +* [parallel](#parallel) +* [whilst](#whilst) +* [until](#until) +* [waterfall](#waterfall) +* [queue](#queue) +* [auto](#auto) +* [iterator](#iterator) +* [apply](#apply) +* [nextTick](#nextTick) + +### Utils + +* [memoize](#memoize) +* [unmemoize](#unmemoize) +* [log](#log) +* [dir](#dir) +* [noConflict](#noConflict) + + +## Collections + + +### forEach(arr, iterator, callback) + +Applies an iterator function to each item in an array, in parallel. +The iterator is called with an item from the list and a callback for when it +has finished. If the iterator passes an error to this callback, the main +callback for the forEach function is immediately called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + + // assuming openFiles is an array of file names and saveFile is a function + // to save the modified contents of that file: + + async.forEach(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error + }); + +--------------------------------------- + + +### forEachSeries(arr, iterator, callback) + +The same as forEach only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. This means the iterator functions will complete in order. + + +--------------------------------------- + + +### forEachLimit(arr, limit, iterator, callback) + +The same as forEach only the iterator is applied to batches of items in the +array, in series. The next batch of iterators is only called once the current +one has completed processing. + +__Arguments__ + +* arr - An array to iterate over. +* limit - How many items should be in each batch. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + + // Assume documents is an array of JSON objects and requestApi is a + // function that interacts with a rate-limited REST api. + + async.forEachLimit(documents, 20, requestApi, function(err){ + // if any of the saves produced an error, err would equal that error + }); +--------------------------------------- + + +### map(arr, iterator, callback) + +Produces a new array of values by mapping each value in the given array through +the iterator function. The iterator is called with an item from the array and a +callback for when it has finished processing. The callback takes 2 arguments, +an error and the transformed item from the array. If the iterator passes an +error to this callback, the main callback for the map function is immediately +called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order, however +the results array will be in the same order as the original array. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + + async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file + }); + +--------------------------------------- + + +### mapSeries(arr, iterator, callback) + +The same as map only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +--------------------------------------- + + +### filter(arr, iterator, callback) + +__Alias:__ select + +Returns a new array of all the values which pass an async truth test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(results) - A callback which is called after all the iterator + functions have finished. + +__Example__ + + async.filter(['file1','file2','file3'], path.exists, function(results){ + // results now equals an array of the existing files + }); + +--------------------------------------- + + +### filterSeries(arr, iterator, callback) + +__alias:__ selectSeries + +The same as filter only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + +--------------------------------------- + + +### reject(arr, iterator, callback) + +The opposite of filter. Removes values that pass an async truth test. + +--------------------------------------- + + +### rejectSeries(arr, iterator, callback) + +The same as filter, only the iterator is applied to each item in the array +in series. + + +--------------------------------------- + + +### reduce(arr, memo, iterator, callback) + +__aliases:__ inject, foldl + +Reduces a list of values into a single value using an async iterator to return +each successive step. Memo is the initial state of the reduction. This +function only operates in series. For performance reasons, it may make sense to +split a call to this function into a parallel map, then use the normal +Array.prototype.reduce on the results. This function is for situations where +each step in the reduction needs to be async, if you can get the data before +reducing it then its probably a good idea to do so. + +__Arguments__ + +* arr - An array to iterate over. +* memo - The initial state of the reduction. +* iterator(memo, item, callback) - A function applied to each item in the + array to produce the next step in the reduction. The iterator is passed a + callback which accepts an optional error as its first argument, and the state + of the reduction as the second. If an error is passed to the callback, the + reduction is stopped and the main callback is immediately called with the + error. +* callback(err, result) - A callback which is called after all the iterator + functions have finished. Result is the reduced value. + +__Example__ + + async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); + }, function(err, result){ + // result is now equal to the last value of memo, which is 6 + }); + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, callback) + +__Alias:__ foldr + +Same as reduce, only operates on the items in the array in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, callback) + +Returns the first value in a list that passes an async truth test. The +iterator is applied in parallel, meaning the first iterator to return true will +fire the detect callback with that result. That means the result might not be +the first item in the original array (in terms of order) that passes the test. + +If order within the original array is important then look at detectSeries. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value undefined if none passed. + +__Example__ + + async.detect(['file1','file2','file3'], path.exists, function(result){ + // result now equals the first file in the list that exists + }); + +--------------------------------------- + + +### detectSeries(arr, iterator, callback) + +The same as detect, only the iterator is applied to each item in the array +in series. This means the result is always the first in the original array (in +terms of array order) that passes the truth test. + + +--------------------------------------- + + +### sortBy(arr, iterator, callback) + +Sorts a list by the results of running each value through an async iterator. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and a value to use as the sort criteria. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is the items from + the original array sorted by the values returned by the iterator calls. + +__Example__ + + async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); + }, function(err, results){ + // results is now the original array of files sorted by + // modified date + }); + + +--------------------------------------- + + +### some(arr, iterator, callback) + +__Alias:__ any + +Returns true if at least one element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. Once any iterator +call returns true, the main callback is immediately called. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + either true or false depending on the values of the async tests. + +__Example__ + + async.some(['file1','file2','file3'], path.exists, function(result){ + // if result is true then at least one of the files exists + }); + +--------------------------------------- + + +### every(arr, iterator, callback) + +__Alias:__ all + +Returns true if every element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called after all the iterator + functions have finished. Result will be either true or false depending on + the values of the async tests. + +__Example__ + + async.every(['file1','file2','file3'], path.exists, function(result){ + // if result is true then every file exists + }); + +--------------------------------------- + + +### concat(arr, iterator, callback) + +Applies an iterator to each item in a list, concatenating the results. Returns the +concatenated list. The iterators are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of the arguments passed to the iterator function. + +__Arguments__ + +* arr - An array to iterate over +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and an array of results. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array containing + the concatenated results of the iterator function. + +__Example__ + + async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories + }); + +--------------------------------------- + + +### concatSeries(arr, iterator, callback) + +Same as async.concat, but executes in series instead of parallel. + + +## Control Flow + + +### series(tasks, [callback]) + +Run an array of functions in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run and the callback for the series is +immediately called with the value of the error. Once the tasks have completed, +the results are passed to the final callback as an array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.series. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback it must call on completion. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets an array of all the arguments passed to + the callbacks used in the array. + +__Example__ + + async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + }, + ], + // optional callback + function(err, results){ + // results is now equal to ['one', 'two'] + }); + + + // an example using an object instead of an array + async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + }, + }, + function(err, results) { + // results is now equal to: {one: 1, two: 2} + }); + + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run an array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main callback is immediately called with the value of the error. +Once the tasks have completed, the results are passed to the final callback as an +array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.parallel. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed a + callback it must call on completion. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets an array of all the arguments passed to + the callbacks used in the array. + +__Example__ + + async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + }, + ], + // optional callback + function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. + }); + + + // an example using an object instead of an array + async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + }, + }, + function(err, results) { + // results is now equals to: {one: 1, two: 2} + }); + + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call fn, while test returns true. Calls the callback when stopped, +or an error occurs. + +__Arguments__ + +* test() - synchronous truth test to perform before each execution of fn. +* fn(callback) - A function to call each time the test passes. The function is + passed a callback which must be called once it has completed with an optional + error as the first argument. +* callback(err) - A callback which is called after the test fails and repeated + execution of fn has stopped. + +__Example__ + + var count = 0; + + async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } + ); + + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call fn, until test returns true. Calls the callback when stopped, +or an error occurs. + +The inverse of async.whilst. + + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs an array of functions in series, each passing their results to the next in +the array. However, if any of the functions pass an error to the callback, the +next function is not executed and the main callback is immediately called with +the error. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a callback it + must call on completion. +* callback(err, [results]) - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + + async.waterfall([ + function(callback){ + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback){ + callback(null, 'three'); + }, + function(arg1, callback){ + // arg1 now equals 'three' + callback(null, 'done'); + } + ], function (err, result) { + // result now equals 'done' + }); + + +--------------------------------------- + + +### queue(worker, concurrency) + +Creates a queue object with the specified concurrency. Tasks added to the +queue will be processed in parallel (up to the concurrency limit). If all +workers are in progress, the task is queued until one is available. Once +a worker has completed a task, the task's callback is called. + +__Arguments__ + +* worker(task, callback) - An asynchronous function for processing a queued + task. +* concurrency - An integer for determining how many worker functions should be + run in parallel. + +__Queue objects__ + +The queue object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* concurrency - an integer for determining how many worker functions should be + run in parallel. This property can be changed after a queue is created to + alter the concurrency on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + + // create a queue object with concurrency 2 + + var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); + }, 2); + + + // assign a callback + q.drain = function() { + console.log('all items have been processed'); + } + + // add some items to the queue + + q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); + }); + q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); + }); + + // add some items to the queue (batch-wise) + + q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing bar'); + }); + + +--------------------------------------- + + +### auto(tasks, [callback]) + +Determines the best order for running functions based on their requirements. +Each function can optionally depend on other functions being completed first, +and each function is run as soon as its requirements are satisfied. If any of +the functions pass an error to their callback, that function will not complete +(so any other functions depending on it will not run) and the main callback +will be called immediately with the error. Functions also receive an object +containing the results of functions which have completed so far. + +__Arguments__ + +* tasks - An object literal containing named functions or an array of + requirements, with the function itself the last item in the array. The key + used for each function or array is used when specifying requirements. The + syntax is easier to understand by looking at the example. +* callback(err, results) - An optional callback which is called when all the + tasks have been completed. The callback will receive an error as an argument + if any tasks pass an error to their callback. If all tasks complete + successfully, it will receive an object containing their results. + +__Example__ + + async.auto({ + get_data: function(callback){ + // async code to get some data + }, + make_folder: function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + }, + write_file: ['get_data', 'make_folder', function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, filename); + }], + email_link: ['write_file', function(callback, results){ + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + }] + }); + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + + async.parallel([ + function(callback){ + // async code to get some data + }, + function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + } + ], + function(results){ + async.series([ + function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + }, + email_link: function(callback){ + // once the file is written let's email a link to it... + } + ]); + }); + +For a complicated series of async tasks using the auto function makes adding +new tasks much easier and makes the code more readable. + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the array, +returning a continuation to call the next one after that. Its also possible to +'peek' the next iterator by doing iterator.next(). + +This function is used internally by the async module but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a callback it + must call on completion. + +__Example__ + + var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } + ]); + + node> var iterator2 = iterator(); + 'one' + node> var iterator3 = iterator2(); + 'two' + node> iterator3(); + 'three' + node> var nextfn = iterator2.next(); + node> nextfn(); + 'three' + + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied, a useful +shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + + // using apply + + async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), + ]); + + + // the same process without using apply + + async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + }, + ]); + +It's possible to pass any number of additional arguments when calling the +continuation: + + node> var fn = async.apply(sys.puts, 'one'); + node> fn('two', 'three'); + one + two + three + +--------------------------------------- + + +### nextTick(callback) + +Calls the callback on a later loop around the event loop. In node.js this just +calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), +which means other higher priority events may precede the execution of the callback. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* callback - The function to call on a later loop around the event loop. + +__Example__ + + var call_order = []; + async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two] + }); + call_order.push('one') + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an async function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +__Arguments__ + +* fn - the function you to proxy and cache results from. +* hasher - an optional function for generating a custom hash for storing + results, it has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + + var slow_fn = function (name, callback) { + // do something + callback(null, result); + }; + var fn = async.memoize(slow_fn); + + // fn can now be used as if it were slow_fn + fn('some name', function () { + // callback + }); + + +### unmemoize(fn) + +Undoes a memoized function, reverting it to the original, unmemoized +form. Comes handy in tests. + +__Arguments__ + +* fn - the memoized function + + +### log(function, arguments) + +Logs the result of an async function to the console. Only works in node.js or +in browsers that support console.log and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.log is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + + var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); + }; + + node> async.log(hello, 'world'); + 'hello world' + + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an async function to the console using console.dir to +display the properties of the resulting object. Only works in node.js or +in browsers that support console.dir and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.dir is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + + var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); + }; + + node> async.dir(hello, 'world'); + {hello: 'world'} + + +--------------------------------------- + + +### noConflict() + +Changes the value of async back to its original value, returning a reference to the +async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js new file mode 100644 index 00000000..8e238453 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js @@ -0,0 +1,3 @@ +// This file is just added for convenience so this repository can be +// directly checked out into a project's deps folder +module.exports = require('./lib/async'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js new file mode 100644 index 00000000..7cc4f5ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js @@ -0,0 +1,692 @@ +/*global setTimeout: false, console: false */ +(function () { + + var async = {}; + + // global on the server, window in the browser + var root = this, + previous_async = root.async; + + if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } + else { + root.async = async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + //// cross-browser compatiblity functions //// + + var _forEach = function (arr, iterator) { + if (arr.forEach) { + return arr.forEach(iterator); + } + for (var i = 0; i < arr.length; i += 1) { + iterator(arr[i], i, arr); + } + }; + + var _map = function (arr, iterator) { + if (arr.map) { + return arr.map(iterator); + } + var results = []; + _forEach(arr, function (x, i, a) { + results.push(iterator(x, i, a)); + }); + return results; + }; + + var _reduce = function (arr, iterator, memo) { + if (arr.reduce) { + return arr.reduce(iterator, memo); + } + _forEach(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + }; + + var _keys = function (obj) { + if (Object.keys) { + return Object.keys(obj); + } + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + if (typeof process === 'undefined' || !(process.nextTick)) { + async.nextTick = function (fn) { + setTimeout(fn, 0); + }; + } + else { + async.nextTick = process.nextTick; + } + + async.forEach = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + _forEach(arr, function (x) { + iterator(x, function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed === arr.length) { + callback(null); + } + } + }); + }); + }; + + async.forEachSeries = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + var iterate = function () { + iterator(arr[completed], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed === arr.length) { + callback(null); + } + else { + iterate(); + } + } + }); + }; + iterate(); + }; + + async.forEachLimit = function (arr, limit, iterator, callback) { + callback = callback || function () {}; + if (!arr.length || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed === arr.length) { + return callback(); + } + + while (running < limit && started < arr.length) { + started += 1; + running += 1; + iterator(arr[started - 1], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + running -= 1; + if (completed === arr.length) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + + + var doParallel = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.forEach].concat(args)); + }; + }; + var doSeries = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.forEachSeries].concat(args)); + }; + }; + + + var _asyncMap = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + }; + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.reduce = function (arr, memo, iterator, callback) { + async.forEachSeries(arr, function (x, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + // inject alias + async.inject = async.reduce; + // foldl alias + async.foldl = async.reduce; + + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, function (x) { + return x; + }).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + // foldr alias + async.foldr = async.reduceRight; + + var _filter = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.filter = doParallel(_filter); + async.filterSeries = doSeries(_filter); + // select alias + async.select = async.filter; + async.selectSeries = async.filterSeries; + + var _reject = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (!v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.reject = doParallel(_reject); + async.rejectSeries = doSeries(_reject); + + var _detect = function (eachfn, arr, iterator, main_callback) { + eachfn(arr, function (x, callback) { + iterator(x, function (result) { + if (result) { + main_callback(x); + main_callback = function () {}; + } + else { + callback(); + } + }); + }, function (err) { + main_callback(); + }); + }; + async.detect = doParallel(_detect); + async.detectSeries = doSeries(_detect); + + async.some = function (arr, iterator, main_callback) { + async.forEach(arr, function (x, callback) { + iterator(x, function (v) { + if (v) { + main_callback(true); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(false); + }); + }; + // any alias + async.any = async.some; + + async.every = function (arr, iterator, main_callback) { + async.forEach(arr, function (x, callback) { + iterator(x, function (v) { + if (!v) { + main_callback(false); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(true); + }); + }; + // all alias + async.all = async.every; + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + var fn = function (left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }; + callback(null, _map(results.sort(fn), function (x) { + return x.value; + })); + } + }); + }; + + async.auto = function (tasks, callback) { + callback = callback || function () {}; + var keys = _keys(tasks); + if (!keys.length) { + return callback(null); + } + + var results = {}; + + var listeners = []; + var addListener = function (fn) { + listeners.unshift(fn); + }; + var removeListener = function (fn) { + for (var i = 0; i < listeners.length; i += 1) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + return; + } + } + }; + var taskComplete = function () { + _forEach(listeners.slice(0), function (fn) { + fn(); + }); + }; + + addListener(function () { + if (_keys(results).length === keys.length) { + callback(null, results); + callback = function () {}; + } + }); + + _forEach(keys, function (k) { + var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; + var taskCallback = function (err) { + if (err) { + callback(err); + // stop subsequent errors hitting callback multiple times + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + taskComplete(); + } + }; + var requires = task.slice(0, Math.abs(task.length - 1)) || []; + var ready = function () { + return _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + }; + if (ready()) { + task[task.length - 1](taskCallback, results); + } + else { + var listener = function () { + if (ready()) { + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + }; + addListener(listener); + } + }); + }; + + async.waterfall = function (tasks, callback) { + callback = callback || function () {}; + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + async.nextTick(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(async.iterator(tasks))(); + }; + + async.parallel = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.map(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.forEach(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.series = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.mapSeries(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.forEachSeries(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.iterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + async.apply = function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + return function () { + return fn.apply( + null, args.concat(Array.prototype.slice.call(arguments)) + ); + }; + }; + + var _concat = function (eachfn, arr, fn, callback) { + var r = []; + eachfn(arr, function (x, cb) { + fn(x, function (err, y) { + r = r.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, r); + }); + }; + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + if (test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.whilst(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.until = function (test, iterator, callback) { + if (!test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.until(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.queue = function (worker, concurrency) { + var workers = 0; + var q = { + tasks: [], + concurrency: concurrency, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _forEach(data, function(task) { + q.tasks.push({ + data: task, + callback: typeof callback === 'function' ? callback : null + }); + if (q.saturated && q.tasks.length == concurrency) { + q.saturated(); + } + async.nextTick(q.process); + }); + }, + process: function () { + if (workers < q.concurrency && q.tasks.length) { + var task = q.tasks.shift(); + if(q.empty && q.tasks.length == 0) q.empty(); + workers += 1; + worker(task.data, function () { + workers -= 1; + if (task.callback) { + task.callback.apply(task, arguments); + } + if(q.drain && q.tasks.length + workers == 0) q.drain(); + q.process(); + }); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + } + }; + return q; + }; + + var _console_fn = function (name) { + return function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + fn.apply(null, args.concat([function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (typeof console !== 'undefined') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _forEach(args, function (x) { + console[name](x); + }); + } + } + }])); + }; + }; + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + hasher = hasher || function (x) { + return x; + }; + var memoized = function () { + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + var key = hasher.apply(null, args); + if (key in memo) { + callback.apply(null, memo[key]); + } + else if (key in queues) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([function () { + memo[key] = arguments; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, arguments); + } + }])); + } + }; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + +}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json new file mode 100644 index 00000000..31e18559 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json @@ -0,0 +1,36 @@ +{ + "name": "async", + "description": "Higher-order functions and common patterns for asynchronous code", + "main": "./index", + "author": { + "name": "Caolan McMahon" + }, + "version": "0.1.22", + "repository": { + "type": "git", + "url": "http://github.com/caolan/async.git" + }, + "bugs": { + "url": "http://github.com/caolan/async/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/caolan/async/raw/master/LICENSE" + } + ], + "devDependencies": { + "nodeunit": ">0.0.0", + "uglify-js": "1.2.x", + "nodelint": ">0.0.0" + }, + "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n \n \n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n );\n\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ], function (err, result) {\n // result now equals 'done' \n });\n\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n // add some items to the queue (batch-wise)\n\n q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. If all tasks complete\n successfully, it will receive an object containing their results.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/caolan/async", + "_id": "async@0.1.22", + "dist": { + "shasum": "3b270eedc0419d6f92a664444ce98e0f59a8fef7" + }, + "_from": "async@0.1.22", + "_resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/package.json new file mode 100644 index 00000000..1d8c8459 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/package.json @@ -0,0 +1,45 @@ +{ + "name": "isbin", + "version": "0.0.2", + "description": "Checks for available binaries on unix machines", + "main": "index.js", + "engines": { + "node": ">= 0.8.0" + }, + "keywords": [ + "fs", + "bin", + "binary", + "exists", + "check", + "path" + ], + "scripts": { + "test": "make test" + }, + "repository": { + "type": "git", + "url": "git://github.com/behrendtio/isbin.git" + }, + "author": "", + "license": "MIT", + "dependencies": { + "async": "0.1.22" + }, + "devDependencies": { + "mocha": "1.7.3", + "should": "1.2.1" + }, + "readme": "[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin)\n\n# Isbin\n\nTiny little helper library to determine if a certain binary is available within $PATH or any additional folder.\n\n# Installation\n\n```bash\n$ npm install isbin\n```\n\n# Usage\n\n```js\nvar isbin = require('isbin');\n\n// Test against $PATH\nisbin('mysql', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// With additional path to test\nisbin('mysql', '/usr/local/bin', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// Or multiple ones\nisbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) {\n console.log(exists); // ==> Boolean\n});\n```\n\nThere are also synchronous versions available\n\n```js\nvar exists = isbin('mysql');\nvar exists = isbin('mysql', '/usr/local/bin');\nvar exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']);\n```\n\n# Running the tests\n\n```bash\n$ npm install\n$ make test\n```\n\n# License\n\n(The MIT License)\n\nCopyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/behrendtio/isbin/issues" + }, + "homepage": "https://github.com/behrendtio/isbin", + "_id": "isbin@0.0.2", + "dist": { + "shasum": "2a35fb234ad5ee30f78da61b57e8f42ac43ec5a4" + }, + "_from": "isbin@0.0.2", + "_resolved": "https://registry.npmjs.org/isbin/-/isbin-0.0.2.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js new file mode 100644 index 00000000..068a38a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js @@ -0,0 +1,39 @@ +var isbin = require('../'); + +describe('isbin', function() { + it('accepts binary, additional path and callback', function(done) { + isbin('ls', '/etc', function(exists) { + exists.should.be.a('boolean'); + done(); + }) + }); + + it('accepts array of paths', function(done) { + isbin('ls', ['/etc', '/home'], function(exists) { + exists.should.be.a('boolean'); + done(); + }); + }); + + it('accepts just binary and callback', function(done) { + isbin('ls', function(exists) { + exists.should.be.a('boolean'); + done(); + }); + }); + + it('accepts binary, additional path and callback', function() { + var exists = isbin('ls', '/etc'); + exists.should.be.a('boolean'); + }); + + it('accepts array of paths', function() { + var exists = isbin('ls', ['/etc', '/home']); + exists.should.be.a('boolean'); + }); + + it('accepts just binary', function() { + var exists = isbin('ls'); + exists.should.be.a('boolean'); + }); +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts new file mode 100644 index 00000000..e5eb9f87 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts @@ -0,0 +1,4 @@ +--require should +--bail +--ui bdd +--slow 100 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.editorconfig b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.editorconfig new file mode 100644 index 00000000..e036e247 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.editorconfig @@ -0,0 +1,20 @@ +; EditorConfig is awesome: http://EditorConfig.org + +; top-most EditorConfig file +root = true + +; base rules +[*] +end_of_line = lf +insert_final_newline = false +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true + +; The default indent on package.json is 2 spaces, better to keep it so we can +; use `npm install --save` and other features that rewrites the package.json +; file automatically +[package.json] +indent_style = space +indent_size = 2 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.jshintrc new file mode 100644 index 00000000..bbdb29cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.jshintrc @@ -0,0 +1,69 @@ +{ + // Settings + "passfail" : false, // Stop on first error. + "maxerr" : 50, // Maximum error before stopping. + + + // Predefined globals whom JSHint will ignore. + "browser" : true, // Standard browser globals e.g. `window`, `document`. + "couch" : false, + "dojo" : false, + "jquery" : true, + "mootools" : false, + "node" : false, + "prototypejs" : false, + "rhino" : false, + "wsh" : false, + + // Custom globals. + "predef" : [ + "define", + "require" + ], + + + // Development. + "debug" : false, // Allow debugger statements e.g. browser breakpoints. + "devel" : false, // Allow developments statements e.g. `console.log();`. + + + // EcmaScript 5. + "es5" : false, // Allow EcmaScript 5 syntax. + "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). + "strict" : false, // Require `use strict` pragma in every file. + + + // The Good Parts. + "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). + "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). + "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. + "curly" : false, // Require {} for every new block or scope. + "eqeqeq" : true, // Require triple equals i.e. `===`. + "eqnull" : true, // Tolerate use of `== null`. + "evil" : false, // Tolerate use of `eval`. + "expr" : false, // Tolerate `ExpressionStatement` as Programs. + "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` + "latedef" : false, // Prohibit variable use before definition. + "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. + "loopfunc" : false, // Allow functions to be defined within loops. + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. + "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`. + "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. + "scripturl" : false, // Tolerate script-targeted URLs. + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. + "undef" : false, // Require all non-global variables be declared before they are used. + + + // Personal styling prefrences. + "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. + "noempty" : true, // Prohipit use of empty blocks. + "nomen" : false, // Prohibit use of initial or trailing underbars in names. + "nonew" : true, // Prohibit use of constructors for side-effects. + "onevar" : false, // Allow only one `var` statement per function. + "plusplus" : false, // Prohibit use of `++` & `--`. + "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. + "trailing" : true, // Prohibit trailing whitespaces. + "white" : false // Check against strict whitespace and indentation rules. +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.npmignore new file mode 100644 index 00000000..1341acd9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.npmignore @@ -0,0 +1,30 @@ +# dumb files +# ========== + +.tmp* +.project +.settings/ +.livereload +.DS_Store? +ehthumbs.db +Icon? +Thumbs.db + + +# stuff not needed by node +# ======================== + +node_modules/ +tests/ +_build/ +doc_html/ +coverage/ + +# we keep the doc/ folder in case npm decides to display it in the future +# also good in case user is using an old version or working offline + +# we also keep the src/ folder in case the user still needs the AMD modules +# after build (see issue #102) + +bower.json +build.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.travis.yml new file mode 100644 index 00000000..36de1532 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.travis.yml @@ -0,0 +1,13 @@ + language: node_js + node_js: + - "0.8" + script: "npm test --coverage" + notifications: + irc: + channels: + - "irc.freenode.org#moutjs" + on_success: always + on_failure: always + use_notice: true + skip_join: true + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md new file mode 100644 index 00000000..0f5eac12 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md @@ -0,0 +1,93 @@ +mout changelog +============== + +v0.6.0 (2013/05/22) +------------------- + + - add optional delimeter to `string/unCamelCase` + - allow custom char on `number/pad` + - allow underscore characters in `string/removeNonWord` + - accept `level` on `array/flatten` instead of a flag + - convert underscores to camelCase in `string/camelCase` + - remove `create()` from number/currencyFormat + - add `date/dayOfTheYear` + - add `date/diff` + - add `date/isSame` + - add `date/startOf` + - add `date/strftime` + - add `date/timezoneAbbr` + - add `date/timezoneOffset` + - add `date/totalDaysInYear` + - add `date/weekOfTheYear` + - add `function/timeout` + - add `object/bindAll` + - add `object/functions` + - add `time/convert` + + +v0.5.0 (2013/04/04) +------------------- + + - add `array/collect` + - add `callback` parameter to `object/equals` and `object/deepEquals` to allow + custom compare operations. + - normalize behavior in `array/*` methods to treat `null` values as empty + arrays when reading from array + - add `date/parseIso` + - add `date/isLeapYear` + - add `date/totalDaysInMonth` + - add `object/deepMatches` + - change `function/makeIterator_` to use `deepMatches` (affects nearly all + iteration methods) + - add `thisObj` parameter to `array/min` and `array/max` + + +v0.4.0 (2013/02/26) +------------------- + + - add `object/equals` + - add `object/deepEquals` + - add `object/matches`. + - add `lang/is` and `lang/isnt`. + - add `lang/isInteger`. + - add `array/findIndex`. + - add shorthand syntax to `array/*`, `object/*` and `collection/*` methods. + - improve `number/sign` behavior when value is NaN or +0 or -0. + - improve `lang/isNaN` to actually check if value *is not a number* without + coercing value; so `[]`, `""`, `null` and `"12"` are considered NaN (#39). + - improve `string/contains` to match ES6 behavior (add fromIndex argument). + + +v0.3.0 (2013/02/01) +------------------- + + - add `lang/clone`. + - add `lang/toString`. + - add `string/replace`. + - add `string/WHITE_SPACES` + - rename `function/curry` to `function/partial`. + - allow custom chars in `string/trim`, `ltrim`, and `rtrim`. + - convert values to strings in the `string/*` functions. + + +v0.2.0 (2013/01/13) +------------------- + + - fix bug in `math/ceil` for negative radixes. + - change `object/deepFillIn` and `object/deepMixIn` to recurse only if both + existing and new values are plain objects. Will not recurse into arrays + or objects not created by the Object constructor. + - add `lang/isPlainObject` to check if a file is a valid object and is created + by the Object constructor + - change `lang/clone` behavior when dealing with custom types (avoid cloning + it by default) and add second argument to allow custom behavior if needed. + - rename `lang/clone` to `lang/deepClone`. + - add VERSION property to index.js + - simplify `math/floor`, `math/round`, `math/ceil` and `math/countSteps`. + + +v0.1.0 (2013/01/09) +------------------- + +- Rename project from "amd-utils" to "mout" + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md new file mode 100644 index 00000000..65d9add1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing + +Fork the repo at https://github.com/mout/mout + + > "Write clearly, don't be too clever" - The Elements of Programming Style + +Avoid unnamed functions and follow the other modules structure. By only using named functions it will be easier to extract the code from the AMD module if needed and it will also give better error messages, JavaScript minifiers like [Google Closure Compiler](http://code.google.com/closure/compiler/) and [UglifyJS](https://github.com/mishoo/UglifyJS) will make sure code is as small/optimized as possible. + + > "Make it clear before you make it faster." - The Elements of Programming Style + +Be sure to always create tests for each proposed module. Features will only be merged if they contain proper tests and documentation. + + > "Good code is its own best documentation." - Steve McConnell + +We should do a code review before merging to make sure names makes sense and implementation is as good as possible. + +Try to split your pull requests into logical groups, the smaller the easier to be reviewed/merged. + + + +## Tests & Code Coverage ## + +Tests can be found inside the `tests` folder, to execute them in the browser open the `tests/runner.html`. The same tests also work on node.js by running `npm test`. + +We should have tests for all methods and ensure we have a high code coverage through our continuous integration server ([travis](https://travis-ci.org/mout/mout)). When you ask for a pull request Travis will automatically run the tests on node.js and check the code coverage as well. + +We run `node build pkg` automatically before any `npm test`, so specs and packages should always be in sync. (will avoid human mistakes) + +To check code coverage run `npm test --coverage`, it will generate the reports inside the `coverage` folder and also log the results. Please note that node.js doesn't execute all code branches since we have some conditionals that are only met on old JavaScript engines (eg. IE 7-8), so we will never have 100% code coverage (but should be close to it). + + + +## Build Script ## + +The [build script](https://github.com/mout/mout/wiki/Build-Script) can be extremely helpful and can avoid human mistakes, use it. + + + +## Admins / Pull Requests ## + +Even if you are an admin (have commit rights) please do pull requests when adding new features or changing current behavior, that way we can review the work and discuss. Feel free to push changes that doesn't affect behavior without asking for a pull request (readme, changelog, build script, typos, refactoring, ...). + + + +## Large changes ## + +If you are proposing some major change, please create an issue to discuss it first. (maybe it's outside the scope of the project) + + + +## Questions / IRC / Wiki / Issue Tracker ## + +When in doubt ask someone on IRC to help you ([#moutjs on irc.freenode.net](http://webchat.freenode.net/?channels=moutjs)) or create a [new issue](http://github.com/mout/mout/issues). + +The [project wiki](https://github.com/mout/mout/wiki) can also be a good resource of information. + + +--- + +Check the [contributors list at github](https://github.com/mout/mout/contributors). + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/LICENSE.md new file mode 100644 index 00000000..e9ccc2be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) +## Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/README.md new file mode 100644 index 00000000..872943bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/README.md @@ -0,0 +1,63 @@ +![mout](http://moutjs.com/logo.png "Modular JavaScript Utilties") + +http://moutjs.com/ + +[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout) + +All code is library agnostic and consist mostly of helper methods that aren't +directly related with the DOM, the purpose of this library isn't to replace +Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common +problems that aren't solved by most of them. Consider it as a crossbrowser +JavaScript standard library. + + + +## Main goals ## + + - increase code reuse; + - be clear (code should be clean/readable); + - be easy to debug; + - be easy to maintain; + - follow best practices; + - follow standards when possible; + - **don't convert JavaScript into another language!** + - be compatible with other frameworks; + - be modular; + - have unit tests for all modules; + - work on multiple environments (IE7+, modern browsers, node.js); + + + +## What shouldn't be here ## + + - UI components; + - CSS selector engine; + - Event system - pub/sub; + - Template engine; + - Anything that isn't generic enough to be on a standard library; + - Anything that could be a separate library and/or isn't a modular utility... + + + +## API Documentation ## + +Online documentation can be found at http://moutjs.com/ or inside the +`doc` folder. + + + +## FAQ / Wiki / IRC ## + +For more info about project structure, design decisions, tips, how to +contribute, build system, etc, please check the [project +wiki](https://github.com/mout/mout/wiki). + +We also have an IRC channel [#moutjs on +irc.freenode.net](http://webchat.freenode.net/?channels=moutjs) + + + +## License ## + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array.js new file mode 100644 index 00000000..89d388ba --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array.js @@ -0,0 +1,46 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'append' : require('./array/append'), + 'collect' : require('./array/collect'), + 'combine' : require('./array/combine'), + 'compact' : require('./array/compact'), + 'contains' : require('./array/contains'), + 'difference' : require('./array/difference'), + 'every' : require('./array/every'), + 'filter' : require('./array/filter'), + 'find' : require('./array/find'), + 'findIndex' : require('./array/findIndex'), + 'flatten' : require('./array/flatten'), + 'forEach' : require('./array/forEach'), + 'indexOf' : require('./array/indexOf'), + 'insert' : require('./array/insert'), + 'intersection' : require('./array/intersection'), + 'invoke' : require('./array/invoke'), + 'join' : require('./array/join'), + 'lastIndexOf' : require('./array/lastIndexOf'), + 'map' : require('./array/map'), + 'max' : require('./array/max'), + 'min' : require('./array/min'), + 'pick' : require('./array/pick'), + 'pluck' : require('./array/pluck'), + 'range' : require('./array/range'), + 'reduce' : require('./array/reduce'), + 'reduceRight' : require('./array/reduceRight'), + 'reject' : require('./array/reject'), + 'remove' : require('./array/remove'), + 'removeAll' : require('./array/removeAll'), + 'shuffle' : require('./array/shuffle'), + 'some' : require('./array/some'), + 'sort' : require('./array/sort'), + 'split' : require('./array/split'), + 'toLookup' : require('./array/toLookup'), + 'union' : require('./array/union'), + 'unique' : require('./array/unique'), + 'xor' : require('./array/xor'), + 'zip' : require('./array/zip') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/append.js new file mode 100644 index 00000000..bf74037e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/append.js @@ -0,0 +1,21 @@ + + + /** + * Appends an array to the end of another. + * The first array will be modified. + */ + function append(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var pad = arr1.length, + i = -1, + len = arr2.length; + while (++i < len) { + arr1[pad + i] = arr2[i]; + } + return arr1; + } + module.exports = append; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/collect.js new file mode 100644 index 00000000..58637493 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/collect.js @@ -0,0 +1,27 @@ +var append = require('./append'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Maps the items in the array and concatenates the result arrays. + */ + function collect(arr, callback, thisObj){ + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + var value = callback(arr[i], i, arr); + if (value != null) { + append(results, value); + } + } + + return results; + } + + module.exports = collect; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/combine.js new file mode 100644 index 00000000..d66e6212 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/combine.js @@ -0,0 +1,22 @@ +var indexOf = require('./indexOf'); + + /** + * Combines an array with all the items of another. + * Does not allow duplicates and is case and type sensitive. + */ + function combine(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var i = -1, len = arr2.length; + while (++i < len) { + if (indexOf(arr1, arr2[i]) === -1) { + arr1.push(arr2[i]); + } + } + + return arr1; + } + module.exports = combine; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/compact.js new file mode 100644 index 00000000..74c176ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/compact.js @@ -0,0 +1,13 @@ +var filter = require('./filter'); + + /** + * Remove all null/undefined items from array. + */ + function compact(arr) { + return filter(arr, function(val){ + return (val != null); + }); + } + + module.exports = compact; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/contains.js new file mode 100644 index 00000000..92bb6ad9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/contains.js @@ -0,0 +1,10 @@ +var indexOf = require('./indexOf'); + + /** + * If array contains values. + */ + function contains(arr, val) { + return indexOf(arr, val) !== -1; + } + module.exports = contains; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/difference.js new file mode 100644 index 00000000..d0570510 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/difference.js @@ -0,0 +1,22 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var some = require('./some'); +var contains = require('./contains'); + + + /** + * Return a new Array with elements that aren't present in the other Arrays. + */ + function difference(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return !some(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + module.exports = difference; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/every.js new file mode 100644 index 00000000..ac598832 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/every.js @@ -0,0 +1,27 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Array every + */ + function every(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (!callback(arr[i], i, arr) ) { + result = false; + break; + } + } + + return result; + } + + module.exports = every; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/filter.js new file mode 100644 index 00000000..ebeb58dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/filter.js @@ -0,0 +1,27 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array filter + */ + function filter(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + module.exports = filter; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/find.js new file mode 100644 index 00000000..b4a73131 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/find.js @@ -0,0 +1,13 @@ +var findIndex = require('./findIndex'); + + /** + * Returns first item that matches criteria + */ + function find(arr, iterator, thisObj){ + var idx = findIndex(arr, iterator, thisObj); + return idx >= 0? arr[idx] : void(0); + } + + module.exports = find; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js new file mode 100644 index 00000000..53f22a5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js @@ -0,0 +1,23 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Returns the index of the first item that matches criteria + */ + function findIndex(arr, iterator, thisObj){ + iterator = makeIterator(iterator, thisObj); + if (arr == null) { + return -1; + } + + var i = -1, len = arr.length; + while (++i < len) { + if (iterator(arr[i], i, arr)) { + return i; + } + } + + return -1; + } + + module.exports = findIndex; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/flatten.js new file mode 100644 index 00000000..aa9757ab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/flatten.js @@ -0,0 +1,43 @@ +var isArray = require('../lang/isArray'); +var append = require('./append'); + + /* + * Helper function to flatten to a destination array. + * Used to remove the need to create intermediate arrays while flattening. + */ + function flattenTo(arr, result, level) { + if (arr == null) { + return result; + } else if (level === 0) { + append(result, arr); + return result; + } + + var value, + i = -1, + len = arr.length; + while (++i < len) { + value = arr[i]; + if (isArray(value)) { + flattenTo(value, result, level - 1); + } else { + result.push(value); + } + } + return result; + } + + /** + * Recursively flattens an array. + * A new array containing all the elements is returned. + * If `shallow` is true, it will only flatten one level. + */ + function flatten(arr, level) { + level = level == null? -1 : level; + return flattenTo(arr, [], level); + } + + module.exports = flatten; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/forEach.js new file mode 100644 index 00000000..268e506f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/forEach.js @@ -0,0 +1,23 @@ + + + /** + * Array forEach + */ + function forEach(arr, callback, thisObj) { + if (arr == null) { + return; + } + var i = -1, + len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback.call(thisObj, arr[i], i, arr) === false ) { + break; + } + } + } + + module.exports = forEach; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js new file mode 100644 index 00000000..6a9ac832 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js @@ -0,0 +1,28 @@ + + + /** + * Array.indexOf + */ + function indexOf(arr, item, fromIndex) { + fromIndex = fromIndex || 0; + if (arr == null) { + return -1; + } + + var len = arr.length, + i = fromIndex < 0 ? len + fromIndex : fromIndex; + while (i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[i] === item) { + return i; + } + + i++; + } + + return -1; + } + + module.exports = indexOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/insert.js new file mode 100644 index 00000000..f1f95b75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/insert.js @@ -0,0 +1,15 @@ +var difference = require('./difference'); +var toArray = require('../lang/toArray'); + + /** + * Insert item into array if not already present. + */ + function insert(arr, rest_items) { + var diff = difference(toArray(arguments).slice(1), arr); + if (diff.length) { + Array.prototype.push.apply(arr, diff); + } + return arr.length; + } + module.exports = insert; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/intersection.js new file mode 100644 index 00000000..e6170062 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/intersection.js @@ -0,0 +1,23 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var every = require('./every'); +var contains = require('./contains'); + + + /** + * Return a new Array with elements common to all Arrays. + * - based on underscore.js implementation + */ + function intersection(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return every(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + module.exports = intersection; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/invoke.js new file mode 100644 index 00000000..c01aab1b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/invoke.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); + + /** + * Call `methodName` on each item of the array passing custom arguments if + * needed. + */ + function invoke(arr, methodName, var_args){ + if (arr == null) { + return arr; + } + + var args = Array.prototype.slice.call(arguments, 2); + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + value[methodName].apply(value, args); + } + + return arr; + } + + module.exports = invoke; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/join.js new file mode 100644 index 00000000..71d8bd20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/join.js @@ -0,0 +1,17 @@ +var filter = require('./filter'); + + function isValidString(val) { + return (val != null && val !== ''); + } + + /** + * Joins strings with the specified separator inserted between each value. + * Null values and empty strings will be excluded. + */ + function join(items, separator) { + separator = separator || ''; + return filter(items, isValidString).join(separator); + } + + module.exports = join; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js new file mode 100644 index 00000000..ee44a25b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js @@ -0,0 +1,28 @@ + + + /** + * Array lastIndexOf + */ + function lastIndexOf(arr, item, fromIndex) { + if (arr == null) { + return -1; + } + + var len = arr.length; + fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; + fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; + + while (fromIndex >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[fromIndex] === item) { + return fromIndex; + } + fromIndex--; + } + + return -1; + } + + module.exports = lastIndexOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/map.js new file mode 100644 index 00000000..54064f6b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/map.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array map + */ + function map(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null){ + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + results[i] = callback(arr[i], i, arr); + } + + return results; + } + + module.exports = map; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/max.js new file mode 100644 index 00000000..183b10ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/max.js @@ -0,0 +1,35 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Return maximum value inside array + */ + function max(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return Infinity; + } else if (arr.length && !iterator) { + return Math.max.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = -Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp > compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + module.exports = max; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/min.js new file mode 100644 index 00000000..dd00b6cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/min.js @@ -0,0 +1,35 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Return minimum value inside array + */ + function min(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return -Infinity; + } else if (arr.length && !iterator) { + return Math.min.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp < compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + module.exports = min; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pick.js new file mode 100644 index 00000000..6a54846c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pick.js @@ -0,0 +1,14 @@ +var randInt = require('../random/randInt'); + + /** + * Remove a random item from the Array and return it + */ + function pick(arr){ + if (arr == null || !arr.length) return; + var idx = randInt(0, arr.length - 1); + return arr.splice(idx, 1)[0]; + } + + module.exports = pick; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pluck.js new file mode 100644 index 00000000..fef4043b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pluck.js @@ -0,0 +1,12 @@ +var map = require('./map'); + + /** + * Extract a list of property values. + */ + function pluck(arr, propName){ + return map(arr, propName); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/range.js new file mode 100644 index 00000000..31d3c770 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/range.js @@ -0,0 +1,27 @@ +var countSteps = require('../math/countSteps'); + + /** + * Returns an Array of numbers inside range. + */ + function range(start, stop, step) { + if (stop == null) { + stop = start; + start = 0; + } + step = step || 1; + + var result = [], + nSteps = countSteps(stop - start, step), + i = start; + + while (i <= stop) { + result.push(i); + i += step; + } + + return result; + } + + module.exports = range; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduce.js new file mode 100644 index 00000000..1a350c6e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduce.js @@ -0,0 +1,33 @@ +var forEach = require('./forEach'); + + /** + * Array reduce + */ + function reduce(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2, + result = initVal; + + if (arr == null || !arr.length) { + if (!hasInit) { + throw new Error('reduce of empty array with no initial value'); + } else { + return initVal; + } + } + + var i = -1, len = arr.length; + while (++i < len) { + if (!hasInit) { + result = arr[i]; + hasInit = true; + } else { + result = fn(result, arr[i], i, arr); + } + } + + return result; + } + + module.exports = reduce; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js new file mode 100644 index 00000000..e36fd4aa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js @@ -0,0 +1,34 @@ + + + /** + * Array reduceRight + */ + function reduceRight(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2; + + if (arr == null || !arr.length) { + if (hasInit) { + return initVal; + } else { + throw new Error('reduce of empty array with no initial value'); + } + } + + var i = arr.length, result = initVal, value; + while (--i >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + value = arr[i]; + if (!hasInit) { + result = value; + hasInit = true; + } else { + result = fn(result, value, i, arr); + } + } + return result; + } + + module.exports = reduceRight; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reject.js new file mode 100644 index 00000000..685f2918 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reject.js @@ -0,0 +1,26 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array reject + */ + function reject(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (!callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + module.exports = reject; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/remove.js new file mode 100644 index 00000000..aa6517db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/remove.js @@ -0,0 +1,13 @@ +var indexOf = require('./indexOf'); + + /** + * Remove a single item from the array. + * (it won't remove duplicates, just a single item) + */ + function remove(arr, item){ + var idx = indexOf(arr, item); + if (idx !== -1) arr.splice(idx, 1); + } + + module.exports = remove; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js new file mode 100644 index 00000000..d5f7f3b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js @@ -0,0 +1,15 @@ +var indexOf = require('./indexOf'); + + /** + * Remove all instances of an item from array. + */ + function removeAll(arr, item){ + var idx = indexOf(arr, item); + while (idx !== -1) { + arr.splice(idx, 1); + idx = indexOf(arr, item, idx); + } + } + + module.exports = removeAll; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js new file mode 100644 index 00000000..97805ec8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js @@ -0,0 +1,29 @@ +var randInt = require('../random/randInt'); +var forEach = require('./forEach'); + + /** + * Shuffle array items. + */ + function shuffle(arr) { + var results = [], + rnd; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + if (!i) { + results[0] = arr[0]; + } else { + rnd = randInt(0, i); + results[i] = results[rnd]; + results[rnd] = arr[i]; + } + } + + return results; + } + + module.exports = shuffle; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/some.js new file mode 100644 index 00000000..8d17772b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/some.js @@ -0,0 +1,27 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Array some + */ + function some(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback(arr[i], i, arr) ) { + result = true; + break; + } + } + + return result; + } + + module.exports = some; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/sort.js new file mode 100644 index 00000000..7807339b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/sort.js @@ -0,0 +1,55 @@ + + + /** + * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) + */ + function mergeSort(arr, compareFn) { + if (arr == null) { + return []; + } else if (arr.length < 2) { + return arr; + } + + if (compareFn == null) { + compareFn = defaultCompare; + } + + var mid, left, right; + + mid = ~~(arr.length / 2); + left = mergeSort( arr.slice(0, mid), compareFn ); + right = mergeSort( arr.slice(mid, arr.length), compareFn ); + + return merge(left, right, compareFn); + } + + function defaultCompare(a, b) { + return a < b ? -1 : (a > b? 1 : 0); + } + + function merge(left, right, compareFn) { + var result = []; + + while (left.length && right.length) { + if (compareFn(left[0], right[0]) <= 0) { + // if 0 it should preserve same order (stable) + result.push(left.shift()); + } else { + result.push(right.shift()); + } + } + + if (left.length) { + result.push.apply(result, left); + } + + if (right.length) { + result.push.apply(result, right); + } + + return result; + } + + module.exports = mergeSort; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/split.js new file mode 100644 index 00000000..4f3ba50c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/split.js @@ -0,0 +1,35 @@ + + + /** + * Split array into a fixed number of segments. + */ + function split(array, segments) { + segments = segments || 2; + var results = []; + if (array == null) { + return results; + } + + var minLength = Math.floor(array.length / segments), + remainder = array.length % segments, + i = 0, + len = array.length, + segmentIndex = 0, + segmentLength; + + while (i < len) { + segmentLength = minLength; + if (segmentIndex < remainder) { + segmentLength++; + } + + results.push(array.slice(i, i + segmentLength)); + + segmentIndex++; + i += segmentLength; + } + + return results; + } + module.exports = split; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js new file mode 100644 index 00000000..ce4c55dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js @@ -0,0 +1,28 @@ +var isFunction = require('../lang/isFunction'); + + /** + * Creates an object that holds a lookup for the objects in the array. + */ + function toLookup(arr, key) { + var result = {}; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length, value; + if (isFunction(key)) { + while (++i < len) { + value = arr[i]; + result[key(value)] = value; + } + } else { + while (++i < len) { + value = arr[i]; + result[value[key]] = value; + } + } + + return result; + } + module.exports = toLookup; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/union.js new file mode 100644 index 00000000..f1334a91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/union.js @@ -0,0 +1,19 @@ +var unique = require('./unique'); +var append = require('./append'); + + /** + * Concat multiple arrays and remove duplicates + */ + function union(arrs) { + var results = []; + var i = -1, len = arguments.length; + while (++i < len) { + append(results, arguments[i]); + } + + return unique(results); + } + + module.exports = union; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/unique.js new file mode 100644 index 00000000..0192b2df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/unique.js @@ -0,0 +1,17 @@ +var indexOf = require('./indexOf'); +var filter = require('./filter'); + + /** + * @return {array} Array of unique items + */ + function unique(arr){ + return filter(arr, isUnique); + } + + function isUnique(item, i, arr){ + return indexOf(arr, item, i+1) === -1; + } + + module.exports = unique; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/xor.js new file mode 100644 index 00000000..c125a996 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/xor.js @@ -0,0 +1,26 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var contains = require('./contains'); + + + /** + * Exclusive OR. Returns items that are present in a single array. + * - like ptyhon's `symmetric_difference` + */ + function xor(arr1, arr2) { + arr1 = unique(arr1); + arr2 = unique(arr2); + + var a1 = filter(arr1, function(item){ + return !contains(arr2, item); + }), + a2 = filter(arr2, function(item){ + return !contains(arr1, item); + }); + + return a1.concat(a2); + } + + module.exports = xor; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/zip.js new file mode 100644 index 00000000..931eb818 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/zip.js @@ -0,0 +1,29 @@ +var max = require('./max'); +var pluck = require('./pluck'); +var map = require('./map'); + + function getLength(arr) { + return arr == null ? 0 : arr.length; + } + + /** + * Merges together the values of each of the arrays with the values at the + * corresponding position. + */ + function zip(arr){ + var len = arr ? max(map(arguments, getLength)) : 0, + results = [], + i = -1, + item; + while (++i < len) { + results.push(map(arguments, function(item) { + return item == null ? undefined : item[i]; + })); + } + + return results; + } + + module.exports = zip; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection.js new file mode 100644 index 00000000..d5cf6cad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection.js @@ -0,0 +1,22 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'contains' : require('./collection/contains'), + 'every' : require('./collection/every'), + 'filter' : require('./collection/filter'), + 'find' : require('./collection/find'), + 'forEach' : require('./collection/forEach'), + 'make_' : require('./collection/make_'), + 'map' : require('./collection/map'), + 'max' : require('./collection/max'), + 'min' : require('./collection/min'), + 'pluck' : require('./collection/pluck'), + 'reduce' : require('./collection/reduce'), + 'reject' : require('./collection/reject'), + 'size' : require('./collection/size'), + 'some' : require('./collection/some') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/contains.js new file mode 100644 index 00000000..a73f994b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/contains.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrContains = require('../array/contains'); +var objContains = require('../object/contains'); + + /** + */ + module.exports = make(arrContains, objContains); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/every.js new file mode 100644 index 00000000..300e03c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/every.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrEvery = require('../array/every'); +var objEvery = require('../object/every'); + + /** + */ + module.exports = make(arrEvery, objEvery); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/filter.js new file mode 100644 index 00000000..38757005 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/filter.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * filter collection values, returns array. + */ + function filter(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + var results = []; + if (!list) { + return results; + } + forEach(list, function(value, index, list) { + if (iterator(value, index, list)) { + results[results.length] = value; + } + }); + return results; + } + + module.exports = filter; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/find.js new file mode 100644 index 00000000..14317e64 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/find.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrFind = require('../array/find'); +var objFind = require('../object/find'); + + /** + * Find value that returns true on iterator check. + */ + module.exports = make(arrFind, objFind); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js new file mode 100644 index 00000000..6e28dcb1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrForEach = require('../array/forEach'); +var objForEach = require('../object/forOwn'); + + /** + */ + module.exports = make(arrForEach, objForEach); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/make_.js new file mode 100644 index 00000000..029d27bf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/make_.js @@ -0,0 +1,19 @@ + + + /** + * internal method used to create other collection modules. + */ + function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { + return function(){ + var args = Array.prototype.slice.call(arguments); + if (args[0] == null) { + return defaultReturn; + } + // array-like is treated as array + return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); + }; + } + + module.exports = makeCollectionMethod; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/map.js new file mode 100644 index 00000000..fc157f53 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/map.js @@ -0,0 +1,23 @@ +var isObject = require('../lang/isObject'); +var values = require('../object/values'); +var arrMap = require('../array/map'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Map collection values, returns Array. + */ + function map(list, callback, thisObj) { + callback = makeIterator(callback, thisObj); + // list.length to check array-like object, if not array-like + // we simply map all the object values + if( isObject(list) && list.length == null ){ + list = values(list); + } + return arrMap(list, function (val, key, list) { + return callback(val, key, list); + }); + } + + module.exports = map; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/max.js new file mode 100644 index 00000000..a8490e7e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/max.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrMax = require('../array/max'); +var objMax = require('../object/max'); + + /** + * Get maximum value inside collection + */ + module.exports = make(arrMax, objMax); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/min.js new file mode 100644 index 00000000..51d9f148 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/min.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrMin = require('../array/min'); +var objMin = require('../object/min'); + + /** + * Get minimum value inside collection. + */ + module.exports = make(arrMin, objMin); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js new file mode 100644 index 00000000..9b283776 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js @@ -0,0 +1,14 @@ +var map = require('./map'); + + /** + * Extract a list of property values. + */ + function pluck(list, key) { + return map(list, function(value) { + return value[key]; + }); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js new file mode 100644 index 00000000..4c075735 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrReduce = require('../array/reduce'); +var objReduce = require('../object/reduce'); + + /** + */ + module.exports = make(arrReduce, objReduce); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reject.js new file mode 100644 index 00000000..2a92e3b3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reject.js @@ -0,0 +1,16 @@ +var filter = require('./filter'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Inverse or collection/filter + */ + function reject(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + return filter(list, function(value, index, list) { + return !iterator(value, index, list); + }, thisObj); + } + + module.exports = reject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/size.js new file mode 100644 index 00000000..244e33e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/size.js @@ -0,0 +1,19 @@ +var isArray = require('../lang/isArray'); +var objSize = require('../object/size'); + + /** + * Get collection size + */ + function size(list) { + if (!list) { + return 0; + } + if (isArray(list)) { + return list.length; + } + return objSize(list); + } + + module.exports = size; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/some.js new file mode 100644 index 00000000..48fd252e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/some.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrSome = require('../array/some'); +var objSome = require('../object/some'); + + /** + */ + module.exports = make(arrSome, objSome); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date.js new file mode 100644 index 00000000..1cde1a95 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date.js @@ -0,0 +1,21 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'dayOfTheYear' : require('./date/dayOfTheYear'), + 'diff' : require('./date/diff'), + 'i18n_' : require('./date/i18n_'), + 'isLeapYear' : require('./date/isLeapYear'), + 'isSame' : require('./date/isSame'), + 'parseIso' : require('./date/parseIso'), + 'startOf' : require('./date/startOf'), + 'strftime' : require('./date/strftime'), + 'timezoneAbbr' : require('./date/timezoneAbbr'), + 'timezoneOffset' : require('./date/timezoneOffset'), + 'totalDaysInMonth' : require('./date/totalDaysInMonth'), + 'totalDaysInYear' : require('./date/totalDaysInYear'), + 'weekOfTheYear' : require('./date/weekOfTheYear') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js new file mode 100644 index 00000000..85905c5a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js @@ -0,0 +1,13 @@ +var isDate = require('../lang/isDate'); + + /** + * return the day of the year (1..366) + */ + function dayOfTheYear(date){ + return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - + Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; + } + + module.exports = dayOfTheYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/diff.js new file mode 100644 index 00000000..1131cdcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/diff.js @@ -0,0 +1,130 @@ +var totalDaysInMonth = require('./totalDaysInMonth'); +var totalDaysInYear = require('./totalDaysInYear'); +var convert = require('../time/convert'); + + /** + * calculate the difference between dates (range) + */ + function diff(start, end, unitName){ + // sort the dates to make it easier to process (specially year/month) + if (start > end) { + var swap = start; + start = end; + end = swap; + } + + var output; + + if (unitName === 'month') { + output = getMonthsDiff(start, end); + } else if (unitName === 'year'){ + output = getYearsDiff(start, end); + } else if (unitName != null) { + if (unitName === 'day') { + // ignore timezone difference because of daylight savings time + start = toUtc(start); + end = toUtc(end); + } + output = convert(end - start, 'ms', unitName); + } else { + output = end - start; + } + + return output; + } + + + function toUtc(d){ + // we ignore timezone differences on purpose because of daylight + // savings time, otherwise it would return fractional days/weeks even + // if a full day elapsed. eg: + // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) + // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) + // diff should be 4 days and not 4.041666666666667 + return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getHours(), d.getMinutes(), d.getSeconds(), + d.getMilliseconds()); + } + + + function getMonthsDiff(start, end){ + return getElapsedMonths(start, end) + + getElapsedYears(start, end) * 12 + + getFractionalMonth(start, end); + } + + + function getYearsDiff(start, end){ + var elapsedYears = getElapsedYears(start, end); + return elapsedYears + getFractionalYear(start, end, elapsedYears); + } + + + function getElapsedMonths(start, end){ + var monthDiff = end.getMonth() - start.getMonth(); + if (monthDiff < 0) { + monthDiff += 12; + } + // less than a full month + if (start.getDate() > end.getDate()) { + monthDiff -= 1; + } + return monthDiff; + } + + + function getElapsedYears(start, end){ + var yearDiff = end.getFullYear() - start.getFullYear(); + // less than a full year + if (start.getMonth() > end.getMonth()) { + yearDiff -= 1; + } + return yearDiff; + } + + + function getFractionalMonth(start, end){ + var fractionalDiff = 0; + var startDay = start.getDate(); + var endDay = end.getDate(); + + if (startDay !== endDay) { + var startTotalDays = totalDaysInMonth(start); + var endTotalDays = totalDaysInMonth(end); + var totalDays; + var daysElapsed; + + if (startDay > endDay) { + // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) + var baseDay = startTotalDays - startDay; + daysElapsed = endDay + baseDay; + // total days should be relative to 1st day of next month if + // startDay > endTotalDays + totalDays = (startDay > endTotalDays)? + endTotalDays + baseDay + 1 : startDay + baseDay; + } else { + // fractional is only based on endMonth eg: Jan 12 - Feb 18 + // (6 fractional days, 28 days until next full month) + daysElapsed = endDay - startDay; + totalDays = endTotalDays; + } + + fractionalDiff = daysElapsed / totalDays; + } + + return fractionalDiff; + } + + + function getFractionalYear(start, end, elapsedYears){ + var base = elapsedYears? + new Date(end.getFullYear(), start.getMonth(), start.getDate()) : + start; + var elapsedDays = diff(base, end, 'day'); + return elapsedDays / totalDaysInYear(end); + } + + + module.exports = diff; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js new file mode 100644 index 00000000..f9526ce4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js @@ -0,0 +1,61 @@ + + // en-US (English, United States) + module.exports = { + "am" : "AM", + "pm" : "PM", + + "x": "%m/%d/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %I:%M:%S %p %Z", + + "months" : [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + + "months_abbr" : [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + + "days" : [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + + "days_abbr" : [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ] + }; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js new file mode 100644 index 00000000..71ebadb5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js @@ -0,0 +1,61 @@ + + // pt-BR (Brazillian Portuguese) + module.exports = { + "am" : "", + "pm" : "", + + "x": "%d/%m/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %H:%M:%S %Z", + + "months" : [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + + "months_abbr" : [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Out", + "Nov", + "Dez" + ], + + "days" : [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" + ], + + "days_abbr" : [ + "Dom", + "Seg", + "Ter", + "Qua", + "Qui", + "Sex", + "Sáb" + ] + }; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js new file mode 100644 index 00000000..723fc103 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js @@ -0,0 +1,14 @@ +var mixIn = require('../object/mixIn'); +var enUS = require('./i18n/en-US'); + + // we also use mixIn to make sure we don't affect the original locale + var activeLocale = mixIn({}, enUS, { + // we expose a "set" method to allow overriding the global locale + set : function(localeData){ + mixIn(activeLocale, localeData); + } + }); + + module.exports = activeLocale; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js new file mode 100644 index 00000000..4212870b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js @@ -0,0 +1,15 @@ +var isDate = require('../lang/isDate'); + + /** + * checks if it's a leap year + */ + function isLeapYear(fullYear){ + if (isDate(fullYear)) { + fullYear = fullYear.getFullYear(); + } + return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); + } + + module.exports = isLeapYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isSame.js new file mode 100644 index 00000000..4097d29b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isSame.js @@ -0,0 +1,16 @@ +var startOf = require('./startOf'); + + /** + * Check if date is "same" with optional period + */ + function isSame(date1, date2, period){ + if (period) { + date1 = startOf(date1, period); + date2 = startOf(date2, period); + } + return Number(date1) === Number(date2); + } + + module.exports = isSame; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js new file mode 100644 index 00000000..8ea2b171 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js @@ -0,0 +1,146 @@ +var some = require('../array/some'); + + var datePatterns = [ + /^([0-9]{4})$/, // YYYY + /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) + /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD + ]; + var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD + + var timePatterns = [ + /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh + /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm + /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss + ]; + + var DATE_TIME = /^(.+)T(.+)$/; + var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; + + function matchAll(str, patterns) { + var match; + var found = some(patterns, function(pattern) { + return !!(match = pattern.exec(str)); + }); + + return found ? match : null; + } + + function getDate(year, month, day) { + var date = new Date(Date.UTC(year, month, day)); + + // Explicitly set year to avoid Date.UTC making dates < 100 relative to + // 1900 + date.setUTCFullYear(year); + + var valid = + date.getUTCFullYear() === year && + date.getUTCMonth() === month && + date.getUTCDate() === day; + return valid ? +date : NaN; + } + + function parseOrdinalDate(str) { + var match = ORD_DATE.exec(str); + if (match ) { + var year = +match[1], + day = +match[2], + date = new Date(Date.UTC(year, 0, day)); + + if (date.getUTCFullYear() === year) { + return +date; + } + } + + return NaN; + } + + function parseDate(str) { + var match, year, month, day; + + var match = matchAll(str, datePatterns); + if (match === null) { + // Ordinal dates are verified differently. + return parseOrdinalDate(str); + } + + year = (match[1] === void 0) ? 0 : +match[1]; + month = (match[2] === void 0) ? 0 : +match[2] - 1; + day = (match[3] === void 0) ? 1 : +match[3]; + + return getDate(year, month, day); + } + + function getTime(hr, min, sec) { + var valid = + (hr < 24 && hr >= 0 && + min < 60 && min >= 0 && + sec < 60 && min >= 0) || + (hr === 24 && min === 0 && sec === 0); + if (!valid) { + return NaN; + } + + return ((hr * 60 + min) * 60 + sec) * 1000; + } + + function parseOffset(str) { + var match; + if (str.charAt(str.length - 1) === 'Z') { + str = str.substring(0, str.length - 1); + } else if ((match = TIME_ZONE.exec(str))) { + var match = TIME_ZONE.exec(str); + if (match) { + var hours = +match[3], + minutes = (match[4] === void 0) ? 0 : +match[4], + offset = getTime(hours, minutes, 0); + + if (match[2] === '-') { + offset *= -1; + } + + return { offset: offset, time: match[1] }; + } + } + + // No time zone specified, assume UTC + return { offset: 0, time: str }; + } + + function parseTime(str) { + var match; + var offset = parseOffset(str); + + str = offset.time; + offset = offset.offset; + if (isNaN(offset)) { + return NaN; + } + + match = matchAll(str, timePatterns); + if (match === null) { + return NaN; + } + + var hours = (match[1] === void 0) ? 0 : +match[1], + minutes = (match[2] === void 0) ? 0 : +match[2], + seconds = (match[3] === void 0) ? 0 : +match[3]; + + return getTime(hours, minutes, seconds) - offset; + } + + /** + * Parse an ISO8601 formatted date string, and return a Date object. + */ + function parseISO8601(str){ + var match = DATE_TIME.exec(str); + if (!match) { + // No time specified + return parseDate(str); + } + + return parseDate(match[1]) + parseTime(match[2]); + } + + module.exports = parseISO8601; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/startOf.js new file mode 100644 index 00000000..072bc0ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/startOf.js @@ -0,0 +1,54 @@ +var clone = require('../lang/clone'); + + /** + * get a new Date object representing start of period + */ + function startOf(date, period){ + date = clone(date); + + // intentionally removed "break" from switch since start of + // month/year/etc should also reset the following periods + switch (period) { + case 'year': + date.setMonth(0); + /* falls through */ + case 'month': + date.setDate(1); + /* falls through */ + case 'week': + case 'day': + date.setHours(0); + /* falls through */ + case 'hour': + date.setMinutes(0); + /* falls through */ + case 'minute': + date.setSeconds(0); + /* falls through */ + case 'second': + date.setMilliseconds(0); + break; + default: + throw new Error('"'+ period +'" is not a valid period'); + } + + // week is the only case that should reset the weekDay and maybe even + // overflow to previous month + if (period === 'week') { + var weekDay = date.getDay(); + var baseDate = date.getDate(); + if (weekDay) { + if (weekDay >= baseDate) { + //start of the week is on previous month + date.setDate(0); + } + date.setDate(date.getDate() - date.getDay()); + } + } + + return date; + } + + module.exports = startOf; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/strftime.js new file mode 100644 index 00000000..f033d10f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/strftime.js @@ -0,0 +1,118 @@ +var pad = require('../number/pad'); +var i18n = require('./i18n_'); +var dayOfTheYear = require('./dayOfTheYear'); +var timezoneOffset = require('./timezoneOffset'); +var timezoneAbbr = require('./timezoneAbbr'); +var weekOfTheYear = require('./weekOfTheYear'); + + var _combinations = { + 'D': '%m/%d/%y', + 'F': '%Y-%m-%d', + 'r': '%I:%M:%S %p', + 'R': '%H:%M', + 'T': '%H:%M:%S', + 'x': 'locale', + 'X': 'locale', + 'c': 'locale' + }; + + + /** + * format date based on strftime format + */ + function strftime(date, format, localeData){ + localeData = localeData || i18n; + var reToken = /%([a-z%])/gi; + + function makeIterator(fn) { + return function(match, token){ + return fn(date, token, localeData); + }; + } + + return format + .replace(reToken, makeIterator(expandCombinations)) + .replace(reToken, makeIterator(convertToken)); + } + + + function expandCombinations(date, token, l10n){ + if (token in _combinations) { + var expanded = _combinations[token]; + return expanded === 'locale'? l10n[token] : expanded; + } else { + return '%'+ token; + } + } + + + function convertToken(date, token, l10n){ + switch (token){ + case 'a': + return l10n.days_abbr[date.getDay()]; + case 'A': + return l10n.days[date.getDay()]; + case 'h': + case 'b': + return l10n.months_abbr[date.getMonth()]; + case 'B': + return l10n.months[date.getMonth()]; + case 'C': + return pad(Math.floor(date.getFullYear() / 100), 2); + case 'd': + return pad(date.getDate(), 2); + case 'e': + return pad(date.getDate(), 2, ' '); + case 'H': + return pad(date.getHours(), 2); + case 'I': + return pad(date.getHours() % 12, 2); + case 'j': + return pad(dayOfTheYear(date), 3); + case 'L': + return pad(date.getMilliseconds(), 3); + case 'm': + return pad(date.getMonth() + 1, 2); + case 'M': + return pad(date.getMinutes(), 2); + case 'n': + return '\n'; + case 'p': + return date.getHours() >= 12? l10n.pm : l10n.am; + case 'P': + return convertToken(date, 'p', l10n).toLowerCase(); + case 's': + return date.getTime() / 1000; + case 'S': + return pad(date.getSeconds(), 2); + case 't': + return '\t'; + case 'u': + var day = date.getDay(); + return day === 0? 7 : day; + case 'U': + return pad(weekOfTheYear(date), 2); + case 'w': + return date.getDay(); + case 'W': + return pad(weekOfTheYear(date, 1), 2); + case 'y': + return pad(date.getFullYear() % 100, 2); + case 'Y': + return pad(date.getFullYear(), 4); + case 'z': + return timezoneOffset(date); + case 'Z': + return timezoneAbbr(date); + case '%': + return '%'; + default: + // keep unrecognized tokens + return '%'+ token; + } + } + + + module.exports = strftime; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js new file mode 100644 index 00000000..b1006875 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js @@ -0,0 +1,17 @@ +var timezoneOffset = require('./timezoneOffset'); + + /** + * Abbreviated time zone name or similar information. + */ + function timezoneAbbr(date){ + // Date.toString gives different results depending on the + // browser/system so we fallback to timezone offset + // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' + // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' + var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); + return tz? tz[1] : timezoneOffset(date); + } + + module.exports = timezoneAbbr; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js new file mode 100644 index 00000000..9492dceb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js @@ -0,0 +1,16 @@ +var pad = require('../number/pad'); + + /** + * time zone as hour and minute offset from UTC (e.g. +0900) + */ + function timezoneOffset(date){ + var offset = date.getTimezoneOffset(); + var abs = Math.abs(offset); + var h = pad(Math.floor(abs / 60), 2); + var m = pad(abs % 60, 2); + return (offset > 0? '-' : '+') + h + m; + } + + module.exports = timezoneOffset; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js new file mode 100644 index 00000000..8aafeb84 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js @@ -0,0 +1,25 @@ +var isDate = require('../lang/isDate'); +var isLeapYear = require('./isLeapYear'); + + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + + /** + * returns the total amount of days in the month (considering leap years) + */ + function totalDaysInMonth(fullYear, monthIndex){ + if (isDate(fullYear)) { + var date = fullYear; + year = date.getFullYear(); + monthIndex = date.getMonth(); + } + + if (monthIndex === 1 && isLeapYear(fullYear)) { + return 29; + } else { + return DAYS_IN_MONTH[monthIndex]; + } + } + + module.exports = totalDaysInMonth; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js new file mode 100644 index 00000000..b4b7e9b7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js @@ -0,0 +1,13 @@ +var isLeapYear = require('./isLeapYear'); + + /** + * return the amount of days in the year following the gregorian calendar + * and leap years + */ + function totalDaysInYear(fullYear){ + return isLeapYear(fullYear)? 366 : 365; + } + + module.exports = totalDaysInYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js new file mode 100644 index 00000000..dd51b7f1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js @@ -0,0 +1,16 @@ +var dayOfTheYear = require('./dayOfTheYear'); + + /** + * Return the week of the year based on given firstDayOfWeek + */ + function weekOfTheYear(date, firstDayOfWeek){ + firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; + var doy = dayOfTheYear(date); + var dow = (7 + date.getDay() - firstDayOfWeek) % 7; + var relativeWeekDay = 6 - firstDayOfWeek - dow; + return Math.floor((doy + relativeWeekDay) / 7); + } + + module.exports = weekOfTheYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/array.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/array.md new file mode 100644 index 00000000..1f390fbc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/array.md @@ -0,0 +1,773 @@ +# array # + +Array utilities. + + + + +## append(arr1, arr2):Array + +Appends an array to the end of the other. +The first array will be modified and will contain the appended items. + +See: [`union()`](#union), [`combine()`](#combine) + +```js +var foo = ['a', 'b'], + bar = ['b', 'd']; + +append(foo, bar); // ['a', 'b', 'b', 'd'] +``` + + + +## collect(arr, callback, [thisObj]):Array + +Maps the items in `arr` and concatenates the resulting arrays. + +See: [`map()`](#map) + +```js +collect([1, 2, 3], function(val) { + return [val, val % 2]; +}); // [1, 1, 2, 0, 3, 1]; + +collect(['a', 'bb', ''], function(val) { + return val.split(''); +}); // ['a', 'b', 'b'] +``` + +It also supports a shorthand syntax: + +```js +var items = [{ a: [1] }, { b: 'foo' }, { a: [2, 3] }]; +collect(items, 'a'); // [1, 2, 3]; +``` + + + +## combine(arr1, arr2):Array + +Combines an array with all the items of another. +The first array will be modified and will contain the combined items. +Does not allow duplicates and is case and type sensitive. + +See: [`union()`](#union), [`append()`](#append) + +```js +var foo = ['a', 'b'], + bar = ['b', 'd']; + +combine(foo, bar); // ['a', 'b', 'd'] +``` + + + +## compact(arr):Array + +Returns a new Array without any `null` or `undefined` values. Note that it will +keep empty strings and other falsy values (simillar to Ruby Array#compact). + +```js +var arr = [0, 1, null, false, '', 'foo', undefined, 'bar']; +compact(arr); // [0, 1, false, '', 'foo', 'bar']; +``` + + + +## contains(arr, value):Boolean + +Checks if Array contains value. Alias to `indexOf(arr, val) !== -1`. + +```js +var arr = [1, 2, 3]; +contains(arr, 2); // true +contains(arr, 'foo'); // false +``` + + + +## difference(...arrs):Array + +Return a new Array with elements that aren't present in the other Arrays +besides the first one. + +Works like [Python set#difference](http://docs.python.org/library/stdtypes.html#set.difference). + +It will remove duplicates. + +See: [`xor()`](#xor), [`intersection()`](#intersection) + +```js +var a = ['a', 'b', 1]; +var b = ['c', 1]; +difference(a, b); // ['a', 'b'] +``` + + + +## every(arr, callback, [thisObj]):Array + +Crossbrowser `Array.every()`. + +Tests whether all elements in the array pass the test implemented by the provided function. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = [1, 'foo', 'bar']; +every(items, isString); // false +every(items, isFunction); // false +every(items, function(val, key, arr){ + return val != null; +}); // true +``` + +more info at [MDN Array#every](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every) + +It also supports a shorthand syntax: + +```js +var items = [{id:1, active:true}, {id:3, active:true}, {id:8, active:true}]; +// all items with `id === 8` +every(items, {id:8}); // false +// `active` is truthy on all items +every(items, 'active'); // true +``` + + + +## filter(arr, callback, [thisObj]):Array + +Crossbrowser `Array.filter()`. + +Creates a new array with all elements that pass the callback test. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var nums = [1, 2, 3, 4, 5, 6]; +var oddNumbers = filter(nums, function(val, key, arr){ + return (val % 2) !== 0; +}); +// > [1, 3, 5] +``` + +more info at [MDN Array#filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) + +Filter also supports shorthand notation: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true}, + {name:'jane', surname:'doe', beard:false} +]; +// filter item that matches all properties/values pairs +filter(arr, {name:'john', beard:false}); +// > [{name:'john', surnname:'connor', beard:false}] +// items where 'beard' is a truthy value +filter(arr, 'beard'); +// > [{name:'john', surnname:'doe', beard:true}] +``` + +See [`reject()`](#reject) + + + +## find(arr, callback, [thisObj]):void + +Loops through all the items in the Array and returns the first one that passes +a truth test (callback). + +```js +var arr = [123, {a:'b'}, 'foo', 'bar']; +find(arr, isString); // "foo" +find(arr, isNumber); // 123 +find(arr, isObject); // {a:'b'} +``` + +Find also supports shorthand notation: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true} +]; +// first item that matches all properties/values pairs +find(arr, {name:'john'}); // {name:'john', surnname:'connor', beard:false} +// first item where 'beard' is a truthy value +find(arr, 'beard'); // {name:'john', surnname:'doe', beard:true} +``` + +See: [findIndex()](#findIndex) + + + +## findIndex(arr, iterator, [thisObj]):Number + +Loops through the items in the Array and returns the index of the first one +that passes a truth test (callback). + +Returns `-1` if no item was found that passes the truth test. + +```js +var arr = [1, { a: 1 }, 'foo', 'bar']; +findIndex(arr, isString); // 2 +findIndex(arr, isNumber); // 0 +findIndex(arr, isObject); // 1 +findIndex(arr, isRegExp); // -1 +``` + +`findIndex` also supports shorthand notation: + +```js +var pets = [ + { pet: 'dog', name: 'Sam' }, + { pet: 'dog', name: 'Maggie' } +]; + +findIndex(pets, { pet: 'dog' }); // 0 +findIndex(pets, { name: 'Maggie' }); // 1 +``` + +See: [find()](#find) + + + +## flatten(arr, [level]):Array + +Recursively flattens an array. A new array containing all the elements is +returned. If `level` is specified, it will only flatten up to that level. + +### Example + +```js +flatten([1, [2], [3, [4, 5]]]); +// > [1, 2, 3, 4, 5] +flatten([1, [2], [3, [4, 5]]], 1); +// > [1, 2, 3, [4, 5]] +``` + + + +## forEach(arr, callback, [thisObj]):void + +Crossbrowser `Array.forEach()`. + +It allows exiting the iteration early by returning `false` on the callback. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = ['foo', 'bar', 'lorem', 'ipsum']; +forEach(items, function(val, key, arr){ + console.log(key +' : '+ val); + if (val === 'lorem') { + // stop iteration (break) + return false; + } +}); +``` + +more info at [MDN Array#forEach](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach) + + + +## indexOf(arr, item, [fromIndex]):Number + +Crossbrowser `Array.indexOf()`. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#indexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) + + + + +## insert(arr, ...items):Number + +Push items into array only if they aren't contained by it. Returns the new +`length` of the array. + +See: [`remove()`](#remove), [`removeAll()`](#removeAll), +[`contains()`](#contains) + +```js +var arr = ['a', 'b']; +insert(arr, 'a'); // 2 : ['a', 'b'] +insert(arr, 'c'); // 3 : ['a', 'b', 'c'] +insert(arr, 1, 2, 'b'); // 5 : ['a', 'b', 'c', 1, 2] +``` + + + +## intersection(...arrs):Array + +Return a new Array with elements common to all Arrays. + +Similar to Python set#intersection and underscore.js intersection. + +It will remove duplicates. + +See: [`difference()`](#difference), [`xor()`](#xor) + +```js +var a = ['a', 'b', 1], + b = ['c', 1], + c = [1, 2, 3]; +intersection(a, b, c); // [1] +``` + + + +## invoke(arr, methodName[, ...args]):Array + +Call `methodName` on each item of the array passing custom arguments if needed. + +```js +invoke([[3,2,1], [9,5,2]], 'sort'); // [[1,2,3], [2,5,9]] +``` + + + +## join(arr, [separator]):String + +Joins the strings in `arr`, inserting `separator` between each value. + +This ignores null values and empty strings that are in the array. `separator` +defaults to an empty string. This will convert all non-string objects in the +array to a string. + +### Example + +```js +join(['a', 'b', 'c']); // 'abc' +join(['foo', 'bar'], ', '); // 'foo, bar' +join([null, 'foo', '', 'bar', undefined], ':'); // 'foo:bar' +``` + + + +## lastIndexOf(arr, item, [fromIndex]):Number + +Crossbrowser `Array.lastIndexOf()`. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#lastIndexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) + + + +## map(arr, callback, [thisObj]]):Array + +Crossbrowser `Array.map()`. + +Creates a new array with the results of calling a provided function on every +element in this array. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +See: [`collect()`](#collect) + +```js +var nums = [1,2,3,4]; +var double = map(nums, function(val, key, arr){ + return val * 2; +}); +// > [2, 4, 6, 8] +``` + +more info at [MDN Array#map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) + +It also supports a shorthand notation which can be used to achieve same result +as [`array/pluck`](#pluck): + +```js +var src = ['lorem', 'ipsum', 'foo', 'amet']; +// grab the "length" property of all items +var lengths = map(src, 'length'); // [5, 5, 3, 4] +``` + + + +## max(arr, [iterator], [thisObj]):* + +Returns maximum value inside array or use a custom iterator to define how items +should be compared. + +See: [`min()`](#min) + +```js +max([10, 2, 7]); // 10 +max(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'lorem' +``` + +It also supports a shorthand notation: + +```js +max(['foo', 'lorem', 'amet'], 'length'); // "lorem" +``` + + + +## min(arr, [iterator], [thisObj]):* + +Returns minimum value inside array or use a custom iterator to define how items +should be compared. + +See: [`max()`](#max) + +```js +min([10, 2, 7]); // 2 +min(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'foo' +``` + +It also supports a shorthand notation: + +```js +min(['foo', 'lorem', 'amet'], 'length'); // "foo" +``` + + + +## pick(arr):* + +Gets a random item and remove it from the array. + +### Example: + + var arr = [1, 2, 3, 4, 5, 6]; + var item_1 = pick(arr); // 4 + var item_2 = pick(arr); // 1 + console.log(arr); // [2, 3, 5, 6] + + + +## pluck(arr, propName):Array + +Extract a list of property values. + +See: [`function/prop()`](function.html#prop) + +```js +var users = [{name : 'John', age: 21}, {name: 'Jane', age : 27}]; +var names = pluck(users, 'name'); // ["John", "Jane"] +var ages = pluck(users, 'age'); // [21, 27] +``` + + + +## range([start], stop[, step]):Array + +Creates a new Array with all the values inside the range. Works similarly to +Python#range or PHP#range. + +### Arguments + + 1. `[start]` (Number) : Range start. Default is `0`. + 2. `stop` (Number) : Range limit. + 3. `[step]` (Number) : Step size. Default is `1`. + +### Example + +```js +range(5); // [0, 1, 2, 3, 4, 5] +range(0, 5); // [0, 1, 2, 3, 4, 5] +range(0, 5, 2); // [0, 2, 4] +range(20, 40, 5); // [20, 25, 30, 35, 40] +``` + + + +## reduce(arr, fn):* + +Crossbrowser `Array.reduce()`. + +Apply a function against an accumulator and each value of the array (from +left-to-right) as to reduce it to a single value. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#reduce](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce) + + + +## reduceRight(arr, fn):* + +Crossbrowser `Array.reduceRight()`. + +Apply a function simultaneously against two values of the array (from +right-to-left) as to reduce it to a single value. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#reduceRight](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight) + + + +## reject(arr, fn, thisObj):Array + +Creates a new array with all the elements that do **not** pass the truth test. +Opposite of [`filter()`](#filter). + +See [`filter()`](#filter) + +### Example + +```js +var numbers = [1, 2, 3, 4, 5, 6]; +reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4, 6] +``` + +It also supports a shorthand syntax: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true}, + {name:'jane', surname:'doe', beard:false} +]; +// reject items that matches all properties/values pairs +reject(arr, {name:'john'}); +// > [{name:'jane', surnname:'doe', beard:false}] +// reject items where 'beard' is a truthy value +filter(arr, 'beard'); +// > [{name:'john', surnname:'connor', beard:false}, +// {name:'jane', surname:'doe', beard:false}] +``` + + + +## remove(arr, item):void + +Remove a single item from the array. + +IMPORTANT: it won't remove duplicates, just a single item. + +### Example + +```js +var foo = [1, 2, 3, 4]; +remove(foo, 2); +console.log(foo); // [1, 3, 4] +``` + + + +## removeAll(arr, item):void + +Remove all instances of an item from the array. + +### Example + +```js +var foo = [1, 2, 3, 4, 2, 2]; +removeAll(foo, 2); +console.log(foo); // [1, 3, 4]; +``` + + + +## shuffle(arr):Array + +Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle. + +### Example + +```js +var arr = ['a', 'b', 'c', 'd', 'e']; +shuffle(arr); // ['b', 'd', 'e', 'c', 'a'] +``` + + + +## some(arr, callback, [thisObj]):Array + +Crossbrowser `Array.some()`. + +Tests whether some element in the array passes the test implemented by the provided function. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = [1, 'foo', 'bar']; +some(items, isString); // true +some(items, isFunction); // false +``` + +more info at [MDN Array#some](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some) + +It also supports a shorthand syntax: + +```js +var items = [{id:1, active:true}, {id:3, active:false}, {id:8, active:false}]; +// at least one item with `id === 8` +some(items, {id:8}); // true +// `active` is truthy on at least one item +some(items, 'active'); // true +``` + +see also: [`object/matches`](object.html#matches) + + + +## sort(arr, [compareFn]):Array + +Returns a sorted Array using the [Merge Sort](http://en.wikipedia.org/wiki/Merge_sort) algorithm (stable sort). + +The `Array.prototype.sort` browser implementations differ since the sorting algorithm isn't described in the ES spec - [in V8 it isn't stable](http://code.google.com/p/v8/issues/detail?id=90) and [on Firefox it is stable](https://bugzilla.mozilla.org/show_bug.cgi?id=224128) - so this function doesn't use the browser native implementation and is recommended in cases where a stable sort is required (items should preserve same order if already sorted). + +**Important:** It does logical comparisson by default (greater/less than) and +not a string comparisson like the native `Array#sort`. + +### compareFn + +If `compareFn` is supplied elements are sorted based on the value returned by +the `compareFn`. + + - If `compareFn(a, b)` is less than `0`, sort `a` to a lower index than `b`. + - If `compareFn(a, b)` returns `0`, leave `a` and `b` unchanged with respect + to each other, but sorted with respect to all different elements. + - If `compareFn(a, b)` is greater than `0`, sort `b` to a lower index than + `a`. + +### Example + +```js +sort([187, 23, 47, 987, 12, 59, 0]); // [0, 12, 23, 47, 59, 187, 987] +sort(['a', 'z', 'c', 'beta', 'b']); // ['a', 'b', 'beta', 'c', 'z'] + +// ['sit', 'amet', 'lorem', 'ipsum'] +sort(['lorem', 'ipsum', 'sit', 'amet'], function(a, b){ + // sort by length, items with same length + // will keep the relative order (stable) + return a.length - b.length; +}); + +// [4, 3, 2, 1] +sort([2, 3, 1, 4], function(a, b){ + // reverse sort + return b - a; +}); +``` + + + +## split(arr, [segments]):Array + +Splits an array into a fixed number of segments. + +The number of segments is specified by `segments` and defaults to 2. If the +array cannot be evenly split, the first segments will contain the extra items. +If `arr` is empty, an empty array is returned. If `arr.length` is less than +`segments`, then the resulting array will have `arr.length` number of +single-element arrays. + +### Example +```js +split([1, 2, 3, 4, 5], 3) // [ [1, 2], [3, 4], [5] ] +split([1, 2, 3, 4, 5]) // [ [1, 2, 3], [4, 5] ] +split([]) // [] +split([1, 2], 3) // [ [1], [2] ] +``` + + + +## toLookup(arr, key):Object + +Create an object that indexes the items in the array by a key. If `key` is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise `key` specifies the property on each value to use as the key. + +### Example + +```js +var foo = [{ name: 'a', thing: 1 }, { name: 'b', thing: 2 }]; +// { a: { name: 'a', thing: 1 }, b: { name: 'b', thing: 2 } } +toLookup(foo, 'name'); +// same as above +toLookup(foo, function (value) { return value.name; }); +``` + + + +## union(...arrs):Array + +Concat multiple arrays removing duplicates. + +```js +var a = ['a', 'b'], + b = ['c', 'a'], + c = [1, 'b', 2, 3, 'a']; + +//note that unique remove from begin to end +union(a, b, c); // ['c', 1, 'b', 2, 3, 'a'] +``` + + + +## unique(arr):Array + +Return a new Array of unique items. + +### Example + +```js +var foo = [1, 2, 3, 4, 2, 2, 3, 4]; +var bar = unique(foo); +console.log(foo); // [1, 2, 3, 4]; +``` + + + +## xor(arr1, arr2):Array + +Exclusive OR. Returns items that are present in a single array. + +Works like [Python set#symmetric_difference](http://docs.python.org/library/stdtypes.html#set.symmetric_difference) renamed for brevity. + +It will remove duplicates. + +See: [`difference()`](#difference), [`intersection()`](#intersection) + +```js +var a = ['a', 'b', 1]; +var b = ['c', 1]; +xor(a, b); // ['a', 'b', 'c'] +``` + + + +## zip(...arrs):Array + +Groups the elements of each array at their corresponding indexes. + +Useful for separate data sources that are coordinated through matching array +indexes. For a matrix of nested arrays, `zip.apply(...)` can transpose the +matrix in a similar fashion. + +```js +// [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] +zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); +``` + + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/collection.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/collection.md new file mode 100644 index 00000000..2ffcab10 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/collection.md @@ -0,0 +1,233 @@ +# collection # + +Methods for dealing with collections (Array or Objects). + + + +## contains(list, value):Boolean + +Checks if collection contains value. + +```js +contains({a: 1, b: 2, c: 'bar'}, 2); // true +contains([1, 2, 3], 'foo'); // false +``` + +See: [array/contains](array.html#contains), [object/contains](object.html#contains) + + + +## every(list, callback, [thisObj]):Boolean + +Tests whether all values in the collection pass the test implemented by the +provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +every(obj, isNumber); // false +``` + +See: [array/every](array.html#every), [object/every](object.html#every) + + + +## filter(list, callback, [thisObj]):Array + +Filter collection properties. + +See: [array/filter](array.html#filter), [object/filter](object.html#filter) + + + +## find(list, callback, [thisObj]):* + +Loops through all the values in the collection and returns the first one that +passes a truth test (callback). + +**Important:** loop order over objects properties isn't guaranteed to be the +same on all environments. + +```js +find({a: 'foo', b: 12}, isString); // 'foo' +find(['foo', 12], isNumber); // 12 +``` + +See: [array/find](array.html#find), [object/find](object.html#find) + + + +## forEach(list, callback, [thisObj]) + +Loop through all values of the collection. + +See: [array/forEach](array.html#forEach), [object/forOwn](object.html#forOwn) + + + +## map(list, callback, [thisObj]):Array + +Returns a new collection where the properties values are the result of calling +the callback for each property in the original collection. + +See: [array/map](array.html#map), [object/map](object.html#map) + + + +## max(list, [iterator]):* + +Returns maximum value inside collection or use a custom iterator to define how +items should be compared. + +See: [`min()`](#min), [array/max](array.html#max), [object/max](object.html#max) + +```js +max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 +max(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'lorem' +``` + + + +## min(list, [iterator]):* + +Returns minimum value inside collection or use a custom iterator to define how +items should be compared. + +See: [`max()`](#max), [array/min](array.html#min), [object/min](object.html#min) + +```js +min([10, 2, 7]); // 2 +min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'foo' +``` + + + +## pluck(list, propName):Array + +Extract a list of property values. + +```js +var users = [ + { + name : 'John', + age : 21 + }, + { + name : 'Jane', + age : 27 + } +]; + +pluck(users, 'name'); // ["John", "Jane"] +pluck(users, 'age'); // [21, 27] + +users = { + first: { + name : 'John', + age : 21 + }, + second: { + name : 'Mary', + age : 25 + } +}; + +pluck(users, 'name'); // ['John', 'Mary'] +``` + +See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck) + + + +## reduce(list, callback, initial, [thisObj]):* + +Apply a function against an accumulator and each value in the collection as to +reduce it to a single value. + +```js +var obj = {a: 1, b: 2, c: 3, d: 4}; + +function sum(prev, cur, key, list) { + return prev + cur; +} + +reduce(obj, sum); // 10 +``` + +See: [array/reduce](array.html#reduce), [object/reduce](object.html#reduce) + + + +## reject(list, fn, [thisObj]):Array + +Creates a new array with all the elements that do **not** pass the truth test. +Opposite of [`filter()`](#filter). + +### Example + +```js +var numbers = [1, 2, 3, 4, 5]; +reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4] + +var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; +reject(obj, function(x) { return (x % 2) !== 0; }); // [2, 4] +``` + +See: [array/reject](array.html#reject), [object/reject](object.html#reject) + + + +## size(list):Number + +Returns the number of values in the collection. + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +size(obj); // 3 +size([1,2,3]); // 3 +size(null); // 0 +``` + +See: [object/size](object.html#size) + + + +## some(list, callback, [thisObj]):Boolean + +Tests whether any values in the collection pass the test implemented by the +provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +some(obj, isNumber); // true +some(obj, isString); // true +some([1, 2, 3], isNumber) // true +some([1, 2, 3], isString) // false +``` + +See: [array/some](array.html#some), [object/some](object.html#some) + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/date.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/date.md new file mode 100644 index 00000000..b3f7f40e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/date.md @@ -0,0 +1,295 @@ +# date # + +Date utilities. + + +## dayOfTheYear(date):Number + +How many days elapsed since begining of the year (following gregorian +calendar). + +```js +// Jan 1st +dayOfTheYear(new Date(2013, 0, 1)); // 1 +// Dec 31th +dayOfTheYear(new Date(2013, 11, 31)); // 364 +``` + + + +## diff(date1, date2, [unitName]):Number + +Calculate the difference between dates (range). + +The returned value is always positive. The default `unitName` is `"ms"`. + +Available units: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`, +`millisecond`. + +See: [`time/convert()`](time.html#convert) + +```js +var d1 = new Date(2012, 4, 5); +var d2 = new Date(2013, 4, 8); +diff(d1, d2); // 31795200000 +diff(d1, d2, 'hour'); // 8832 +diff(d1, d2, 'week'); // 52.57142857142857 +diff(d1, d2, 'month'); // 12.096774193548388 +diff(d1, d2, 'year'); // 1.0082191780821919 +``` + + + +## isLeapYear(fullYear|date):Boolean + +Checks if it's a [leap year](http://en.wikipedia.org/wiki/Leap_year) according +to the Gregorian calendar. + +see: [`totalDaysInMonth()`](#totalDaysInMonth) + +```js +isLeapYear(2012); // true +isLeapYear(2013); // false +isLeapYear(new Date(2012, 2, 28)); // true +``` + + +## isSame(date1, date2[, period]):Boolean + +Check if both dates are the "same". + +You can pass an optional *period* used to set the comparisson precision. + +Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. + +```js +var date1 = new Date(2013, 1, 3); +var date2 = new Date(2013, 2, 9); +isSame(date1, date2); // false +isSame(date1, date2, 'day'); // false +isSame(date1, date2, 'month'); // false +isSame(date1, date2, 'year'); // true +``` + + + +## parseIso(str):Number + +Parses an [ISO8601](http://en.wikipedia.org/wiki/Iso8601) date and returns the +number of milliseconds since January 1, 1970, 00:00:00 UTC, or `NaN` if it is +not a valid ISO8601 date. + +This parses *all* ISO8601 dates, including dates without times, [ordinal +dates](https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates), and the compact +representation (omitting delimeters). The only exception is [ISO week +dates](https://en.wikipedia.org/wiki/ISO_week_date), which are not parsed. + +If no time zone offset is specified, it assumes UTC time. + +```js +// Jan 01, 1970 00:00 GMT +parseIso('1970-01-01T00:00:00') // 0 +parseIso('1970-001') // 0 +parseIso('1970-01-01') // 0 +parseIso('19700101T000000.00') // 0 +parseIso('1970-01-01T02:00+02:00') // 0 + +// Jan 02, 2000 20:10 GMT+04:00 +parseIso('2000-01-02T20:10+04:00') // 946829400000 +``` + + + +## startOf(date, period):Date + +Get a new Date at the start of the period. + +Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. + +```js +// Apr 05 2013 11:27:43 +var date = new Date(2013, 3, 5, 11, 27, 43, 123); +startOf(date, 'year'); // Jan 01 2013 00:00:00 +startOf(date, 'month'); // Apr 01 2013 00:00:00 +startOf(date, 'day'); // Apr 05 2013 00:00:00 +startOf(date, 'hour'); // Apr 05 2013 11:00:00 +``` + + + +## strftime(date, format, [l10n]):String + +Format date based on strftime format. + +Replaced tokens: + +
+
%a
locale's abbreviated weekday name.
+
%A
locale's full weekday name.
+
%b
locale's abbreviated month name.
+
%B
locale's full month name.
+
%c
locale's appropriate date and time representation.
+
%C
century number (the year divided by 100 and truncated +to an integer) as a decimal number [00..99].
+
%d
day of the month as a decimal number [01..31].
+
%D
same as %m/%d/%y.
+
%e
day of the month as a decimal number [1..31]; +a single digit is preceded by a space.
+
%F
The ISO 8601 date format (%Y-%m-%d)
+
%h
same as %b.
+
%H
hour (24-hour clock) as a decimal number [00..23].
+
%I
hour (12-hour clock) as a decimal number [01..12].
+
%j
day of the year as a decimal number [001..366].
+
%L
zero-padded milliseconds [000..999]
+
%m
month as a decimal number [01..12].
+
%M
minute as a decimal number [00..59].
+
%n
newline character.
+
%p
locale's equivalent of either "am" or "pm"
+
%P
locale's equivalent of either "AM" or "PM"
+
%r
time in a.m. and +p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p.
+
%R
time in 24 hour notation (%H:%M).
+
%s
seconds since Epoch (1970-01-01 00:00:00 UTC)
+
%S
second as a decimal number [00..60].
+
%t
tab character.
+
%T
time (%H:%M:%S).
+
%u
weekday as a decimal number [1..7], with 1 representing +Monday.
+
%U
week number of the year (Sunday as the first day of +the week) as a decimal number [00..53].
+
%V
week number of the year (Monday as the first day of the +week) as a decimal number [01..53]. If the week containing 1 January has +four or more days in the new year, then it is considered week 1. Otherwise, +it is the last week of the previous year, and the next week is week 1.
+
%w
weekday as a decimal number [0..6], with 0 representing +Sunday.
+
%W
week number of the year (Monday as the first day of +the week) as a decimal number [00..53]. All days in a new year preceding +the first Monday are considered to be in week 0.
+
%x
locale's appropriate date representation.
+
%X
locale's appropriate time representation.
+
%y
year without century as a decimal number [00..99].
+
%Y
year with century as a decimal number.
+
%Z
timezone name or abbreviation, or by no bytes +if no timezone information exists.
+
%%
is replaced by %.
+
+ +```js +var date = new Date(2013, 3, 8, 9, 2, 4); +strftime(date, '%Y-%m-%d'); // "2013-04-08" +strftime(date, '%R'); // "09:02" +strftime(date, '%Y-%m-%dT%H:%M:%S%z'); // "2013-04-08T09:02:04+0000" +``` + +You can also set a custom locale: + +```js +var ptBr = require('mout/date/i18n/pt-BR'); +strftime(date, '%a, %d %b', ptBr); // 'Seg, 08 Abr' +strftime(date, '%A, %d %B', ptBr); // 'Segunda, 08 Abril' +``` + +To set it globally: + +```js +require('mout/date/i18n_').set( customLocaleData ); +``` + +See [date/i18n](https://github.com/mout/mout/tree/master/src/date/i18n) +for localization examples. + + + +## timezoneAbbr(date):String + +Return timezone abbreviation or similar data. + +The result will vary based on the OS/browser since some environments doesn't +provide enough info about the current locale. + +```js +// IE 7-8 +timezoneAbbr(new Date()); // "-0500" +// Chrome, FF, V8 +timezoneAbbr(new Date()); // "EST" +``` + + + +## timezoneOffset(date):String + +Return time zone as hour and minute offset from UTC (e.g. +0900). + +It's important to note that JavaScript Date object will use the system locale +info to determinate the [timezone +offset](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) +and that daylight saving time affects the result. + +```js +// if system locale is EST +timezoneOffset(new Date()); // -0500 +``` + + + +## totalDaysInMonth(fullYear, monthIndex):Number + +Returns the amount of days in the month taking into consideration leap years +(following Gregorian calendar). + +see: [`isLeapYear()`](#isLeapYear) + +```js +totalDaysInMonth(2008, 1); // 29 (leap year) +totalDaysInMonth(2009, 1); // 28 + +// you can also pass a Date object as single argument +totalDaysInMonth( new Date(2013, 0, 1) ); // 31 +``` + + +## totalDaysInYear(fullYear):Number + +Returns the amount of days in the year taking into consideration leap years +(following Gregorian calendar). + +see: [`isLeapYear()`](#isLeapYear), [`totalDaysInMonth()`](#totalDaysInMonth) + +```js +totalDaysInYear(2008); // 366 (leap year) +totalDaysInYear(2009); // 365 + +// you can also pass a Date object as single argument +totalDaysInYear( new Date(2013, 0, 1) ); // 365 +``` + + + +## weekOfTheYear(date, [firstDayOfWeek]):Number + +Returns how many weeks elapsed since start of the year (`0..53`). + +`firstDayOfWeek` can be `0` (Sunday) or `1` (Monday). By default weeks start at +Sunday. + +It will return `0` if `date` is before the first `firstDayOfWeek` of the year. + +```js +// Tue Jan 01 2013 +weekOfTheYear( new Date(2013,0,1) ); // 0 +// Wed Jan 09 2013 +weekOfTheYear( new Date(2013,0,9) ); // 1 +// Sun Jan 01 2012 +weekOfTheYear( new Date(2012,0,1) ); // 1 +// Mon Jan 09 2012 +weekOfTheYear( new Date(2012,0,9) ); // 2 +``` + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/function.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/function.md new file mode 100644 index 00000000..2695a025 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/function.md @@ -0,0 +1,174 @@ +# function # + +Function*(al)* utilities. + + + +## bind(fn, context, [...args]):Function + +Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + +### Arguments + + 1. `fn` (Function) : Target Function + 2. `context` (Object) : Execution context (object used as `this`) + 3. `[...args]` (*) : Arguments (0...n arguments) + +See: [`partial()`](#partial), [object/bindAll](./object.html#bindAll) + + + +## compose(...fn):Function + +Returns the composition of a list of functions, where each function consumes +the return value of the function that follows. In math terms, composing the +functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + +```js +function add2(x) { return x + 2 } +function multi2(x) { return x * 2 } +map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] + +//same as +map([1, 2, 3], function(x){ + return add2( multi2(x) ); +}); +``` + + + +## debounce(fn, delay[, isAsap]):Function + +Creates a function that will delay the execution of `fn` until after `delay` +milliseconds have elapsed since the last time it was invoked. + +Subsequent calls to the debounced function will return the result of the last +`fn` call. + +```js +// sometimes less is more +var lazyRedraw = debounce(redraw, 300); +foo.on.resize.add(lazyRedraw); +``` + +In this visualization, `|` is a debounced-function call and `X` is the actual +callback execution: + + Default + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X + + Debounced with `isAsap == true`: + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X + +See: [`throttle()`](#throttle) + + +## func(name):Function + +Returns a function that calls a method with given `name` on supplied object. +Useful for iteration methods like `array/map` and `array/forEach`. + +See: [`prop()`](#prop) + +```js +// will call the method `getName()` for each `user` +var names = map(users, func('getName')); +``` + + + +## partial(fn, [...args]):Function + +Return a partially applied function supplying default arguments. + +This method is similar to [`bind`](#bind), except it does not alter the this +binding. + +### Arguments + + 1. `fn` (Function) : Target Function + 3. `[...args]` (*) : Arguments (0...n arguments) + +See: [`bind()`](#bind) + +```js +function add(a, b){ return a + b } +var add10 = partial(add, 10); +console.log( add10(2) ); // 12 +``` + + + +## prop(name):Function + +Returns a function that gets a property with given `name` from supplied object. +Useful for using in conjunction with `array/map` and/or for creating getters. + +See: [`array/pluck()`](array.html#pluck) + +```js +var users = [{name:"John", age:21}, {name:"Jane", age:25}]; +// ["John", "Jane"] +var names = map(users, prop('name')); +``` + + + +## series(...fn):Function + +Returns a function that will execute all the supplied functions in order and +passing the same parameters to all of them. Useful for combining multiple +`array/forEach` into a single one and/or for debugging. + + +```js +// call `console.log()` and `doStuff()` for each item item in the array +forEach(arr, series(console.log, doStuff)); +``` + + + +## throttle(fn, interval):Function + +Creates a function that, when executed, will only call the `fn` function at +most once per every `interval` milliseconds. + +If the throttled function is invoked more than once during the wait timeout, +`fn` will also be called on the trailing edge of the timeout. + +Subsequent calls to the throttled function will return the result of the last +`fn` call. + +```js +// sometimes less is more +var lazyRedraw = throttle(redraw, 300); +foo.on.resize.add(lazyRedraw); +``` + +In this visualization, `|` is a throttled-function call and `X` is the actual +`fn` execution: + + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X X X X X X X X X X X + +See: [`debounce()`](#debounce) + + +## timeout(fn, millis, context, [...args]):Number + +Functions as a wrapper for `setTimeout`. Calls a the function `fn` after a given delay `millis` in milliseconds. +The function is called within the specified context. The return value can be used to clear the timeout using `clearTimeout`. + +```js +var id = timeout(doStuff, 300, this); + +clearTimeout(id); +``` + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/lang.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/lang.md new file mode 100644 index 00000000..56d7879b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/lang.md @@ -0,0 +1,385 @@ +# lang # + +Language Utilities. Easier inheritance, scope handling, type checks. + + + +## clone(val):* + +Clone native types like Object, Array, RegExp, Date and primitives. + +This method will not clone values that are referenced within `val`. It will +only copy the value reference to the new value. If the value is not a plain +object but is an object, it will return the value unchanged. + +### Example + +```js +var a = { foo: 'bar' }; +var b = clone(a); +console.log(a === b); // false +console.log(a.foo === b.foo); // true + +var c = [1, 2, 3]; +var d = clone(b); +console.log(c === d); // false +console.log(c); // [1, 2, 3] +``` + +See: [`deepClone()`](#deepClone) + + + +## createObject(parent, [props]):Object + +Create Object using prototypal inheritance and setting custom properties. + +Mix between [Douglas Crockford Prototypal Inheritance](http://javascript.crockford.com/prototypal.html) and the EcmaScript 5 `Object.create()` method. + +### Arguments + + 1. `parent` (Object) : Parent Object + 2. `[props]` (Object) : Object properties + +### Example + +```js +var base = { + trace : function(){ + console.log(this.name); + } +}; + +var myObj = createObject(base, { + name : 'Lorem Ipsum' +}); + +myObject.trace(); // "Lorem Ipsum" +``` + + + +## ctorApply(constructor, args):Object + +Do `Function.prototype.apply()` on a constructor while maintaining prototype +chain. + +```js +function Person(name, surname) { + this.name = name; + this.surname = surname; +} + +Person.prototype.walk = function(){ + console.log(this.name +' is walking'); +}; + +var args = ['John', 'Doe']; + +// "similar" effect as calling `new Person("John", "Doe")` +var john = ctorApply(Person, args); +john.walk(); // "John is walking" +``` + + + +## deepClone(val, [instanceClone]):* + +Deep clone native types like Object, Array, RegExp, Date and primitives. + +The `instanceClone` function will be invoked to clone objects that are not +"plain" objects (as defined by [`isPlainObject`](#isPlainObject)) if it is +provided. If `instanceClone` is not specified, it will not attempt to clone +non-plain objects, and will copy the object reference. + +### Example + +```js +var a = {foo:'bar', obj: {a:1, b:2}}; +var b = deepClone(a); // {foo:'bar', obj: {a:1, b:2}} +console.log( a === b ); // false +console.log( a.obj === b.obj ); // false + +var c = [1, 2, [3, 4]]; +var d = deepClone(c); // [1, 2, [3, 4]] +var e = c.concat(); // [1, 2, [3, 4]] + +console.log( c[2] === d[2] ); // false +// concat doesn't do a deep clone, arrays are passed by reference +console.log( e[2] === d[2] ); // true + +function Custom() { } +function cloneCustom(x) { return new Custom(); } +var f = { test: new Custom() }; +var g = deepClone(f, cloneCustom); +g.test === f.test // false, since new Custom instance will be created +``` + +See: [`clone()`](#clone) + + + +## defaults(val, ...defaults):void + +Return first value that isn't `null` or `undefined`. + + function doSomethingAwesome(foo, bar) { + // default arguments + foo = defaults(foo, 'lorem'); + bar = defaults(bar, 123); + // ... + } + + + +## inheritPrototype(child, parent):void + +Inherit prototype from another Object. + +```js +function Foo(name){ + this.name = name; +} +Foo.prototype = { + getName : function(){ + return this.name; + } +}; + +function Bar(name){ + this.name = name; +} +//should be called before calling constructor +inheritPrototype(Bar, Foo); + +var myObj = new Bar('lorem ipsum'); +myObj.getName(); // "lorem ipsum" +``` + + +## is(x, y):Boolean + +Check if both values are identical/egal. + +```js +// wtfjs +NaN === NaN; // false +-0 === +0; // true + +is(NaN, NaN); // true +is(-0, +0); // false +is('a', 'b'); // false +``` + +See: [`isnt()`](#isnt) + + + +## isnt(x, y):Boolean + +Check if both values are not identical/egal. + +```js +// wtfjs +NaN === NaN; // false +-0 === +0; // true + +isnt(NaN, NaN); // false +isnt(-0, +0); // true +isnt('a', 'b'); // true +``` + +See: [`is()`](#is) + + + + +## isArguments(val):Boolean + +If value is an "Arguments" object. + + + +## isArray(val):Boolean + +If value is an Array. Uses native ES5 `Array.isArray()` if available. + + + +## isBoolean(val):Boolean + +If value is a Boolean. + + + +## isDate(val):Boolean + +If value is a Date. + + + +## isEmpty(val):Boolean + +Checks if Array/Object/String is empty. + + +```js +isEmpty(''); // true +isEmpty('bar'); // false +isEmpty([]); // true +isEmpty([1, 2]); // false +isEmpty({}); // true +isEmpty({a:1, b:2}); // false +``` + + +## isFinite(val):Boolean + +Checks if value is Finite. + +Note: This is not the same as native `isFinite`, which will return `true` for +booleans and empty strings. See http://es5.github.com/#x15.1.2.5. + + + +## isFunction(val):Boolean + +If value is a Function. + + + +## isKind(val, kind):Boolean + +If value is of "kind". (used internally by some of the *isSomething* checks). + +Favor the other methods since strings are commonly mistyped and also because +some "kinds" can only be accurately checked by using other methods (e.g. +`Arguments`), some of the other checks are also faster. + +```js +isKind([1,2], 'Array'); // true +isKind(3, 'Array'); // false +isKind(3, 'Number'); // true +``` + +See: [`kindOf()`](#kindOf) + + + +## isInteger(val):Boolean + +Check if value is an integer. + +```js +isInteger(123); // true +isInteger(123.45); // false +isInteger({}); // false +isInteger('foo'); // false +isInteger('123'); // false +``` + + + +## isNaN(val):Boolean + +Check if value is `NaN`. + +Note: This is not the same as native `isNaN`, which will return `true` for +`undefined` and other values. See [ES5 isNaN](http://es5.github.com/#x15.1.2.4) + + + +## isNull(val):Boolean + +If value is `null`. + + + +## isNumber(val):Boolean + +If value is a Number. + + + +## isObject(val):Boolean + +If value is an Object. + + + +## isPlainObject(val):Boolean + +If the value is an Object created by the Object constructor. + + + +## isRegExp(val):Boolean + +If value is a RegExp. + + + +## isString(val):Boolean + +If value is a String. + + + +## isUndefined(val):Boolean + +If value is `undefined`. + + + +## kindOf(val):String + +Gets kind of value (e.g. "String", "Number", "RegExp", "Null", "Date"). +Used internally by `isKind()` and most of the other *isSomething* checks. + +```js +kindOf([1,2]); // "Array" +kindOf('foo'); // "String" +kindOf(3); // "Number" +``` + +See: [`isKind()`](#isKind) + + +## toArray(val):Array + +Convert array-like object into Array or wrap value into Array. + +```js +toArray({ + "0" : "foo", + "1" : "bar", + "length" : 2 +}); // ["foo", "bar"] + +function foo(){ + return toArray(arguments); +} +foo("lorem", 123); // ["lorem", 123] + +toArray("lorem ipsum"); // ["lorem ipsum"] +toArray(window); // [window] +toArray({foo:"bar", lorem:123}); // [{foo:"bar", lorem:123}] +``` + +See: object/values() + + + +## toString(val):String + +Convert any value to its string representation. + +Will return an empty string for `undefined` or `null`, otherwise will convert +the value to its string representation. + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/math.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/math.md new file mode 100644 index 00000000..f45be3ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/math.md @@ -0,0 +1,298 @@ +# math # + +Math utilities. + + +## ceil(val[, step]):Number + +Round value up to full steps. Similar to `Math.ceil()` but can round value +to an arbitrary *radix*. + + ceil(7.2); // 8 + ceil(7.8); // 8 + ceil(7, 5); // 10 + ceil(11, 5); // 15 + ceil(15, 5); // 15 + +### Common use cases + +Round values by increments of 5/10/1000/etc. + +See: [`round()`](#round), [`floor()`](#floor), [`countSteps()`](#countSteps) + + + +## clamp(val, min, max):Number + +Clamps value inside range. + +`clamp()` is extremely useful in cases where you need to limit a value inside +a certain range. So instead of doing a complex `if/else` to filter/process the +value you can restrict it to always be inside the desired range: + + clamp(-5, 0, 10); // 0 + clamp(7, 1, 10); // 7 + clamp(8, 1, 10); // 8 + clamp(10, 1, 10); // 10 + clamp(11, 1, 10); // 10 + +If the value is smaller than `min` it returns the `min`, if `val` is higher +than `max` it returns `max`. + +### Common use cases + +Any situation where you need to limit a number inside a range like: slider +position, image galleries (so user can't skip to an image that doesn't +exist), drag and drop, scroll boundaries, etc. + +See: [`loop()`](#loop) + + + + +## countSteps(val, step[, overflow]):Number + +Count number of full steps. + +### Arguments: + + 1. `val` (Number) : Value. + 2. `step` (Number) : Step size. + 3. `[overflow]` (Number) : Maximum number of steps, nSteps will loop if +`>=` than overflow. + + +Count steps is very useful for cases where you need to know how many "full +steps" the number *completed*. Think of it as a division that only returns +integers and ignore remainders. + + countSteps(3, 5); // 0 + countSteps(6, 5); // 1 + countSteps(12, 5); // 2 + countSteps(18, 5); // 3 + countSteps(21, 5); // 4 + +You can also set an `overflow` which will reset the *counter* before reaching +this number. + + countSteps(3, 5, 3); // 0 + countSteps(6, 5, 3); // 1 + countSteps(12, 5, 3); // 2 + countSteps(18, 5, 3); // 0 + countSteps(21, 5, 3); // 1 + +### Common use cases + +#### How many items fit inside an area: + + var containerWidth = 100; + var itemWidth = 8; + var howManyFit = countSteps(containerWidth, itemWidth); // 12 + +#### Split value into different scales or convert value from one scale to another + +From [mout/time/parseMs](time.html#parseMs): + + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + // {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} + parseMs(2348765454); + + + +## floor(val[, step]):Number + +Round value down to full steps. Similar to `Math.floor()` but can round value +to an arbitrary *radix*. (formerly `snap`) + + floor(7.2); // 7 + floor(7.8); // 7 + floor(7, 5); // 5 + floor(11, 5); // 10 + floor(15, 5); // 15 + +### Common use cases + +Round values by increments of 5/10/1000/etc. + +See: [`round()`](#round), [`ceil()`](#ceil), [`countSteps()`](#countSteps) + + + +## inRange(val, min, max[, threshold]):Boolean + +Checks if value is inside the range. + + inRange(-6, 1, 10); // false + inRange( 5, 1, 10); // true + inRange(12, 1, 10); // false + +The threshold can be useful when you want granular control of what should match +and/or the precision could change at runtime or by some configuration option, +avoids the clutter of adding/subtracting the `threshold` from `mix` and `max`. + + inRange(12, 1, 10, 2); // true + inRange(13, 1, 10, 2); // false + +### Common use cases + +Anything that needs to check if value is inside a range, be it collision +detection, limiting interaction by mouse position, ignoring parts of the logic +that shouldn't happen if value isn't valid, simplify `if/else` conditions, +making code more readable, etc... + + + + +## isNear(val, target, threshold):Boolean + +Check if value is close to target. + +Similar to `inRange()` but used to check if value is close to a certain value +or match the desired value. Basically to simplify `if/else` conditions and to +make code clearer. + + isNear( 10.2, 10, 0.5); // true + isNear( 10.5, 10, 0.5); // true + isNear(10.51, 10, 0.5); // false + +### Common use cases + +Games where a certain action should happen if an *actor* is close to a target, +gravity fields, any numeric check that has some tolerance. + + + + +## lerp(ratio, start, end):Number + +Linear interpolation. + + lerp(0.5, 0, 10); // 5 + lerp(0.75, 0, 10); // 7.5 + +### Common use cases + +Linear interpolation is commonly used to create animations of elements moving +from one point to another, where you simply update the current ratio (which in +this case represents time) and get back the position of the element at that +"frame". + +The core idea of `lerp` is that you are using a number that goes from `0` to +`1` to specify a ratio inside that scale. This concept can be applied to +convert numbers from different scales easily. + +See: [`map()`](#map), [`norm()`](#norm) + + + + +## loop(val, min, max):Number + +Loops value inside range. Will return `min` if `val > max` and `max` if `val +< min`, otherwise it returns `val`. + + loop(-1, 0, 10); // 10 + loop( 1, 0, 10); // 1 + loop( 5, 0, 10); // 5 + loop( 9, 0, 10); // 9 + loop(10, 0, 10); // 10 + loop(11, 0, 10); // 0 + +Similar to [`clamp()`](#clamp) but *loops* the value inside the range when an +overflow occurs. + +### Common use cases + +Image galleries, infinite scroll, any kind of logic that requires that the +first item should be displayed after the last one or the last one should be +displayed after first if going on the opposite direction. + +See: [`clamp()`](#clamp) + + + + +## map(val, min1, max1, min2, max2):Number + +Maps a number from one scale to another. + + map(3, 0, 4, -1, 1) // 0.5 + map(3, 0, 10, 0, 100) // 30 + +### Common use cases + +Very useful to convert values from/to multiple scales. + +Let's suppose we have a slider that needs to go from `2000` to `5000` and that slider +has `300px` of width, here is how we would translate the knob position into the +current value: + + var knobX = 123; + var sliderWid = 300; + var minVal = 2000; + var maxVal = 5000; + + var curVal = map(knobX, 0, sliderWid, minVal, maxVal); // 3230 + +See: [`lerp()`](#lerp), [`norm()`](#norm) + + + + +## norm(val, min, max):Number + +Gets normalized ratio of value inside range. + + norm(50, 0, 100); // 0.5 + norm(75, 0, 100); // 0.75 + +### Common use cases + +Convert values between scales, used by [`map()`](#map) internally. Direct +opposite of [`lerp()`](#lerp). + +See: [`lerp()`](#lerp), [`map()`](#map) + + + +## round(val[, step]):Number + +Round value to full steps. Similar to `Math.round()` but allow setting an +arbitrary *radix*. + + // default + round(0.22); // 0 + round(0.49); // 0 + round(0.51); // 1 + + // custom radix + round(0.22, 0.5); // 0 + round(0.49, 0.5); // 0.5 + round(0.51, 0.5); // 0.5 + round(0.74, 0.5); // 0.5 + round(0.75, 0.5); // 1 + round(1.24, 0.5); // 1 + round(1.25, 0.5); // 1.5 + round(1.74, 0.5); // 1.5 + +### Common use cases + +Round values by increments of 0.5/5/10/1000/etc. + +See: [`floor()`](#floor), [`ceil()`](#ceil), [`countSteps()`](#countSteps) + + + +------------------------------------------------------------------------------- + +For more usage more info check the specs and source code. + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/number.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/number.md new file mode 100644 index 00000000..8d93865b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/number.md @@ -0,0 +1,225 @@ +# number # + +Number utilities. + + +## abbreviate(val[, nDecimalDigits, dictionary]):String + +Abbreviate number to thousands (K), millions (M) or billions (B). + +The default value for `nDecimalDigits` is `1`. + +### Example + + abbreviate(123456); // "123.5K" + abbreviate(12345678); // "12.3M" + abbreviate(1234567890); // "1.2B" + +You can set the amount of decimal digits (default is `1`): + + abbreviate(543); // "0.5K" + abbreviate(543, 1); // "0.5K" + abbreviate(543, 2); // "0.54K" + abbreviate(543, 3); // "0.543K" + +You can customize the abbreviation by passing a custom "dictionary": + + var _ptbrDict = { + thousands : ' mil', + millions : ' Mi', + billions : ' Bi' + }; + function customAbbr(val) { + return abbreviate(val, 1, _ptbrDict); + } + + customAbbr(123456); // "123.5 mil" + customAbbr(12345678); // "12.3 Mi" + customAbbr(1234567890); // "1.2 Bi" + + + +## currencyFormat(val[, nDecimalDigits, decimalSeparator, thousandsSeparator]):String + +Format a number as currency. + +### Example: + + currencyFormat(1000); // "1,000.00" + currencyFormat(1000, 1); // "1,000.0" + currencyFormat(1000, 2, ',', '.'); // "1.000,00" + + + +## enforcePrecision(val, nDecimalDigits):Number + +Enforce a specific amount of decimal digits and also fix floating point +rounding issues. + +### Example: + +```js +enforcePrecision(0.615, 2); // 0.62 +enforcePrecision(0.625, 2); // 0.63 +//floating point rounding "error" (rounds to odd number) ++(0.615).toFixed(2); // 0.61 ++(0.625).toFixed(2); // 0.63 +``` + + + +## MAX_INT:Number + +Maximum 32-bit signed integer value. `Math.pow(2, 31) - 1` + +### Example: + +```js +console.log( MAX_INT ); // 2147483647 +``` + + +## MAX_UINT:Number + +Maximum 32-bit unsigned integer value. `Math.pow(2, 32) - 1` + +### Example: + +```js +console.log( MAX_UINT ); // 4294967295 +``` + + +## MIN_INT:Number + +Minimum 32-bit signed integer value. `Math.pow(2, 31) * -1`. + +### Example: + +```js +console.log( MIN_INT ); // -2147483648 +``` + + +## pad(n, minLength[, char]):String + +Add padding zeros if `n.length` < `minLength`. + +### Example: + +```js +pad(1, 5); // "00001" +pad(12, 5); // "00012" +pad(123, 5); // "00123" +pad(1234, 5); // "01234" +pad(12345, 5); // "12345" +pad(123456, 5); // "123456" + +// you can also specify the "char" used for padding +pad(12, 5, '_'); // "___12" +``` + +see: [string/lpad](./string.html#lpad) + + + +## rol(val, shift):Number + +Bitwise circular shift left. + +More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) + + + +## ror(val, shift):Number + +Bitwise circular shift right. + +More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) + + + +## sign(val):Number + +Returns `-1` if value is negative, `0` if the value is `0` and `1` if value is positive. Useful for +multiplications. + +```js +sign(-123); // -1 +sign(123); // 1 +sign(0); // 0 +``` + + + +## toInt(val):Number + +"Convert" value into an 32-bit integer. Works like `Math.floor` if `val > 0` and +`Math.ceil` if `val < 0`. + +**IMPORTANT:** val will wrap at [number/MIN_INT](#MIN_INT) and +[number/MAX_INT](#MAX_INT). + +Created because most people don't know bitwise operations and also because this +feature is commonly needed. + +[Perf tests](http://jsperf.com/vs-vs-parseint-bitwise-operators/7) + +### Example: + +```js +toInt(1.25); // 1 +toInt(0.75); // 0 +toInt(-0.55); // 0 +toInt(-5.0001) // -5 +``` + + + +## toUInt(val):Number + +"Convert" value into an 32-bit unsigned integer. + +Works like AS3#uint(). + +**IMPORTANT:** val will wrap at 2^32. + +### Example: + +```js +toUInt(1.25); // 1 +toUInt(0.75); // 0 +toUInt(-0.55); // 0 +toUInt(-5.0001); // 4294967291 +toUInt(Math.pow(2,32) - 0.5); // 4294967295 +toUInt(Math.pow(2,32) + 0.5); // 0 +``` + + +## toUInt31(val):Number + +"Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + +Useful since all bitwise operators besides `>>>` treat numbers as signed +integers. + +**IMPORTANT:** val will wrap at 2^31 and negative numbers will be treated as +`zero`. + +### Example: + +```js +toUInt31(1.25); // 1 +toUInt31(0.75); // 0 +toUInt31(-0.55); // 0 +toUInt31(-5.0001); // 0 +toUInt31(Math.pow(2,31) - 0.5); // 21474836470 +toUInt31(Math.pow(2,31) + 0.5); // 0 +``` + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/object.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/object.md new file mode 100644 index 00000000..b4d5e483 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/object.md @@ -0,0 +1,780 @@ +# object # + +Object utilities. + + + +## bindAll(obj, [...methodNames]):void + +Bind methods of the target object to always execute on its own context +(ovewritting the original function). + +See: [function/bind](./function.html#bind) + +```js +var view = { + name: 'Lorem Ipsum', + logNameOnClick: function() { + console.log(this.name); + } +}; + +// binds all methods by default +bindAll(view); +jQuery('#docs').on('click', view.logNameOnClick); +``` + +You can also specify the list of methods that you want to bind (in case you +just want to bind a few of them). + +```js +// only the listed methods will be bound to `obj` context +bindAll(obj, 'logNameOnClick', 'doAwesomeStuffOnDrag'); +``` + + + +## contains(obj, value):Boolean + +Similar to [Array/contains](array.html#contains). Checks if Object contains +value. + +```js +var obj = { + a: 1, + b: 2, + c: 'bar' +}; +contains(obj, 2); // true +contains(obj, 'foo'); // false +``` + + + +## deepEquals(a, b, [callback]):Boolean + +Recursively tests whether two objects contain the same keys and equal values. + +`callback` specifies the equality comparison function used to compare +non-object values. It defaults to using the strict equals (`===`) operator. + +If the values are both an object, it will recurse into the objects, checking if +their keys/values are equal. It will only check the keys and values contained +by the objects; it will not check the objects' prototypes. If the either of +the values are not objects, they will be checked using the `callback` function. + +Example: + +```js +deepEquals({ a: 1 }, { a: 1 }); // true +deepEquals({ value: { a: 1 } }, { value: { a: 1 } }); // true +deepEquals({ value: { a: 1 } }, { value: { a: 2 } }); // false +deepEquals({ value: { a: 1 } }, { value: { a: 1, b: 2 } }); // false +deepEquals({}, null); // false +deepEquals(null, null); // true +deepEquals( + { a: { b: 1 } }, + { a: { b: '1' } }, + function(a, b) { return a == b; }); // true +``` + +See: [`equals()`](#equals) + + + +## deepFillIn(target, ...objects):Object + +Fill missing properties recursively. + +It's different from `deepMixIn` since it won't override any existing property. +It's also different from `merge` since it won't clone child objects during the +process. + +It returns the target object and mutates it in place. + +See: [`fillIn()`](#fillIn), [`deepMixIn()`](#deepMixIn), [`merge()`](#merge) + +```js +var base = { + foo : { + bar : 123 + }, + lorem : 'ipsum' +}; +var options = deepFillIn({foo : { baz : 45 }, lorem : 'amet'}, base); +// > {foo: {bar:123, baz : 45}, lorem : 'amet'} +``` + + + +## deepMatches(target, pattern):Boolean + +Recursively checks if object contains all properties/value pairs. When both +the target and pattern values are arrays, it checks that the target value +contain matches for all the items in the pattern array (independent of order). + +```js +var john = { + name: 'John', + age: 22, + pets: [ + { type: 'cat', name: 'Grumpy Cat' }, + { type: 'dog', name: 'Hawk' } + ] +}; + +deepMatches(john, { name: 'John' }); // true +deepMatches(john, { age: 21 }); // false +deepMatches(john, { pets: [ { type: 'cat' } ] }); // true +deepMatches(john, { pets: [ { name: 'Hawk' } ] }); // true +deepMatches(john, { pets: [ { name: 'Hairball' } ] }); // false +``` + +See [`matches()`](#matches) + + + +## deepMixIn(target, ...objects):Object + +Mixes objects into the target object, recursively mixing existing child objects +as well. + +It will only recursively mix objects if both (existing and new) values are +plain objects. + +Returns the target object. Like [`merge()`](#merge), but mutates the target +object, and does not clone child objects. + +```js +var target = { + foo: { + name: "foo", + id: 1 + } +}; + +deepMixIn(target, { foo: { id: 2 } }); +console.log(target); // { foo: { name: "foo", id: 2 } } +``` + +See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) + + + +## equals(a, b, [callback]):Boolean + +Tests whether two objects contain the same keys and values. + +`callback` specifies the equality comparison function used to compare the +values. It defaults to using the strict equals (`===`) operator. + +It will only check the keys and values contained by the objects; it will not +check the objects' prototypes. If either of the values are not objects, they +will be compared using the `callback` function. + +```js +equals({}, {}); // true +equals({ a: 1 }, { a: 1 }); // true +equals({ a: 1 }, { a: 2 }); // false +equals({ a: 1, b: 2 }, { a: 1 }); // false +equals({ a: 1 }, { a: 1, b: 2 }); // false +equals(null, null); // true +equals(null, {}); // false +equals({ a: 1 }, { a: '1' }, function(a, b) { return a == b; }); // true +``` + + + +## every(obj, callback, [thisObj]):Boolean + +Similar to [Array/every](array.html#every). Tests whether all properties in the +object pass the test implemented by the provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +every(obj, isNumber); // false +``` + + + +## fillIn(obj, ...default):Object + +Fill in missing properties in object with values from the *defaults* objects. + + var base = { + foo : 'bar', + num : 123 + }; + + fillIn({foo:'ipsum'}, base); // {foo:'ipsum', num:123} + +PS: it allows merging multiple objects at once, the first ones will take +precedence. + +See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) + + + +## filter(obj, callback, [thisObj]) + +Returns a new object containing all properties where `callback` returns true, +similar to Array/filter. It does not use properties from the object's +prototype. + +Callback receives the same arguments as `forOwn()`. + +See: [`forOwn()`](#forOwn), [`forIn()`](#forIn), [`pick()`](#pick) + +```js +var obj = { + foo: 'value', + bar: 'bar value' +}; + +// returns { bar: 'bar value' } +filter(obj, function(v) { return value.length > 5; }); + +// returns { foo: 'value' } +filter(obj, function(v, k) { return k === 'foo'; }); +``` + + + +## find(obj, callback, [thisObj]) + +Loops through all the properties in the Object and returns the first one that +passes a truth test (callback), similar to [Array/find](array.html#find). +Unlike Array/find, order of iteration is not guaranteed. + +```js +var obj = { + a: 'foo', + b: 12 +}; + +find(obj, isString); // 'foo' +find(obj, isNumber); // 12 +``` + + + +## forIn(obj, callback[, thisObj]) + +Iterate over all properties of an Object, similar to +[Array/forEach](array.html#forEach). + +It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). +It **will** iterate over inherited (enumerable) properties from the prototype. + +It allows exiting the iteration early by returning `false` on the callback. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys), [`values()`](#values) + +### Callback arguments + +Callback will receive the following arguments: + + 1. Property Value (*) + 2. Key name (String) + 3. Target object (Object) + +### Example + +```js +function Foo(){ + this.foo = 1; + this.bar = 2; +} + +Foo.prototype.lorem = 4; + +var obj = new Foo(); + +var result = 0; +var keys = []; + +forIn(obj, function(val, key, o){ + result += val; + keys.push(key); +}); + +console.log(result); // 7 +console.log(keys); // ['foo', 'bar', 'lorem'] +``` + + + +## forOwn(obj, callback[, thisObj]) + +Iterate over all own properties from an Object, similar to +[Array/forEach](array.html#forEach). + +It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). +Notice that it **won't** iterate over properties from the prototype. + +It allows exiting the iteration early by returning `false` on the callback. + +See: [`forIn()`](#forIn), [`keys()`](#keys), [`values()`](#values) + +### Callback arguments + +Callback will receive the following arguments: + + 1. Property Value (*) + 2. Key name (String) + 3. Target object (Object) + +### Example + +```js +function Foo(){ + this.foo = 1; + this.bar = 2; +} + +// will be ignored +Foo.prototype.lorem = 4; + +var obj = new Foo(); + +var result = 0; +var keys = []; + +forOwn(obj, function(val, key, o){ + result += val; + keys.push(key); +}); + +console.log(result); // 3 +console.log(keys); // ['foo', 'bar'] +``` + + + +## functions(obj):Array + +Returns a sorted list of all enumerable properties that have function values +(including inherited properties). + +```js +var obj = { + foo : function(){}, + bar : 'baz' +}; +functions(obj); // ['foo'] +``` + + + +## get(obj, propName):* + +Returns nested property value. Will return `undefined` if property doesn't +exist. + +See: [`set()`](#set), [`namespace()`](#namespace), [`has()`](#has) + +```js +var lorem = { + ipsum : { + dolor : { + sit : 'amet' + } + } + }; + +get(lorem, 'ipsum.dolor.sit'); // "amet" +get(lorem, 'foo.bar'); // undefined +``` + + + +## has(obj, propName):Boolean + +Checks if object contains a child property. Useful for cases where you need to +check if an object contain a *nested* property. It will get properties +inherited by the prototype. + +see: [`hasOwn()`](#hasOwn), [`get()`](#get) + +```js +var a = { + b : { + c : 123 + } + }; + +has(a, 'b.c'); // true +has(a, 'foo.c'); // false +``` + +### Common use case + +```js +if( has(a, 'foo.c') ){ // false + // ... +} + +if( a.foo.c ){ // ReferenceError: `foo` is not defined + // ... +} +``` + + + +## hasOwn(obj, propName):Boolean + +Safer `Object.hasOwnProperty`. Returns a boolean indicating whether the object +has the specified property. + +see: [`has()`](#has) + +```js +var obj = { + foo: 1, + hasOwnProperty : 'bar' +}; + +obj.hasOwnProperty('foo'); // ERROR! hasOwnProperty is not a function + +hasOwn(obj, 'foo'); // true +hasOwn(obj, 'hasOwnProperty'); // true +hasOwn(obj, 'toString'); // false +``` + + + +## keys(obj):Array + +Returns an array of all own enumerable properties found upon a given object. +It will use the native `Object.keys` if present. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`values()`](#values) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +keys(obj); // ['foo', 'bar', 'lorem'] +``` + + + +## map(obj, callback, [thisObj]):Object + +Returns a new object where the property values are the result of calling the +callback for each property in the original object, similar to Array/map. + +The callback function receives the same arguments as in `forOwn()`. + +See: [`forOwn()`](#forOwn) + +```js +var obj = { foo: 1, bar: 2 }, + data = { foo: 0, bar: 1 }; + +map(obj, function(v) { return v + 1; }); // { foo: 2, bar: 3 } +map(obj, function(v, k) { return k; }); // { foo: "foo", bar: "bar" } +map(obj, function(v, k) { return this[k]; }, data); // { foo: 0, bar: 1 } +``` + + + +## matches(obj, props):Boolean + +Checks if object contains all properties/values pairs. Useful for validation +and filtering. + +```js +var john = {age:25, hair:'long', beard:true}; +var mark = {age:27, hair:'short', beard:false}; +var hippie = {hair:'long', beard:true}; +matches(john, hippie); // true +matches(mark, hippie); // false +``` + +See [`deepMatches()`](#deepMatches) + + + +## merge(...objects):Object + +Deep merges objects. Note that objects and properties will be cloned during the +process to avoid undesired side effects. It return a new object and won't +affect source objects. + +```js +var obj1 = {a: {b: 1, c: 1, d: {e: 1, f: 1}}}; +var obj2 = {a: {b: 2, d : {f : 'yeah'} }}; + +merge(obj1, obj2); // {a: {b : 2, c : 1, d : {e : 1, f : 'yeah'}}} +``` + +See: [`deepMixIn()`](#deppMixIn), [`deepFillIn()`](#deepFillIn) + + + +## max(obj[, iterator]):* + +Returns maximum value inside object or use a custom iterator to define how +items should be compared. Similar to [Array/max](array.html#max). + +See: [`min()`](#min) + +```js +max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 +max({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'lorem' +``` + + + +## min(obj[, iterator]):* + +Returns minimum value inside object or use a custom iterator to define how +items should be compared. Similar to [Array/min](array.html#min). + +See: [`max()`](#max) + +```js +min({a: 100, b: 2, c: 1, d: 3, e: 200}); // 1 +min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'foo' +``` + + + +## mixIn(target, ...objects):Object + +Combine properties from all the objects into first one. + +This method affects target object in place, if you want to create a new Object +pass an empty object as first parameter. + +### Arguments + + 1. `target` (Object) : Target Object. + 2. `...objects` (...Object) : Objects to be combined (0...n objects). + +### Example + +```js +var a = {foo: "bar"}; +var b = {lorem: 123}; + +mixIn({}, a, b); // {foo: "bar", lorem: 123} +console.log(a); // {foo: "bar"} + +mixIn(a, b); // {foo: "bar", lorem: 123} +console.log(a); // {foo: "bar", lorem: 123} +``` + +See: [`fillIn()`](#fillIn), [`merge()`](#merge) + + + + +## namespace(obj, propName):Object + +Creates an empty object inside namespace if not existent. Will return created +object or existing object. + +See: [`get()`](#get), [`set()`](#set) + +```js +var obj = {}; +namespace(obj, 'foo.bar'); // {} +console.log(obj); // {foo:{bar:{}}} +``` + + + +## pick(obj, ...keys):Object + +Return a copy of the object that contains only the whitelisted keys. + +See: [`filter()`](#filter) + +```js +var user = { + firstName : 'John', + lastName : 'Doe', + dob : '1985/07/23', + gender : 'male' +}; + +// can pass an array of keys as second argument +var keys = ['firstName', 'dob'] +pick(user, keys); // {firstName:"John", dob: "1985/07/23"} + +// or multiple arguments +pick(user, 'firstName', 'lastName'); // {firstName:"John", lastName: "Doe"} +``` + + + +## pluck(obj, propName):Object + +Extract an object containing property values with keys as they appear in the +passed object. + +```js +var users = { + first: { + name : 'John', + age : 21 + }, + second: { + name : 'Mary', + age : 25 + } +}; + +pluck(users, 'name'); // {first: 'John', second: 'Mary'} ); +pluck(users, 'age'); // {first: 21, second: 25} ); +``` + + + +## reduce(obj, callback, initial, [thisObj]):* + +Similar to [Array/reduce](array.html#reduce). + +Apply a function against an accumulator and each property of the object (order +is undefined) as to reduce it to a single value. + +```js +var obj = {a: 1, b: 2, c: 3, d: 4}; + +function sum(prev, cur, key, list) { + compare1.push(prev); + return prev + cur; +} + +reduce(obj, sum); // 10 +``` + + + +## reject(obj, callback, thisObj):Object + +Returns a new object containing all properties where `callback` returns true, +similar to [Array/reject](array.html#reject). It does not use properties from +the object's prototype. Opposite of [`filter()`](#filter). + +See [`filter()`](#filter) + +### Example + +```js +var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; +reject(obj, function(x) { return (x % 2) !== 0; }); // {b: 2, d: 4} +``` + + + +## values(obj):Array + +Returns an array of all own enumerable properties values found upon a given object. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +values(obj); // [1, 2, 3] +``` + + + +## set(obj, propName, value) + +Sets a nested property value. + +See: [`get()`](#get), [`namespace()`](#namespace) + +```js +var obj = {}; +set(obj, 'foo.bar', 123); +console.log(obj.foo.bar); // 123 +console.log(obj); // {foo:{bar:123}} +``` + + + +## size(obj):Number + +Returns the count of own enumerable properties found upon a given object. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +size(obj); // 3 +``` + + + +## some(obj, callback, [thisObj]):Boolean + +Similar to [Array/some](array.html#some). Tests whether any properties in the +object pass the test implemented by the provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +some(obj, isNumber); // true +``` + + + +## unset(obj, propName):Boolean + +Delete object property if existent and returns a boolean indicating succes. It +will also return `true` if property doesn't exist. + +Some properties can't be deleted, to understand why [check this +article](http://perfectionkills.com/understanding-delete/). + +See: [`set()`](#set) + +```js +var lorem = { + ipsum : { + dolor : { + sit : 'amet' + } + } + }; + +unset(lorem, 'ipsum.dolor.sit'); // true +console.log(lorem.ipsum.dolor); // {} +unset(lorem, 'foo.bar'); // true +``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md new file mode 100644 index 00000000..1be3c102 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md @@ -0,0 +1,115 @@ +# queryString # + +Utilities for query string manipulation. + + + +## contains(url, paramName):Boolen + +Checks if query string contains parameter. + +### Arguments: + + 1. `url` (String) : URL or query string. + 2. `paramName` (String) : Parameter name. + +### Example: + +```js +var url = 'example.com/?lorem=ipsum'; +contains(url, 'lorem'); // true +contains(url, 'foo'); //false +``` + + + +## decode(queryStr[, shouldTypecast]):Object + +Parses query string and creates an object of keys => vals. + +Will typecast value with [`string/typecast`](string.html#typecast) by default +and decode string parameters using `decodeURIComponent()`. + +```js +var query = '?foo=bar&lorem=123'; +decode(query); // {foo: "bar", lorem: 123} +decode(query, false); // {foo: "bar", lorem: "123"} +``` + + +## encode(obj):String + +Encode object into a query string. + +Will encode parameters with `encodeURIComponent()`. + +```js +encode({foo: "bar", lorem: 123}); // "?foo=bar&lorem=123" +``` + + +## getParam(url, param[, shouldTypecast]):* + +Get query parameter value. + +Will typecast value with [`string/typecast`](string.html#typecast) by default. + +See: [`setParam()`](#setParam) + +### Arguments: + + 1. `url` (String) : Url. + 2. `param` (String) : Parameter name. + 3. `[shouldTypecast]` (Boolean) : If it should typecast value. + +### Example: + +```js +var url = 'example.com/?foo=bar&lorem=123&ipsum=false'; +getParam(url, 'dolor'); // "amet" +getParam(url, 'lorem'); // 123 +getParam(url, 'lorem', false); // "123" +``` + + +## parse(url[, shouldTypecast]):Object + +Parses URL, extracts query string and decodes it. + +It will typecast all properties of the query object unless second argument is +`false`. + +Alias to: `decode(getQuery(url))`. + +```js +var url = 'example.com/?lorem=ipsum&a=123'; +parse(url); // {lorem: "ipsum", a: 123} +parse(url, false); // {lorem: "ipsum", a: "123"} +``` + + +## getQuery(url):String + +Gets full query as string with all special chars decoded. + +```js +getQuery('example.com/?lorem=ipsum'); // "?lorem=ipsum" +``` + + +## setParam(url, paramName, value):String + +Add new query string parameter to URL or update existing value. + +See: [`getParam()`](#getParam) + +```js +setParam('?foo=bar&lorem=0', 'lorem', 'ipsum'); // '?foo=bar&lorem=ipsum' +setParam('?lorem=1', 'foo', 123); // '?lorem=1&foo=123' +``` + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/random.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/random.md new file mode 100644 index 00000000..b058b4e0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/random.md @@ -0,0 +1,218 @@ +# random # + +Pseudo-random generators. + +mout uses `Math.random` by default on all the pseudo-random generators, if +you need a seeded random or a better algorithm see the [`random()`](#random) +documentation for instructions. + + + +## choice(...items):* + +Returns a random element from the supplied arguments or from an array if single +argument is an array. + +### Example: + +```js +choice(1, 2, 3, 4, 5); // 3 + +var arr = ['lorem', 'ipsum', 'dolor']; +choice(arr); // 'dolor' +``` + + + +## guid():String + +Generates a pseudo-random [Globally Unique Identifier](http://en.wikipedia.org/wiki/Globally_unique_identifier) (v4). + +Since the total number of GUIDs is 2122 the chance of generating the +same value twice is negligible. + +**Important:** this method uses `Math.random` by default so the UUID isn't +*safe* (sequence of outputs can be predicted in some cases), check the +[`random()`](#random) documentation for more info on how to replace the default +PRNG if you need extra safety or need *seeded* results. + +See: [`randHex()`](#randHex), [`random()`](#random) + +### Example: + +```js +guid(); // 830e9f50-ac7f-4369-a14f-ed0e62b2fa0b +guid(); // 5de3d09b-e79c-4727-932b-48c49228d508 +``` + + + +## rand([min], [max]):Number + +Gets a random number inside range or snap to min/max values. + +### Arguments: + + 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. + 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. + + +### Example: + +```js +rand(); // 448740433.55274725 +rand(); // -31797596.097682 +rand(0, 10); // 7.369723 +rand(0, 10); // 5.987042 +``` + +See: [`random()`](#random) + + + +## randBit():Number + +Returns a random "bit" (0 or 1). Useful for addition/subtraction. + +It's slightly faster than `choice(0, 1)` since implementation is simpler (not +that it will make a huge difference in most cases). + +See: [`choice()`](#choice) + +### Example: + +```js +randBit(); // 1 +randBit(); // 0 + +//same effect as +choice(0, 1); +``` + + + +## randHex([size]):String + +Returns a random hexadecimal string. + +The default `size` is `6`. + +### Example: + +```js +randHex(); // "dd8575" +randHex(); // "e6baeb" +randHex(2); // "a2" +randHex(30); // "effd7e2ad9a4a3067e30525fab983a" +``` + + + +## randInt([min], [max]):Number + +Gets a random integer inside range or snap to min/max values. + +### Arguments: + + 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. + 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. + + +### Example: + +```js +randInt(); // 448740433 +randInt(); // -31797596 +randInt(0, 10); // 7 +randInt(0, 10); // 5 +``` + + + +## randSign():Number + +Returns a random "sign" (-1 or 1). Useful for multiplications. + +It's slightly faster than `choice(-1, 1)` since implementation is simpler (not +that it will make a huge difference in most cases). + +See: [`choice()`](#choice) + +### Example: + +```js +randSign(); // -1 +randSign(); // 1 + +//same effect as +choice(-1, 1); +``` + + + +## random():Number + +Returns a random number between `0` and `1`. Same as `Math.random()`. + +```js +random(); // 0.35435103671625257 +random(); // 0.8768321881070733 +``` + +**Important:** No methods inside mout should call `Math.random()` +directly, they all use `random/random` as a proxy, that way we can +inject/replace the pseudo-random number generator if needed (ie. in case we +need a seeded random or a better algorithm than the native one). + +### Replacing the PRNG + +In some cases we might need better/different algorithms than the one provided +by `Math.random` (ie. safer, seeded). + +Because of licensing issues, file size limitations and different needs we +decided to **not** implement a custom PRNG and instead provide a easy way to +override the default behavior. - [issue #99](https://github.com/millermedeiros/amd-utils/issues/99) + +If you are using mout with a loader that supports the [AMD map +config](https://github.com/amdjs/amdjs-api/wiki/Common-Config), such as +[RequireJS](http://requirejs.org/), you can use it to replace the PRNG +(recommended approach): + +```js +requirejs.config({ + map : { + // all modules will load "my_custom_prng" instead of + // "mout/random/random" + '*' : { + 'mout/random/random' : 'my_custom_prng' + } + } +}); +``` + +You also have the option to override `random.get` in case you are using +mout on node.js or with a loader which doesn't support the map config: + +```js +// replace the PRNG +var n = 0; +random.get = function(){ + return ++n % 2? 0 : 1; // not so random :P +}; +random(); // 0 +random(); // 1 +random(); // 0 +random(); // 1 +``` + +See this [detailed explanation about PRNG in +JavaScript](http://baagoe.org/en/w/index.php/Better_random_numbers_for_javascript) +to understand the issues with the native `Math.random` and also for a list of +algorithms that could be used instead. + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/string.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/string.md new file mode 100644 index 00000000..2b282315 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/string.md @@ -0,0 +1,594 @@ +# string # + +String utilities. + + +## camelCase(str):String + +Convert string to "camelCase" text. + +See: [`pascalCase()`](#pascalCase), [`unCamelCase()`](#unCamelCase) + +### Example + +```js +camelCase('lorem-ipsum-dolor'); // "loremIpsumDolor" +camelCase('lorem ipsum dolor'); // "loremIpsumDolor" +``` + + + +## contains(str, substring, [fromIndex]):Boolean + +Checks if string contains the given substring. + +See: [`startsWith()`](#startsWith), [`endsWith()`](#endsWith) + +### Example + +```js +contains('lorem', 'or'); // true +contains('lorem', 'bar'); // false +``` + + + +## crop(str, maxChars, [append]):String + +Truncate string at full words. Alias to `truncate(str, maxChars, append, true);`. + +See: [`truncate()`](#truncate) + +### Example + +```js +crop('lorem ipsum dolor', 10); // "lorem..." +crop('lorem ipsum dolor', 10, '+'); // "lorem+" +``` + + + +## endsWith(str, suffix):Boolean + +Checks if string ends with specified suffix. + +See: [`startsWith()`](#startsWith), [`contains()`](#contains) + +### Example + +```js +endsWith('lorem ipsum', 'lorem'); // false +endsWith('lorem ipsum', 'ipsum'); // true +``` + + + +## escapeHtml(str):String + +Escapes HTML special chars (`>`, `<`, `&`, `"`, `'`). + +See: [`unescapeHtml()`](#unescapeHtml) + +### Example + +```js +escapeHtml('lorem & "ipsum"'); // "lorem &amp; &quot;ipsum&quot;" +``` + + + +## escapeRegExp(str):String + +Escape special chars to be used as literals in RegExp constructors. + +### Example + +```js +str = escapeRegExp('[lorem.ipsum]'); // "\\[lorem\\.ipsum\\]" +reg = new RegExp(str); // /\[lorem\.ipsum\]/ +``` + + + +## escapeUnicode(str[, shouldEscapePrintable]):String + +Unicode escape chars. + +It will only escape non-printable ASCII chars unless `shouldEscapePrintable` is +set to `true`. + +See: [`unescapeUnicode()`](#unescapeUnicode) + +```js +escapeUnicode('føo bår'); +// > "f\u00f8o b\u00e5r" +escapeUnicode('føo bår', true); +// > "\u0066\u00f8\u006f\u0020\u0062\u00e5\u0072" +``` + + + +## hyphenate(str):String + +Replaces spaces with hyphens, split camelCase text, remove non-word chars, +remove accents and convert to lower case. + +See: [`slugify()`](#slugify), [`underscore()`](#underscore), +[`unhyphenate`](#unhyphenate) + +```js +hyphenate(' %# lorem ipsum ? $ dolor'); // "lorem-ipsum-dolor" +hyphenate('spéçïãl çhârs'); // "special-chars" +hyphenate('loremIpsum'); // "lorem-ipsum" +``` + + + +## interpolate(str, replacements[, syntax]):String + +String interpolation. Format/replace tokens with object properties. + +```js +var tmpl = 'Hello {{name}}!'; +interpolate(tmpl, {name: 'World'}); // "Hello World!" +interpolate(tmpl, {name: 'Lorem Ipsum'}); // "Hello Lorem Ipsum!" +``` + +It uses a mustache-like syntax by default but you can set your own format if +needed. You can also use Arrays for the replacements (since Arrays are +objects as well): + +```js +// matches everything inside "${}" +var syntax = /\$\{([^}]+)\}/g; +var tmpl = "Hello ${0}!"; +interpolate(tmpl, ['Foo Bar'], syntax); // "Hello Foo Bar!" +``` + + + +## lowerCase(str):String + +"Safer" `String.toLowerCase()`. (Used internally) + +### Example + +```js +(null).toLowerCase(); // Error! +(undefined).toLowerCase(); // Error! +lowerCase(null); // "" +lowerCase(undefined); // "" +``` + + + +## lpad(str, minLength[, char]):String + +Pad string from left with `char` if its' length is smaller than `minLen`. + +See: [`rpad()`](#rpad) + +### Example + +```js +lpad('a', 5); // " a" +lpad('a', 5, '-'); // "----a" +lpad('abc', 3, '-'); // "abc" +lpad('abc', 4, '-'); // "-abc" +``` + + + +## ltrim(str, [chars]):String + +Remove chars or white-spaces from beginning of string. + +`chars` is an array of chars to remove from the beginning of the string. If +`chars` is not specified, Unicode whitespace chars will be used instead. + +See: [`rtrim()`](#rtrim), [`trim()`](#trim) + +### Example + +```js +ltrim(' lorem ipsum '); // "lorem ipsum " +ltrim('--lorem ipsum--', ['-']); // "lorem ipsum--" +``` + + + +## makePath(...args):String + +Group arguments as path segments, if any of the args is `null` or `undefined` +it will be ignored from resulting path. It will also remove duplicate "/". + +See: [`array/join()`](array.html#join) + +### Example + +```js +makePath('lorem', 'ipsum', null, 'dolor'); // "lorem/ipsum/dolor" +makePath('foo///bar/'); // "foo/bar/" +``` + + + +## normalizeLineBreaks(str, [lineBreak]):String + +Normalize line breaks to a single format. Defaults to Unix `\n`. + +It handles DOS (`\r\n`), Mac (`\r`) and Unix (`\n`) formats. + +### Example + +```js +// "foo\nbar\nlorem\nipsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum'); + +// "foo\rbar\rlorem\ripsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', '\r'); + +// "foo bar lorem ipsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', ' '); +``` + + + +## pascalCase(str):String + +Convert string to "PascalCase" text. + +See: [`camelCase()`](#camelCase) + +### Example + +```js +pascalCase('lorem-ipsum-dolor'); // "LoremIpsumDolor" +pascalCase('lorem ipsum dolor'); // "LoremIpsumDolor" +``` + + + +## properCase(str):String + +UPPERCASE first char of each word, lowercase other chars. + +### Example + +```js +properCase('loRem iPSum'); // "Lorem Ipsum" +``` + + + +## removeNonASCII(str):String + +Remove [non-printable ASCII +chars](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). + +### Example + +```js +removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'); // "lorem-ipsum" +``` + + + +## removeNonWord(str):String + +Remove non-word chars. + +### Example + +```js +var str = 'lorem ~!@#$%^&*()_+`-={}[]|\\:";\'/?><., ipsum'; +removeNonWord(str); // "lorem - ipsum" +``` + + + +## repeat(str, n):String + +Repeat string n-times. + +### Example + +```js +repeat('a', 3); // "aaa" +repeat('bc', 2); // "bcbc" +repeat('a', 0); // "" +``` + + + +## replace(str, search, replacements):String + +Replace string(s) with the replacement(s) in the source. + +`search` and `replacements` can be an array, or a single item. For every item +in `search`, it will call `str.replace` with the search item and the matching +replacement in `replacements`. If `replacements` only contains one replacement, +it will be used for all the searches, otherwise it will use the replacement at +the same index as the search. + +### Example + +```js +replace('foo bar', 'foo', 'test'); // "test bar" +replace('test 1 2', ['1', '2'], 'n'); // "test n n" +replace('test 1 2', ['1', '2'], ['one', 'two']); // "test one two" +replace('123abc', [/\d/g, /[a-z]/g], ['0', '.']); // "000..." +``` + + + +## replaceAccents(str):String + +Replaces all accented chars with regular ones. + +**Important:** Only covers **Basic Latin** and **Latin-1** unicode chars. + +### Example + +```js +replaceAccents('spéçïãl çhârs'); // "special chars" +``` + + + +## rpad(str, minLength[, char]):String + +Pad string from right with `char` if its' length is smaller than `minLen`. + +See: [`lpad()`](#lpad) + +### Example + +```js +rpad('a', 5); // "a " +rpad('a', 5, '-'); // "a----" +rpad('abc', 3, '-'); // "abc" +rpad('abc', 4, '-'); // "abc-" +``` + + + +## rtrim(str, [chars]):String + +Remove chars or white-spaces from end of string. + +`chars` is an array of chars to remove from the end of the string. If +`chars` is not specified, Unicode whitespace chars will be used instead. + +See: [`trim()`](#trim), [`ltrim()`](#ltrim) + +### Example + +```js +rtrim(' lorem ipsum '); // " lorem ipsum" +rtrim('--lorem ipsum--', ['-']); // "--lorem ipsum" +``` + + + +## sentenceCase(str):String + +UPPERCASE first char of each sentence and lowercase other chars. + +### Example + +```js +var str = 'Lorem IpSum DoLOr. maeCeNnas Ullamcor.'; +sentenceCase(str); // "Lorem ipsum dolor. Maecennas ullamcor." +``` + + + +## stripHtmlTags(str):String + +Remove HTML/XML tags from string. + +### Example + +```js +var str = '

lorem ipsum

'; +stripHtmlTags(str); // "lorem ipsum" +``` + + + +## startsWith(str, prefix):Boolean + +Checks if string starts with specified prefix. + +See: [`endsWith()`](#endsWith), [`contains()`](#contains) + +### Example + +```js +startsWith('lorem ipsum', 'lorem'); // true +startsWith('lorem ipsum', 'ipsum'); // false +``` + + + +## slugify(str[, delimeter]):String + +Convert to lower case, remove accents, remove non-word chars and replace spaces +with the delimeter. The default delimeter is a hyphen. + +Note that this does not split camelCase text. + +See: [`hyphenate()`](#hyphenate) and [`underscore()`](#underscore) + +### Example + +```js +var str = 'loremIpsum dolor spéçïãl chârs'; +slugify(str); // "loremipsum-dolor-special-chars" +slugify(str, '_'); // "loremipsum_dolor_special_chars" +``` + + + +## trim(str, [chars]):String + +Remove chars or white-spaces from beginning and end of string. + +`chars` is an array of chars to remove from the beginning and end of the +string. If `chars` is not specified, Unicode whitespace chars will be used +instead. + +See: [`rtrim()`](#rtrim), [`ltrim()`](#ltrim) + +### Example + +```js +trim(' lorem ipsum '); // "lorem ipsum" +trim('-+-lorem ipsum-+-', ['-', '+']); // "lorem ipsum" +``` + + + +## truncate(str, maxChars, [append], [onlyFullWords]):String + +Limit number of chars. Returned string `length` will be `<= maxChars`. + +See: [`crop()`](#crop) + +### Arguments + + 1. `str` (String) : String + 2. `maxChars` (Number) : Maximum number of characters including `append.length`. + 3. `[append]` (String) : Value that should be added to the end of string. + Defaults to "...". + 4. `[onlyFullWords]` (Boolean) : If it shouldn't break words. Default is + `false`. (favor [`crop()`](#crop) since code will be clearer). + +### Example + +```js +truncate('lorem ipsum dolor', 11); // "lorem ip..." +truncate('lorem ipsum dolor', 11, '+'); // "lorem ipsu+" +truncate('lorem ipsum dolor', 11, null, true); // "lorem..." +``` + + + +## typecast(str):* + +Parses string and convert it into a native value. + +### Example + +```js +typecast('lorem ipsum'); // "lorem ipsum" +typecast('123'); // 123 +typecast('123.45'); // 123.45 +typecast('false'); // false +typecast('true'); // true +typecast('null'); // null +typecast('undefined'); // undefined +``` + + + +## unCamelCase(str, [delimiter]):String + +Add the delimiter between camelCase text and convert first char of each word to +lower case. + +The delimiter defaults to a space character. + +See: [`camelCase()`][#camelCase] + +### Example + +```js +unCamelCase('loremIpsumDolor'); // "lorem ipsum dolor" +unCamelCase('loremIpsumDolor', '-'); // "lorem-ipsum-color" +``` + + +## underscore(str):String + +Replaces spaces with underscores, split camelCase text, remove non-word chars, +remove accents and convert to lower case. + +See: [`slugify()`](#slugify), [`hyphenate()`](#hyphenate) + +```js +underscore(' %# lorem ipsum ? $ dolor'); // "lorem_ipsum_dolor" +underscore('spéçïãl çhârs'); // "special_chars" +underscore('loremIpsum'); // "lorem_ipsum" +``` + + + +## unescapeHtml(str):String + +Unescapes HTML special chars (`>`, `<`, `&`, `"`, `'`). + +See: [`escapeHtml()`](#escapeHtml) + +### Example + +```js +unescapeHtml('lorem &amp; &quot;ipsum&quot;'); // 'lorem & "ipsum"' +``` + + + +## unescapeUnicode(str):String + +Unescapes unicode char sequences. + +See: [`escapeUnicode()`](#escapeUnicode) + +```js +unescapeUnicode('\\u0066\\u00f8\\u006f\\u0020\\u0062\\u00e5\\u0072'); +// > 'føo bår' +``` + + + +## unhyphenate(str):String + +Replaces hyphens with spaces. (only hyphens between word chars) + +See : [`hyphenate()`](#hyphenate) + +### Example + +```js +unhyphenate('lorem-ipsum-dolor'); // "lorem ipsum dolor" +``` + + +## upperCase(str):String + +"Safer" `String.toUpperCase()`. (Used internally) + +### Example + +```js +(null).toUpperCase(); // Error! +(undefined).toUpperCase(); // Error! +upperCase(null); // "" +upperCase(undefined); // "" +``` + + + +## WHITE_SPACES:Array + +Constant array of all [Unicode white-space +characters](http://en.wikipedia.org/wiki/Whitespace_character). + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/time.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/time.md new file mode 100644 index 00000000..628c2a9b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/time.md @@ -0,0 +1,64 @@ +# time # + +Utilities for time manipulation. + + +## convert(value, sourceUnit, [destinationUnit]):Number + +Converts time between units. + +Available units: `millisecond`, `second`, `minute`, `hour`, `day`, `week`. +Abbreviations: `ms`, `s`, `m`, `h`, `d`, `w`. + +We do **not** support year and month as a time unit since their values are not +fixed. + +The default `destinationUnit` is `ms`. + +```js +convert(1, 'minute'); // 60000 +convert(2.5, 's', 'ms'); // 2500 +convert(2, 'm', 's'); // 120 +convert(500, 'ms', 's'); // 0.5 +``` + + + +## now():Number + +Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. +Uses `Date.now()` if available. + +### Example + +```js +now(); // 1335449614650 +``` + + + +## parseMs(ms):Object + +Parse timestamp (milliseconds) into an object `{milliseconds:number, +seconds:number, minutes:number, hours:number, days:number}`. + +### Example + +```js +// {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} +parseMs(2348765454); +``` + + + +## toTimeString(ms):String + +Convert timestamp (milliseconds) into a time string in the format "[H:]MM:SS". + +### Example + +```js +toTimeString(12513); // "00:12" +toTimeString(951233); // "15:51" +toTimeString(8765235); // "2:26:05" +``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function.js new file mode 100644 index 00000000..43a16ef4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function.js @@ -0,0 +1,18 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'bind' : require('./function/bind'), + 'compose' : require('./function/compose'), + 'debounce' : require('./function/debounce'), + 'func' : require('./function/func'), + 'makeIterator_' : require('./function/makeIterator_'), + 'partial' : require('./function/partial'), + 'prop' : require('./function/prop'), + 'series' : require('./function/series'), + 'throttle' : require('./function/throttle'), + 'timeout' : require('./function/timeout') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/bind.js new file mode 100644 index 00000000..71bc1257 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/bind.js @@ -0,0 +1,23 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + * @param {Function} fn Function. + * @param {object} context Execution context. + * @param {rest} args Arguments (0...n arguments). + * @return {Function} Wrapped Function. + */ + function bind(fn, context, args){ + var argsArr = slice(arguments, 2); //curried args + return function(){ + return fn.apply(context, argsArr.concat(slice(arguments))); + }; + } + + module.exports = bind; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/compose.js new file mode 100644 index 00000000..8cd5c5f3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/compose.js @@ -0,0 +1,23 @@ + + + /** + * Returns a function that composes multiple functions, passing results to + * each other. + */ + function compose() { + var fns = arguments; + return function(arg){ + // only cares about the first argument since the chain can only + // deal with a single return value anyway. It should start from + // the last fn. + var n = fns.length; + while (n--) { + arg = fns[n].call(this, arg); + } + return arg; + }; + } + + module.exports = compose; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/debounce.js new file mode 100644 index 00000000..a0ed07f5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/debounce.js @@ -0,0 +1,29 @@ + + + /** + * Debounce callback execution + */ + function debounce(fn, threshold, isAsap){ + var timeout, result; + function debounced(){ + var args = arguments, context = this; + function delayed(){ + if (! isAsap) { + result = fn.apply(context, args); + } + timeout = null; + } + if (timeout) { + clearTimeout(timeout); + } else if (isAsap) { + result = fn.apply(context, args); + } + timeout = setTimeout(delayed, threshold); + return result; + } + return debounced; + } + + module.exports = debounce; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/func.js new file mode 100644 index 00000000..b81bf0a8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/func.js @@ -0,0 +1,14 @@ + + + /** + * Returns a function that call a method on the passed object + */ + function func(name){ + return function(obj){ + return obj[name](); + }; + } + + module.exports = func; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js new file mode 100644 index 00000000..767610a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js @@ -0,0 +1,34 @@ +var prop = require('./prop'); +var deepMatches = require('../object/deepMatches'); + + /** + * Converts argument into a valid iterator. + * Used internally on most array/object/collection methods that receives a + * callback/iterator providing a shortcut syntax. + */ + function makeIterator(src, thisObj){ + switch(typeof src) { + case 'object': + // typeof null == "object" + return (src != null)? function(val, key, target){ + return deepMatches(val, src); + } : src; + case 'string': + case 'number': + return prop(src); + case 'function': + if (typeof thisObj === 'undefined') { + return src; + } else { + return function(val, i, arr){ + return src.call(thisObj, val, i, arr); + }; + } + default: + return src; + } + } + + module.exports = makeIterator; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/partial.js new file mode 100644 index 00000000..d63ff1be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/partial.js @@ -0,0 +1,19 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Creates a partially applied function. + */ + function partial(fn, var_args){ + var argsArr = slice(arguments, 1); //curried args + return function(){ + return fn.apply(this, argsArr.concat(slice(arguments))); + }; + } + + module.exports = partial; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/prop.js new file mode 100644 index 00000000..734acb7a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/prop.js @@ -0,0 +1,14 @@ + + + /** + * Returns a function that gets a property of the passed object + */ + function prop(name){ + return function(obj){ + return obj[name]; + }; + } + + module.exports = prop; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/series.js new file mode 100644 index 00000000..25159c2c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/series.js @@ -0,0 +1,22 @@ + + + /** + * Returns a function that will execute a list of functions in sequence + * passing the same arguments to each one. (useful for batch processing + * items during a forEach loop) + */ + function series(){ + var fns = arguments; + return function(){ + var i = 0, + n = fns.length; + while (i < n) { + fns[i].apply(this, arguments); + i += 1; + } + }; + } + + module.exports = series; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/throttle.js new file mode 100644 index 00000000..619dc540 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/throttle.js @@ -0,0 +1,32 @@ +var now = require('../time/now'); + + /** + */ + function throttle(fn, delay){ + var context, timeout, result, args, + cur, diff, prev = 0; + function delayed(){ + prev = now(); + timeout = null; + result = fn.apply(context, args); + } + function throttled(){ + context = this; + args = arguments; + cur = now(); + diff = delay - (cur - prev); + if (diff <= 0) { + clearTimeout(timeout); + prev = cur; + result = fn.apply(context, args); + } else if (! timeout) { + timeout = setTimeout(delayed, diff); + } + return result; + } + return throttled; + } + + module.exports = throttle; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/timeout.js new file mode 100644 index 00000000..e0d21a66 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/timeout.js @@ -0,0 +1,21 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Delays the call of a function within a given context. + */ + function timeout(fn, millis, context){ + + var args = slice(arguments, 3); + + return setTimeout(function() { + fn.apply(context, args); + }, millis); + } + + module.exports = timeout; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/index.js new file mode 100644 index 00000000..32a1c639 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/index.js @@ -0,0 +1,24 @@ +/**@license + * mout v0.6.0 | http://moutjs.com | MIT license + */ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'VERSION' : '0.6.0', + 'array' : require('./array'), + 'collection' : require('./collection'), + 'date' : require('./date'), + 'function' : require('./function'), + 'lang' : require('./lang'), + 'math' : require('./math'), + 'number' : require('./number'), + 'object' : require('./object'), + 'queryString' : require('./queryString'), + 'random' : require('./random'), + 'string' : require('./string'), + 'time' : require('./time') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang.js new file mode 100644 index 00000000..b9816218 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang.js @@ -0,0 +1,36 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'clone' : require('./lang/clone'), + 'createObject' : require('./lang/createObject'), + 'ctorApply' : require('./lang/ctorApply'), + 'deepClone' : require('./lang/deepClone'), + 'defaults' : require('./lang/defaults'), + 'inheritPrototype' : require('./lang/inheritPrototype'), + 'is' : require('./lang/is'), + 'isArguments' : require('./lang/isArguments'), + 'isArray' : require('./lang/isArray'), + 'isBoolean' : require('./lang/isBoolean'), + 'isDate' : require('./lang/isDate'), + 'isEmpty' : require('./lang/isEmpty'), + 'isFinite' : require('./lang/isFinite'), + 'isFunction' : require('./lang/isFunction'), + 'isInteger' : require('./lang/isInteger'), + 'isKind' : require('./lang/isKind'), + 'isNaN' : require('./lang/isNaN'), + 'isNull' : require('./lang/isNull'), + 'isNumber' : require('./lang/isNumber'), + 'isObject' : require('./lang/isObject'), + 'isPlainObject' : require('./lang/isPlainObject'), + 'isRegExp' : require('./lang/isRegExp'), + 'isString' : require('./lang/isString'), + 'isUndefined' : require('./lang/isUndefined'), + 'isnt' : require('./lang/isnt'), + 'kindOf' : require('./lang/kindOf'), + 'toArray' : require('./lang/toArray'), + 'toString' : require('./lang/toString') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/clone.js new file mode 100644 index 00000000..33c4e949 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/clone.js @@ -0,0 +1,49 @@ +var kindOf = require('./kindOf'); +var isPlainObject = require('./isPlainObject'); +var mixIn = require('../object/mixIn'); + + /** + * Clone native types. + */ + function clone(val){ + switch (kindOf(val)) { + case 'Object': + return cloneObject(val); + case 'Array': + return cloneArray(val); + case 'RegExp': + return cloneRegExp(val); + case 'Date': + return cloneDate(val); + default: + return val; + } + } + + function cloneObject(source) { + if (isPlainObject(source)) { + return mixIn({}, source); + } else { + return source; + } + } + + function cloneRegExp(r) { + var flags = ''; + flags += r.multiline ? 'm' : ''; + flags += r.global ? 'g' : ''; + flags += r.ignorecase ? 'i' : ''; + return new RegExp(r.source, flags); + } + + function cloneDate(date) { + return new Date(+date); + } + + function cloneArray(arr) { + return arr.slice(); + } + + module.exports = clone; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js new file mode 100644 index 00000000..bbc14c1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js @@ -0,0 +1,18 @@ +var mixIn = require('../object/mixIn'); + + /** + * Create Object using prototypal inheritance and setting custom properties. + * - Mix between Douglas Crockford Prototypal Inheritance and the EcmaScript 5 `Object.create()` method. + * @param {object} parent Parent Object. + * @param {object} [props] Object properties. + * @return {object} Created object. + */ + function createObject(parent, props){ + function F(){} + F.prototype = parent; + return mixIn(new F(), props); + + } + module.exports = createObject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js new file mode 100644 index 00000000..d68dc506 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js @@ -0,0 +1,17 @@ + + + function F(){} + + /** + * Do fn.apply on a constructor. + */ + function ctorApply(ctor, args) { + F.prototype = ctor.prototype; + var instance = new F(); + ctor.apply(instance, args); + return instance; + } + + module.exports = ctorApply; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js new file mode 100644 index 00000000..25fd95f1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js @@ -0,0 +1,48 @@ +var clone = require('./clone'); +var forOwn = require('../object/forOwn'); +var kindOf = require('./kindOf'); +var isPlainObject = require('./isPlainObject'); + + /** + * Recursively clone native types. + */ + function deepClone(val, instanceClone) { + switch ( kindOf(val) ) { + case 'Object': + return cloneObject(val, instanceClone); + case 'Array': + return cloneArray(val, instanceClone); + default: + return clone(val); + } + } + + function cloneObject(source, instanceClone) { + if (isPlainObject(source)) { + var out = {}; + forOwn(source, function(val, key) { + this[key] = deepClone(val, instanceClone); + }, out); + return out; + } else if (instanceClone) { + return instanceClone(source); + } else { + return source; + } + } + + function cloneArray(arr, instanceClone) { + var out = [], + i = -1, + n = arr.length, + val; + while (++i < n) { + out[i] = deepClone(arr[i], instanceClone); + } + return out; + } + + module.exports = deepClone; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js new file mode 100644 index 00000000..1111b2ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js @@ -0,0 +1,17 @@ +var toArray = require('./toArray'); +var find = require('../array/find'); + + /** + * Return first non void argument + */ + function defaults(var_args){ + return find(toArray(arguments), nonVoid); + } + + function nonVoid(val){ + return val != null; + } + + module.exports = defaults; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js new file mode 100644 index 00000000..cd8a379e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js @@ -0,0 +1,16 @@ +var createObject = require('./createObject'); + + /** + * Inherit prototype from another Object. + * - inspired by Nicholas Zackas Solution + * @param {object} child Child object + * @param {object} parent Parent Object + */ + function inheritPrototype(child, parent){ + var p = createObject(parent.prototype); + p.constructor = child; + child.prototype = p; + } + + module.exports = inheritPrototype; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/is.js new file mode 100644 index 00000000..4a835739 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/is.js @@ -0,0 +1,23 @@ + + + /** + * Check if both arguments are egal. + */ + function is(x, y){ + // implementation borrowed from harmony:egal spec + if (x === y) { + // 0 === -0, but they are not identical + return x !== 0 || 1 / x === 1 / y; + } + + // NaN !== NaN, but they are identical. + // NaNs are the only non-reflexive value, i.e., if x !== x, + // then x is a NaN. + // isNaN is broken: it converts its argument to number, so + // isNaN("foo") => true + return x !== x && y !== y; + } + + module.exports = is; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js new file mode 100644 index 00000000..f7b08ba4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js @@ -0,0 +1,15 @@ +var isKind = require('./isKind'); + + /** + */ + var isArgs = isKind(arguments, 'Arguments')? + function(val){ + return isKind(val, 'Arguments'); + } : + function(val){ + // Arguments is an Object on IE7 + return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); + }; + + module.exports = isArgs; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js new file mode 100644 index 00000000..262ee400 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + var isArray = Array.isArray || function (val) { + return isKind(val, 'Array'); + }; + module.exports = isArray; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js new file mode 100644 index 00000000..86557cb9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isBoolean(val) { + return isKind(val, 'Boolean'); + } + module.exports = isBoolean; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js new file mode 100644 index 00000000..4a5130f2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isDate(val) { + return isKind(val, 'Date'); + } + module.exports = isDate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js new file mode 100644 index 00000000..0e9f77da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js @@ -0,0 +1,24 @@ +var forOwn = require('../object/forOwn'); +var isArray = require('./isArray'); + + function isEmpty(val){ + if (val == null) { + // typeof null == 'object' so we check it first + return false; + } else if ( typeof val === 'string' || isArray(val) ) { + return !val.length; + } else if ( typeof val === 'object' || typeof val === 'function' ) { + var result = true; + forOwn(val, function(){ + result = false; + return false; // break loop + }); + return result; + } else { + return false; + } + } + + module.exports = isEmpty; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js new file mode 100644 index 00000000..6d4006f9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js @@ -0,0 +1,21 @@ +var isNumber = require('./isNumber'); + + var global = this; + + /** + * Check if value is finite + */ + function isFinite(val){ + var is = false; + if (typeof val === 'string' && val !== '') { + is = global.isFinite( parseFloat(val) ); + } else if (isNumber(val)){ + // need to use isNumber because of Number constructor + is = global.isFinite( val ); + } + return is; + } + + module.exports = isFinite; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js new file mode 100644 index 00000000..216879f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isFunction(val) { + return isKind(val, 'Function'); + } + module.exports = isFunction; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js new file mode 100644 index 00000000..29f95d96 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js @@ -0,0 +1,12 @@ +var isNumber = require('./isNumber'); + + /** + * Check if value is an integer + */ + function isInteger(val){ + return isNumber(val) && (val % 1 === 0); + } + + module.exports = isInteger; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js new file mode 100644 index 00000000..02301e04 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js @@ -0,0 +1,9 @@ +var kindOf = require('./kindOf'); + /** + * Check if value is from a specific "kind". + */ + function isKind(val, kind){ + return kindOf(val) === kind; + } + module.exports = isKind; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js new file mode 100644 index 00000000..f6efeb1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js @@ -0,0 +1,15 @@ +var isNumber = require('./isNumber'); + + /** + * Check if value is NaN for realz + */ + function isNaN(val){ + // based on the fact that NaN !== NaN + // need to check if it's a number to avoid conflicts with host objects + // also need to coerce ToNumber to avoid edge case `new Number(NaN)` + return !isNumber(val) || val != +val; + } + + module.exports = isNaN; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js new file mode 100644 index 00000000..6252f9ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js @@ -0,0 +1,9 @@ + + /** + */ + function isNull(val){ + return val === null; + } + module.exports = isNull; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js new file mode 100644 index 00000000..126c1cce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isNumber(val) { + return isKind(val, 'Number'); + } + module.exports = isNumber; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js new file mode 100644 index 00000000..7350c891 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isObject(val) { + return isKind(val, 'Object'); + } + module.exports = isObject; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js new file mode 100644 index 00000000..0d2d7b65 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js @@ -0,0 +1,14 @@ + + + /** + * Checks if the value is created by the `Object` constructor. + */ + function isPlainObject(value) { + return (!!value + && typeof value === 'object' + && value.constructor === Object); + } + + module.exports = isPlainObject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js new file mode 100644 index 00000000..fc5459a9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isRegExp(val) { + return isKind(val, 'RegExp'); + } + module.exports = isRegExp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isString.js new file mode 100644 index 00000000..f8906584 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isString.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isString(val) { + return isKind(val, 'String'); + } + module.exports = isString; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js new file mode 100644 index 00000000..fb2261df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js @@ -0,0 +1,10 @@ + + var UNDEF; + + /** + */ + function isUndef(val){ + return val === UNDEF; + } + module.exports = isUndef; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js new file mode 100644 index 00000000..9dad58ce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js @@ -0,0 +1,12 @@ +var is = require('./is'); + + /** + * Check if both values are not identical/egal + */ + function isnt(x, y){ + return !is(x, y); + } + + module.exports = isnt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js new file mode 100644 index 00000000..663464d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js @@ -0,0 +1,20 @@ + + + var _rKind = /^\[object (.*)\]$/, + _toString = Object.prototype.toString, + UNDEF; + + /** + * Gets the "kind" of value. (e.g. "String", "Number", etc) + */ + function kindOf(val) { + if (val === null) { + return 'Null'; + } else if (val === UNDEF) { + return 'Undefined'; + } else { + return _rKind.exec( _toString.call(val) )[1]; + } + } + module.exports = kindOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js new file mode 100644 index 00000000..e39b8734 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js @@ -0,0 +1,31 @@ +var kindOf = require('./kindOf'); + + var _win = this; + + /** + * Convert array-like object into array + */ + function toArray(val){ + var ret = [], + kind = kindOf(val), + n; + + if (val != null) { + if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { + //string, regexp, function have .length but user probably just want + //to wrap value into an array.. + ret[ret.length] = val; + } else { + //window returns true on isObject in IE7 and may have length + //property. `typeof NodeList` returns `function` on Safari so + //we can't use it (#58) + n = val.length; + while (n--) { + ret[n] = val[n]; + } + } + } + return ret; + } + module.exports = toArray; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toString.js new file mode 100644 index 00000000..ae5c2b0f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toString.js @@ -0,0 +1,13 @@ + + + /** + * Typecast a value to a String, using an empty string value for null or + * undefined. + */ + function toString(val){ + return val == null ? '' : val.toString(); + } + + module.exports = toString; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math.js new file mode 100644 index 00000000..c6ee889b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math.js @@ -0,0 +1,19 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'ceil' : require('./math/ceil'), + 'clamp' : require('./math/clamp'), + 'countSteps' : require('./math/countSteps'), + 'floor' : require('./math/floor'), + 'inRange' : require('./math/inRange'), + 'isNear' : require('./math/isNear'), + 'lerp' : require('./math/lerp'), + 'loop' : require('./math/loop'), + 'map' : require('./math/map'), + 'norm' : require('./math/norm'), + 'round' : require('./math/round') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/ceil.js new file mode 100644 index 00000000..a279e158 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/ceil.js @@ -0,0 +1,11 @@ + + /** + * Round value up with a custom radix. + */ + function ceil(val, step){ + step = Math.abs(step || 1); + return Math.ceil(val / step) * step; + } + + module.exports = ceil; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/clamp.js new file mode 100644 index 00000000..e929a9a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/clamp.js @@ -0,0 +1,9 @@ + + /** + * Clamps value inside range. + */ + function clamp(val, min, max){ + return val < min? min : (val > max? max : val); + } + module.exports = clamp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js new file mode 100644 index 00000000..60ac90c3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js @@ -0,0 +1,16 @@ + + /** + * Count number of full steps. + */ + function countSteps(val, step, overflow){ + val = Math.floor(val / step); + + if (overflow) { + return val % overflow; + } + + return val; + } + + module.exports = countSteps; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/floor.js new file mode 100644 index 00000000..9de50531 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/floor.js @@ -0,0 +1,10 @@ + + /** + * Floor value to full steps. + */ + function floor(val, step){ + step = Math.abs(step || 1); + return Math.floor(val / step) * step; + } + module.exports = floor; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/inRange.js new file mode 100644 index 00000000..763218f8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/inRange.js @@ -0,0 +1,11 @@ + + /** + * Checks if value is inside the range. + */ + function inRange(val, min, max, threshold){ + threshold = threshold || 0; + return (val + threshold >= min && val - threshold <= max); + } + + module.exports = inRange; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/isNear.js new file mode 100644 index 00000000..45486b6d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/isNear.js @@ -0,0 +1,9 @@ + + /** + * Check if value is close to target. + */ + function isNear(val, target, threshold){ + return (Math.abs(val - target) <= threshold); + } + module.exports = isNear; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/lerp.js new file mode 100644 index 00000000..111e2717 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/lerp.js @@ -0,0 +1,11 @@ + + /** + * Linear interpolation. + * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE + */ + function lerp(ratio, start, end){ + return start + (end - start) * ratio; + } + + module.exports = lerp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/loop.js new file mode 100644 index 00000000..35207c1a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/loop.js @@ -0,0 +1,10 @@ + + /** + * Loops value inside range. + */ + function loop(val, min, max){ + return val < min? max : (val > max? min : val); + } + + module.exports = loop; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/map.js new file mode 100644 index 00000000..96c4b787 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/map.js @@ -0,0 +1,11 @@ +var lerp = require('./lerp'); +var norm = require('./norm'); + /** + * Maps a number from one scale to another. + * @example map(3, 0, 4, -1, 1) -> 0.5 + */ + function map(val, min1, max1, min2, max2){ + return lerp( norm(val, min1, max1), min2, max2 ); + } + module.exports = map; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/norm.js new file mode 100644 index 00000000..54caf78a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/norm.js @@ -0,0 +1,9 @@ + + /** + * Gets normalized ratio of value inside range. + */ + function norm(val, min, max){ + return (val - min) / (max - min); + } + module.exports = norm; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/round.js new file mode 100644 index 00000000..d108e6cd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/round.js @@ -0,0 +1,12 @@ + + /** + * Round number to a specific radix + */ + function round(value, radix){ + radix = radix || 1; // default round 1 + return Math.round(value / radix) * radix; + } + + module.exports = round; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number.js new file mode 100644 index 00000000..0b6186cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number.js @@ -0,0 +1,21 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'MAX_INT' : require('./number/MAX_INT'), + 'MAX_UINT' : require('./number/MAX_UINT'), + 'MIN_INT' : require('./number/MIN_INT'), + 'abbreviate' : require('./number/abbreviate'), + 'currencyFormat' : require('./number/currencyFormat'), + 'enforcePrecision' : require('./number/enforcePrecision'), + 'pad' : require('./number/pad'), + 'rol' : require('./number/rol'), + 'ror' : require('./number/ror'), + 'sign' : require('./number/sign'), + 'toInt' : require('./number/toInt'), + 'toUInt' : require('./number/toUInt'), + 'toUInt31' : require('./number/toUInt31') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js new file mode 100644 index 00000000..1d6f0e48 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit signed integer value. (2^31 - 1) + */ + + module.exports = 2147483647; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js new file mode 100644 index 00000000..700da0f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit unsigned integet value (2^32 - 1) + */ + + module.exports = 4294967295; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js new file mode 100644 index 00000000..b34ab2ce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Minimum 32-bit signed integer value (-2^31). + */ + + module.exports = -2147483648; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js new file mode 100644 index 00000000..dd6716b9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js @@ -0,0 +1,35 @@ +var enforcePrecision = require('./enforcePrecision'); + + var _defaultDict = { + thousand : 'K', + million : 'M', + billion : 'B' + }; + + /** + * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) + */ + function abbreviateNumber(val, nDecimals, dict){ + nDecimals = nDecimals != null? nDecimals : 1; + dict = dict || _defaultDict; + val = enforcePrecision(val, nDecimals); + + var str, mod; + + if (val < 1000000) { + mod = enforcePrecision(val / 1000, nDecimals); + // might overflow to next scale during rounding + str = mod < 1000? mod + dict.thousand : 1 + dict.million; + } else if (val < 1000000000) { + mod = enforcePrecision(val / 1000000, nDecimals); + str = mod < 1000? mod + dict.million : 1 + dict.billion; + } else { + str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; + } + + return str; + } + + module.exports = abbreviateNumber; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js new file mode 100644 index 00000000..1cf02497 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js @@ -0,0 +1,26 @@ + + + /** + * Converts number into currency format + */ + function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { + nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; + decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; + thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; + + //can't use enforce precision since it returns a number and we are + //doing a RegExp over the string + var fixed = val.toFixed(nDecimalDigits), + //separate begin [$1], middle [$2] and decimal digits [$4] + parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); + + if(parts){ //val >= 1000 || val <= -1000 + return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); + }else{ + return fixed.replace('.', decimalSeparator); + } + } + + module.exports = currencyFormat; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js new file mode 100644 index 00000000..f73a92d7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js @@ -0,0 +1,13 @@ + + /** + * Enforce a specific amount of decimal digits and also fix floating + * point rounding issues. + * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> + * 0.61` + */ + function enforcePrecision(val, nDecimalDigits){ + var pow = Math.pow(10, nDecimalDigits); + return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); + } + module.exports = enforcePrecision; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/pad.js new file mode 100644 index 00000000..da752706 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/pad.js @@ -0,0 +1,12 @@ +var lpad = require('../string/lpad'); + + /** + * Add padding zeros if n.length < minLength. + */ + function pad(n, minLength, char){ + return lpad(''+ n, minLength, char || '0'); + } + + module.exports = pad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/rol.js new file mode 100644 index 00000000..ecd58da4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/rol.js @@ -0,0 +1,10 @@ + + /** + * Bitwise circular shift left + * http://en.wikipedia.org/wiki/Circular_shift + */ + function rol(val, shift){ + return (val << shift) | (val >> (32 - shift)); + } + module.exports = rol; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/ror.js new file mode 100644 index 00000000..2eda81da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/ror.js @@ -0,0 +1,10 @@ + + /** + * Bitwise circular shift right + * http://en.wikipedia.org/wiki/Circular_shift + */ + function ror(val, shift){ + return (val >> shift) | (val << (32 - shift)); + } + module.exports = ror; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/sign.js new file mode 100644 index 00000000..b854a4ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/sign.js @@ -0,0 +1,15 @@ + + + /** + * Get sign of the value. + */ + function sign(val) { + var num = Number(val); + if (num === 0) return num; // +0 and +0 === 0 + if (isNaN(num)) return num; // NaN + return num < 0? -1 : 1; + } + + module.exports = sign; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toInt.js new file mode 100644 index 00000000..bcefae0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toInt.js @@ -0,0 +1,15 @@ + + + /** + * "Convert" value into an 32-bit integer. + * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. + * IMPORTANT: val will wrap at 2^31 and -2^31. + * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 + */ + function toInt(val){ + return ~~val; + } + + module.exports = toInt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js new file mode 100644 index 00000000..5290b627 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js @@ -0,0 +1,13 @@ + + + /** + * "Convert" value into a 32-bit unsigned integer. + * IMPORTANT: Value will wrap at 2^32. + */ + function toUInt(val){ + return val >>> 0; + } + + module.exports = toUInt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js new file mode 100644 index 00000000..fcc5a97c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js @@ -0,0 +1,13 @@ +var MAX_INT = require('./MAX_INT'); + + /** + * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + * IMPORTANT: value wil wrap at 2^31, if negative will return 0. + */ + function toUInt31(val){ + return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); + } + + module.exports = toUInt31; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object.js new file mode 100644 index 00000000..76c06424 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object.js @@ -0,0 +1,42 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'bindAll' : require('./object/bindAll'), + 'contains' : require('./object/contains'), + 'deepEquals' : require('./object/deepEquals'), + 'deepFillIn' : require('./object/deepFillIn'), + 'deepMatches' : require('./object/deepMatches'), + 'deepMixIn' : require('./object/deepMixIn'), + 'equals' : require('./object/equals'), + 'every' : require('./object/every'), + 'fillIn' : require('./object/fillIn'), + 'filter' : require('./object/filter'), + 'find' : require('./object/find'), + 'forIn' : require('./object/forIn'), + 'forOwn' : require('./object/forOwn'), + 'functions' : require('./object/functions'), + 'get' : require('./object/get'), + 'has' : require('./object/has'), + 'hasOwn' : require('./object/hasOwn'), + 'keys' : require('./object/keys'), + 'map' : require('./object/map'), + 'matches' : require('./object/matches'), + 'max' : require('./object/max'), + 'merge' : require('./object/merge'), + 'min' : require('./object/min'), + 'mixIn' : require('./object/mixIn'), + 'namespace' : require('./object/namespace'), + 'pick' : require('./object/pick'), + 'pluck' : require('./object/pluck'), + 'reduce' : require('./object/reduce'), + 'reject' : require('./object/reject'), + 'set' : require('./object/set'), + 'size' : require('./object/size'), + 'some' : require('./object/some'), + 'unset' : require('./object/unset'), + 'values' : require('./object/values') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js new file mode 100644 index 00000000..b2f27d08 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js @@ -0,0 +1,18 @@ +var functions = require('./functions'); +var bind = require('../function/bind'); +var forEach = require('../array/forEach'); + + /** + * Binds methods of the object to be run in it's own context. + */ + function bindAll(obj, rest_methodNames){ + var keys = arguments.length > 1? + Array.prototype.slice.call(arguments, 1) : functions(obj); + forEach(keys, function(key){ + obj[key] = bind(obj[key], obj); + }); + } + + module.exports = bindAll; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/contains.js new file mode 100644 index 00000000..8076e2c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/contains.js @@ -0,0 +1,13 @@ +var some = require('./some'); + + /** + * Check if object contains value + */ + function contains(obj, needle) { + return some(obj, function(val) { + return (val === needle); + }); + } + module.exports = contains; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js new file mode 100644 index 00000000..fcde9449 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js @@ -0,0 +1,27 @@ +var isObject = require('../lang/isObject'); +var equals = require('./equals'); + + function defaultCompare(a, b) { + return a === b; + } + + /** + * Recursively checks for same properties and values. + */ + function deepEquals(a, b, callback){ + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + function compare(a, b){ + return deepEquals(a, b, callback); + } + + return equals(a, b, compare); + } + + module.exports = deepEquals; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js new file mode 100644 index 00000000..d27db44d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js @@ -0,0 +1,32 @@ +var forOwn = require('./forOwn'); +var isPlainObject = require('../lang/isPlainObject'); + + /** + * Deeply copy missing properties in the target from the defaults. + */ + function deepFillIn(target, defaults){ + var i = 0, + n = arguments.length, + obj; + + while(++i < n) { + obj = arguments[i]; + if (obj) { + forOwn(obj, function(newValue, key) { + var curValue = target[key]; + if (curValue == null) { + target[key] = newValue; + } else if (isPlainObject(curValue) + && isPlainObject(newValue)) { + deepFillIn(curValue, newValue); + } + }); + } + } + + return target; + } + + module.exports = deepFillIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js new file mode 100644 index 00000000..3366c52d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js @@ -0,0 +1,55 @@ +var forOwn = require('./forOwn'); +var isArray = require('../lang/isArray'); + + function containsMatch(array, pattern) { + var i = -1, length = array.length; + while (++i < length) { + if (deepMatches(array[i], pattern)) { + return true; + } + } + + return false; + } + + function matchArray(target, pattern) { + var i = -1, patternLength = pattern.length; + while (++i < patternLength) { + if (!containsMatch(target, pattern[i])) { + return false; + } + } + + return true; + } + + function matchObject(target, pattern) { + var result = true; + forOwn(pattern, function(val, key) { + if (!deepMatches(target[key], val)) { + // Return false to break out of forOwn early + return (result = false); + } + }); + + return result; + } + + /** + * Recursively check if the objects match. + */ + function deepMatches(target, pattern){ + if (target && typeof target === 'object') { + if (isArray(target) && isArray(pattern)) { + return matchArray(target, pattern); + } else { + return matchObject(target, pattern); + } + } else { + return target === pattern; + } + } + + module.exports = deepMatches; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js new file mode 100644 index 00000000..a97e98d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js @@ -0,0 +1,34 @@ +var forOwn = require('./forOwn'); +var isPlainObject = require('../lang/isPlainObject'); + + /** + * Mixes objects into the target object, recursively mixing existing child + * objects. + */ + function deepMixIn(target, objects) { + var i = 0, + n = arguments.length, + obj; + + while(++i < n){ + obj = arguments[i]; + if (obj) { + forOwn(obj, copyProp, target); + } + } + + return target; + } + + function copyProp(val, key) { + var existing = this[key]; + if (isPlainObject(val) && isPlainObject(existing)) { + deepMixIn(existing, val); + } else { + this[key] = val; + } + } + + module.exports = deepMixIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/equals.js new file mode 100644 index 00000000..f50cbe4e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/equals.js @@ -0,0 +1,36 @@ +var hasOwn = require('./hasOwn'); +var every = require('./every'); +var isObject = require('../lang/isObject'); + + function defaultCompare(a, b) { + return a === b; + } + + // Makes a function to compare the object values from the specified compare + // operation callback. + function makeCompare(callback) { + return function(value, key) { + return hasOwn(this, key) && callback(value, this[key]); + }; + } + + function checkProperties(value, key) { + return hasOwn(this, key); + } + + /** + * Checks if two objects have the same keys and values. + */ + function equals(a, b, callback) { + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + return (every(a, makeCompare(callback), b) && + every(b, checkProperties, a)); + } + + module.exports = equals; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/every.js new file mode 100644 index 00000000..01106e5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/every.js @@ -0,0 +1,23 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object every + */ + function every(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + forOwn(obj, function(val, key) { + // we consider any falsy values as "false" on purpose so shorthand + // syntax can be used to check property existence + if (!callback(val, key, obj)) { + result = false; + return false; // break + } + }); + return result; + } + + module.exports = every; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js new file mode 100644 index 00000000..80dcdf07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js @@ -0,0 +1,20 @@ +var forEach = require('../array/forEach'); +var forOwn = require('./forOwn'); + + /** + * Copy missing properties in the obj from the defaults. + */ + function fillIn(obj, var_defaults){ + forEach(Array.prototype.slice.call(arguments, 1), function(base){ + forOwn(base, function(val, key){ + if (obj[key] == null) { + obj[key] = val; + } + }); + }); + return obj; + } + + module.exports = fillIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/filter.js new file mode 100644 index 00000000..3a83a92f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/filter.js @@ -0,0 +1,20 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Creates a new object with all the properties where the callback returns + * true. + */ + function filterValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + output[key] = value; + } + }); + + return output; + } + module.exports = filterValues; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/find.js new file mode 100644 index 00000000..d39c0706 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/find.js @@ -0,0 +1,21 @@ +var some = require('./some'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Returns first item that matches criteria + */ + function find(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result; + some(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + result = value; + return true; //break + } + }); + return result; + } + + module.exports = find; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forIn.js new file mode 100644 index 00000000..367f08ca --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forIn.js @@ -0,0 +1,62 @@ + + + var _hasDontEnumBug, + _dontEnums; + + function checkDontEnum(){ + _dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + + _hasDontEnumBug = true; + + for (var key in {'toString': null}) { + _hasDontEnumBug = false; + } + } + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forIn(obj, fn, thisObj){ + var key, i = 0; + // no need to check if argument is a real object that way we can use + // it for arrays, functions, date, etc. + + //post-pone check till needed + if (_hasDontEnumBug == null) checkDontEnum(); + + for (key in obj) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + + if (_hasDontEnumBug) { + while (key = _dontEnums[i++]) { + // since we aren't using hasOwn check we need to make sure the + // property was overwritten + if (obj[key] !== Object.prototype[key]) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + } + } + } + + function exec(fn, obj, key, thisObj){ + return fn.call(thisObj, obj[key], key, obj); + } + + module.exports = forIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js new file mode 100644 index 00000000..5f2dfbfc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js @@ -0,0 +1,19 @@ +var hasOwn = require('./hasOwn'); +var forIn = require('./forIn'); + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forOwn(obj, fn, thisObj){ + forIn(obj, function(val, key){ + if (hasOwn(obj, key)) { + return fn.call(thisObj, obj[key], key, obj); + } + }); + } + + module.exports = forOwn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/functions.js new file mode 100644 index 00000000..f5717979 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/functions.js @@ -0,0 +1,18 @@ +var forIn = require('./forIn'); + + /** + * return a list of all enumerable properties that have function values + */ + function functions(obj){ + var keys = []; + forIn(obj, function(val, key){ + if (typeof val === 'function'){ + keys.push(key); + } + }); + return keys.sort(); + } + + module.exports = functions; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/get.js new file mode 100644 index 00000000..6673561e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/get.js @@ -0,0 +1,20 @@ + + + /** + * get "nested" object property + */ + function get(obj, prop){ + var parts = prop.split('.'), + last = parts.pop(); + + while (prop = parts.shift()) { + obj = obj[prop]; + if (typeof obj !== 'object') return; + } + + return obj[last]; + } + + module.exports = get; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/has.js new file mode 100644 index 00000000..ca9f2289 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/has.js @@ -0,0 +1,15 @@ +var get = require('./get'); + + var UNDEF; + + /** + * Check if object has nested property. + */ + function has(obj, prop){ + return get(obj, prop) !== UNDEF; + } + + module.exports = has; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js new file mode 100644 index 00000000..7e3c82ae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js @@ -0,0 +1,12 @@ + + + /** + * Safer Object.hasOwnProperty + */ + function hasOwn(obj, prop){ + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + module.exports = hasOwn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/keys.js new file mode 100644 index 00000000..dd2f4f55 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/keys.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object keys + */ + var keys = Object.keys || function (obj) { + var keys = []; + forOwn(obj, function(val, key){ + keys.push(key); + }); + return keys; + }; + + module.exports = keys; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/map.js new file mode 100644 index 00000000..dd449a78 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/map.js @@ -0,0 +1,18 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Creates a new object where all the values are the result of calling + * `callback`. + */ + function mapValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(val, key, obj) { + output[key] = callback(val, key, obj); + }); + + return output; + } + module.exports = mapValues; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/matches.js new file mode 100644 index 00000000..6074faa2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/matches.js @@ -0,0 +1,20 @@ +var forOwn = require('./forOwn'); + + /** + * checks if a object contains all given properties/values + */ + function matches(target, props){ + // can't use "object/every" because of circular dependency + var result = true; + forOwn(props, function(val, key){ + if (target[key] !== val) { + // break loop at first difference + return (result = false); + } + }); + return result; + } + + module.exports = matches; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/max.js new file mode 100644 index 00000000..3e8e92c7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/max.js @@ -0,0 +1,12 @@ +var arrMax = require('../array/max'); +var values = require('./values'); + + /** + * Returns maximum value inside object. + */ + function max(obj, compareFn) { + return arrMax(values(obj), compareFn); + } + + module.exports = max; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/merge.js new file mode 100644 index 00000000..6961f608 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/merge.js @@ -0,0 +1,40 @@ +var hasOwn = require('./hasOwn'); +var deepClone = require('../lang/deepClone'); +var isObject = require('../lang/isObject'); + + /** + * Deep merge objects. + */ + function merge() { + var i = 1, + key, val, obj, target; + + // make sure we don't modify source element and it's properties + // objects are passed by reference + target = deepClone( arguments[0] ); + + while (obj = arguments[i++]) { + for (key in obj) { + if ( ! hasOwn(obj, key) ) { + continue; + } + + val = obj[key]; + + if ( isObject(val) && isObject(target[key]) ){ + // inception, deep merge objects + target[key] = merge(target[key], val); + } else { + // make sure arrays, regexp, date, objects are cloned + target[key] = deepClone(val); + } + + } + } + + return target; + } + + module.exports = merge; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/min.js new file mode 100644 index 00000000..e1e66976 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/min.js @@ -0,0 +1,12 @@ +var arrMin = require('../array/min'); +var values = require('./values'); + + /** + * Returns minimum value inside object. + */ + function min(obj, iterator) { + return arrMin(values(obj), iterator); + } + + module.exports = min; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js new file mode 100644 index 00000000..55ec8fd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js @@ -0,0 +1,28 @@ +var forOwn = require('./forOwn'); + + /** + * Combine properties from all the objects into first one. + * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. + * @param {object} target Target Object + * @param {...object} objects Objects to be combined (0...n objects). + * @return {object} Target Object. + */ + function mixIn(target, objects){ + var i = 0, + n = arguments.length, + obj; + while(++i < n){ + obj = arguments[i]; + if (obj != null) { + forOwn(obj, copyProp, target); + } + } + return target; + } + + function copyProp(val, key){ + this[key] = val; + } + + module.exports = mixIn; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/namespace.js new file mode 100644 index 00000000..c6e79f63 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/namespace.js @@ -0,0 +1,19 @@ +var forEach = require('../array/forEach'); + + /** + * Create nested object if non-existent + */ + function namespace(obj, path){ + if (!path) return obj; + forEach(path.split('.'), function(key){ + if (!obj[key]) { + obj[key] = {}; + } + obj = obj[key]; + }); + return obj; + } + + module.exports = namespace; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pick.js new file mode 100644 index 00000000..74e56f98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pick.js @@ -0,0 +1,18 @@ + + + /** + * Return a copy of the object, filtered to only have values for the whitelisted keys. + */ + function pick(obj, var_keys){ + var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), + out = {}, + i = 0, key; + while (key = keys[i++]) { + out[key] = obj[key]; + } + return out; + } + + module.exports = pick; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pluck.js new file mode 100644 index 00000000..e844df47 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pluck.js @@ -0,0 +1,13 @@ +var map = require('./map'); +var prop = require('../function/prop'); + + /** + * Extract a list of property values. + */ + function pluck(obj, propName){ + return map(obj, prop(propName)); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reduce.js new file mode 100644 index 00000000..6f19a3a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reduce.js @@ -0,0 +1,29 @@ +var forOwn = require('./forOwn'); +var size = require('./size'); + + /** + * Object reduce + */ + function reduce(obj, callback, memo, thisObj) { + var initial = arguments.length > 2; + + if (!size(obj) && !initial) { + throw new Error('reduce of empty object with no initial value'); + } + + forOwn(obj, function(value, key, list) { + if (!initial) { + memo = value; + initial = true; + } + else { + memo = callback.call(thisObj, memo, value, key, list); + } + }); + + return memo; + } + + module.exports = reduce; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reject.js new file mode 100644 index 00000000..74643795 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reject.js @@ -0,0 +1,16 @@ +var filter = require('./filter'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object reject + */ + function reject(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + return filter(obj, function(value, index, obj) { + return !callback(value, index, obj); + }, thisObj); + } + + module.exports = reject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/set.js new file mode 100644 index 00000000..9b3cdc48 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/set.js @@ -0,0 +1,17 @@ +var namespace = require('./namespace'); + + /** + * set "nested" object property + */ + function set(obj, prop, val){ + var parts = (/^(.+)\.(.+)$/).exec(prop); + if (parts){ + namespace(obj, parts[1])[parts[2]] = val; + } else { + obj[prop] = val; + } + } + + module.exports = set; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/size.js new file mode 100644 index 00000000..97885953 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/size.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object size + */ + function size(obj) { + var count = 0; + forOwn(obj, function(){ + count++; + }); + return count; + } + + module.exports = size; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/some.js new file mode 100644 index 00000000..384c6f3c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/some.js @@ -0,0 +1,21 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object some + */ + function some(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + forOwn(obj, function(val, key) { + if (callback(val, key, obj)) { + result = true; + return false; // break + } + }); + return result; + } + + module.exports = some; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/unset.js new file mode 100644 index 00000000..343bca0a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/unset.js @@ -0,0 +1,23 @@ +var has = require('./has'); + + /** + * Unset object property. + */ + function unset(obj, prop){ + if (has(obj, prop)) { + var parts = prop.split('.'), + last = parts.pop(); + while (prop = parts.shift()) { + obj = obj[prop]; + } + return (delete obj[last]); + + } else { + // if property doesn't exist treat as deleted + return true; + } + } + + module.exports = unset; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/values.js new file mode 100644 index 00000000..265a6938 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/values.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object values + */ + function values(obj) { + var vals = []; + forOwn(obj, function(val, key){ + vals.push(val); + }); + return vals; + } + + module.exports = values; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/package.json new file mode 100644 index 00000000..76eadf21 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/package.json @@ -0,0 +1,123 @@ +{ + "name": "mout", + "description": "Modular Utilities", + "version": "0.6.0", + "homepage": "http://moutjs.com/", + "contributors": [ + { + "name": "Adam Nowotny" + }, + { + "name": "André Cruz", + "email": "amdfcruz@gmail.com" + }, + { + "name": "Conrad Zimmerman", + "url": "http://www.conradz.com" + }, + { + "name": "Friedemann Altrock", + "email": "frodenius@gmail.com" + }, + { + "name": "Jarrod Overson", + "url": "http://jarrodoverson.com" + }, + { + "name": "Miller Medeiros", + "email": "contact@millermedeiros.com", + "url": "http://blog.millermedeiros.com" + }, + { + "name": "Zach Shipley" + } + ], + "keywords": [ + "utilities", + "functional", + "amd-utils", + "stdlib" + ], + "repository": { + "type": "git", + "url": "git://github.com/mout/mout.git" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/mit-license.php" + } + ], + "bugs": { + "url": "https://github.com/mout/mout/issues/" + }, + "main": "./index.js", + "scripts": { + "prepublish": "node build cjs .", + "pretest": "node build pkg", + "test": "node node_modules/istanbul/lib/cli test tests/runner.js --hook-run-in-context" + }, + "directories": { + "doc": "./doc" + }, + "devDependencies": { + "istanbul": "~0.1.27", + "jasmine-node": "~1.2.2", + "requirejs": "2.x", + "nodefy": "*", + "mdoc": "~0.3.2", + "handlebars": "~1.0.6", + "commander": "~1.0.5", + "rocambole": "~0.2.3" + }, + "testling": { + "preprocess": "node build testling", + "browsers": { + "ie": [ + 7, + 8, + 9, + 10 + ], + "firefox": [ + 17, + "nightly" + ], + "chrome": [ + 23, + "canary" + ], + "opera": [ + 12, + "next" + ], + "safari": [ + 5.1, + 6 + ], + "iphone": [ + 6 + ], + "ipad": [ + 6 + ] + }, + "scripts": [ + "tests/lib/jasmine/jasmine.js", + "tests/lib/jasmine/jasmine.async.js", + "tests/lib/jasmine/jasmine-tap.js", + "tests/lib/requirejs/require.js", + "tests/testling/src.js", + "tests/testling/specs.js", + "tests/runner.js" + ] + }, + "readme": "![mout](http://moutjs.com/logo.png \"Modular JavaScript Utilties\")\n\nhttp://moutjs.com/\n\n[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout)\n\nAll code is library agnostic and consist mostly of helper methods that aren't\ndirectly related with the DOM, the purpose of this library isn't to replace\nDojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common\nproblems that aren't solved by most of them. Consider it as a crossbrowser\nJavaScript standard library.\n\n\n\n## Main goals ##\n\n - increase code reuse;\n - be clear (code should be clean/readable);\n - be easy to debug;\n - be easy to maintain;\n - follow best practices;\n - follow standards when possible;\n - **don't convert JavaScript into another language!**\n - be compatible with other frameworks;\n - be modular;\n - have unit tests for all modules;\n - work on multiple environments (IE7+, modern browsers, node.js);\n\n\n\n## What shouldn't be here ##\n\n - UI components;\n - CSS selector engine;\n - Event system - pub/sub;\n - Template engine;\n - Anything that isn't generic enough to be on a standard library;\n - Anything that could be a separate library and/or isn't a modular utility...\n\n\n\n## API Documentation ##\n\nOnline documentation can be found at http://moutjs.com/ or inside the\n`doc` folder.\n\n\n\n## FAQ / Wiki / IRC ##\n\nFor more info about project structure, design decisions, tips, how to\ncontribute, build system, etc, please check the [project\nwiki](https://github.com/mout/mout/wiki).\n\nWe also have an IRC channel [#moutjs on\nirc.freenode.net](http://webchat.freenode.net/?channels=moutjs)\n\n\n\n## License ##\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n\n", + "readmeFilename": "README.md", + "_id": "mout@0.6.0", + "dist": { + "shasum": "d2f7a6e5a796040bf7b6259a41b46705f49d271d" + }, + "_from": "mout@~0.6.0", + "_resolved": "https://registry.npmjs.org/mout/-/mout-0.6.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString.js new file mode 100644 index 00000000..22685a7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString.js @@ -0,0 +1,15 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'contains' : require('./queryString/contains'), + 'decode' : require('./queryString/decode'), + 'encode' : require('./queryString/encode'), + 'getParam' : require('./queryString/getParam'), + 'getQuery' : require('./queryString/getQuery'), + 'parse' : require('./queryString/parse'), + 'setParam' : require('./queryString/setParam') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js new file mode 100644 index 00000000..da678cf4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js @@ -0,0 +1,12 @@ +var getQuery = require('./getQuery'); + + /** + * Checks if query string contains parameter. + */ + function contains(url, paramName) { + var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` + return regex.test(getQuery(url)); + } + + module.exports = contains; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js new file mode 100644 index 00000000..7e689990 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js @@ -0,0 +1,21 @@ +var typecast = require('../string/typecast'); +var isString = require('../lang/isString'); + + /** + * Decode query string into an object of keys => vals. + */ + function decode(queryStr, shouldTypecast) { + var queryArr = (queryStr || '').replace('?', '').split('&'), + n = queryArr.length, + obj = {}, + item, val; + while (n--) { + item = queryArr[n].split('='); + val = shouldTypecast === false? item[1] : typecast(item[1]); + obj[item[0]] = isString(val)? decodeURIComponent(val) : val; + } + return obj; + } + + module.exports = decode; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js new file mode 100644 index 00000000..6d2b12f8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js @@ -0,0 +1,15 @@ +var forOwn = require('../object/forOwn'); + + /** + * Encode object into a query string. + */ + function encode(obj){ + var query = []; + forOwn(obj, function(val, key){ + query.push( key +'='+ encodeURIComponent(val) ); + }); + return (query.length)? '?'+ query.join('&') : ''; + } + + module.exports = encode; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js new file mode 100644 index 00000000..f149c3ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js @@ -0,0 +1,15 @@ +var typecast = require('../string/typecast'); +var getQuery = require('./getQuery'); + + /** + * Get query parameter value. + */ + function getParam(url, param, shouldTypecast){ + var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 + result = regexp.exec( getQuery(url) ), + val = (result && result[2])? result[2] : null; + return shouldTypecast === false? val : typecast(val); + } + + module.exports = getParam; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js new file mode 100644 index 00000000..5194af2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js @@ -0,0 +1,13 @@ + + + /** + * Gets full query as string with all special chars decoded. + */ + function getQuery(url) { + url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) + var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt + return (queryString)? decodeURIComponent(queryString[0]) : ''; + } + + module.exports = getQuery; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js new file mode 100644 index 00000000..532906c0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js @@ -0,0 +1,13 @@ +var decode = require('./decode'); +var getQuery = require('./getQuery'); + + /** + * Get query string, parses and decodes it. + */ + function parse(url, shouldTypecast) { + return decode(getQuery(url), shouldTypecast); + } + + module.exports = parse; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js new file mode 100644 index 00000000..052a9ba6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js @@ -0,0 +1,28 @@ + + + /** + * Set query string parameter value + */ + function setParam(url, paramName, value){ + url = url || ''; + + var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); + var param = paramName +'='+ encodeURIComponent( value ); + + if ( re.test(url) ) { + return url.replace(re, '$1'+ param); + } else { + if (url.indexOf('?') === -1) { + url += '?'; + } + if (url.indexOf('=') !== -1) { + url += '&'; + } + return url + param; + } + + } + + module.exports = setParam; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random.js new file mode 100644 index 00000000..d9267f01 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random.js @@ -0,0 +1,16 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'choice' : require('./random/choice'), + 'guid' : require('./random/guid'), + 'rand' : require('./random/rand'), + 'randBit' : require('./random/randBit'), + 'randHex' : require('./random/randHex'), + 'randInt' : require('./random/randInt'), + 'randSign' : require('./random/randSign'), + 'random' : require('./random/random') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/choice.js new file mode 100644 index 00000000..51aa82a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/choice.js @@ -0,0 +1,15 @@ +var randInt = require('./randInt'); +var isArray = require('../lang/isArray'); + + /** + * Returns a random element from the supplied arguments + * or from the array (if single argument is an array). + */ + function choice(items) { + var target = (arguments.length === 1 && isArray(items))? items : arguments; + return target[ randInt(0, target.length - 1) ]; + } + + module.exports = choice; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/guid.js new file mode 100644 index 00000000..41f6eddc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/guid.js @@ -0,0 +1,24 @@ +var randHex = require('./randHex'); +var choice = require('./choice'); + + /** + * Returns pseudo-random guid (UUID v4) + * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random + * by default and sequences can be predicted in some cases. See the + * "random/random" documentation for more info about it and how to replace + * the default PRNG. + */ + function guid() { + return ( + randHex(8)+'-'+ + randHex(4)+'-'+ + // v4 UUID always contain "4" at this position to specify it was + // randomly generated + '4' + randHex(3) +'-'+ + // v4 UUID always contain chars [a,b,8,9] at this position + choice(8, 9, 'a', 'b') + randHex(3)+'-'+ + randHex(12) + ); + } + module.exports = guid; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/rand.js new file mode 100644 index 00000000..782dec88 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/rand.js @@ -0,0 +1,15 @@ +var random = require('./random'); +var MIN_INT = require('../number/MIN_INT'); +var MAX_INT = require('../number/MAX_INT'); + + /** + * Returns random number inside range + */ + function rand(min, max){ + min = min == null? MIN_INT : min; + max = max == null? MAX_INT : max; + return min + (max - min) * random(); + } + + module.exports = rand; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randBit.js new file mode 100644 index 00000000..bd20b4a0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randBit.js @@ -0,0 +1,11 @@ +var random = require('./random'); + + /** + * Returns random bit (0 or 1) + */ + function randomBit() { + return random() > 0.5? 1 : 0; + } + + module.exports = randomBit; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randHex.js new file mode 100644 index 00000000..d8d711c3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randHex.js @@ -0,0 +1,19 @@ +var choice = require('./choice'); + + var _chars = '0123456789abcdef'.split(''); + + /** + * Returns a random hexadecimal string + */ + function randHex(size){ + size = size && size > 0? size : 6; + var str = ''; + while (size--) { + str += choice(_chars); + } + return str; + } + + module.exports = randHex; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randInt.js new file mode 100644 index 00000000..e237d964 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randInt.js @@ -0,0 +1,18 @@ +var MIN_INT = require('../number/MIN_INT'); +var MAX_INT = require('../number/MAX_INT'); +var rand = require('./rand'); + + /** + * Gets random integer inside range or snap to min/max values. + */ + function randInt(min, max){ + min = min == null? MIN_INT : ~~min; + max = max == null? MAX_INT : ~~max; + // can't be max + 0.5 otherwise it will round up if `rand` + // returns `max` causing it to overflow range. + // -0.5 and + 0.49 are required to avoid bias caused by rounding + return Math.round( rand(min - 0.5, max + 0.499999999999) ); + } + + module.exports = randInt; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randSign.js new file mode 100644 index 00000000..5a9fed76 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randSign.js @@ -0,0 +1,11 @@ +var random = require('./random'); + + /** + * Returns random sign (-1 or 1) + */ + function randomSign() { + return random() > 0.5? 1 : -1; + } + + module.exports = randomSign; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/random.js new file mode 100644 index 00000000..670a3cc4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/random.js @@ -0,0 +1,18 @@ + + + /** + * Just a wrapper to Math.random. No methods inside mout/random should call + * Math.random() directly so we can inject the pseudo-random number + * generator if needed (ie. in case we need a seeded random or a better + * algorithm than the native one) + */ + function random(){ + return random.get(); + } + + // we expose the method so it can be swapped if needed + random.get = Math.random; + + module.exports = random; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array.js new file mode 100644 index 00000000..7bcc961b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array.js @@ -0,0 +1,46 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'append' : require('./array/append'), + 'collect' : require('./array/collect'), + 'combine' : require('./array/combine'), + 'compact' : require('./array/compact'), + 'contains' : require('./array/contains'), + 'difference' : require('./array/difference'), + 'every' : require('./array/every'), + 'filter' : require('./array/filter'), + 'find' : require('./array/find'), + 'findIndex' : require('./array/findIndex'), + 'flatten' : require('./array/flatten'), + 'forEach' : require('./array/forEach'), + 'indexOf' : require('./array/indexOf'), + 'insert' : require('./array/insert'), + 'intersection' : require('./array/intersection'), + 'invoke' : require('./array/invoke'), + 'join' : require('./array/join'), + 'lastIndexOf' : require('./array/lastIndexOf'), + 'map' : require('./array/map'), + 'max' : require('./array/max'), + 'min' : require('./array/min'), + 'pick' : require('./array/pick'), + 'pluck' : require('./array/pluck'), + 'range' : require('./array/range'), + 'reduce' : require('./array/reduce'), + 'reduceRight' : require('./array/reduceRight'), + 'reject' : require('./array/reject'), + 'remove' : require('./array/remove'), + 'removeAll' : require('./array/removeAll'), + 'shuffle' : require('./array/shuffle'), + 'some' : require('./array/some'), + 'sort' : require('./array/sort'), + 'split' : require('./array/split'), + 'toLookup' : require('./array/toLookup'), + 'union' : require('./array/union'), + 'unique' : require('./array/unique'), + 'xor' : require('./array/xor'), + 'zip' : require('./array/zip') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/append.js new file mode 100644 index 00000000..549d8754 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/append.js @@ -0,0 +1,21 @@ +define(function () { + + /** + * Appends an array to the end of another. + * The first array will be modified. + */ + function append(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var pad = arr1.length, + i = -1, + len = arr2.length; + while (++i < len) { + arr1[pad + i] = arr2[i]; + } + return arr1; + } + return append; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js new file mode 100644 index 00000000..8f60cda2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js @@ -0,0 +1,26 @@ +define(['./append', '../function/makeIterator_'], function (append, makeIterator) { + + /** + * Maps the items in the array and concatenates the result arrays. + */ + function collect(arr, callback, thisObj){ + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + var value = callback(arr[i], i, arr); + if (value != null) { + append(results, value); + } + } + + return results; + } + + return collect; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js new file mode 100644 index 00000000..22efb860 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js @@ -0,0 +1,22 @@ +define(['./indexOf'], function (indexOf) { + + /** + * Combines an array with all the items of another. + * Does not allow duplicates and is case and type sensitive. + */ + function combine(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var i = -1, len = arr2.length; + while (++i < len) { + if (indexOf(arr1, arr2[i]) === -1) { + arr1.push(arr2[i]); + } + } + + return arr1; + } + return combine; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js new file mode 100644 index 00000000..02a81098 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js @@ -0,0 +1,13 @@ +define(['./filter'], function (filter) { + + /** + * Remove all null/undefined items from array. + */ + function compact(arr) { + return filter(arr, function(val){ + return (val != null); + }); + } + + return compact; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js new file mode 100644 index 00000000..fca4f7cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js @@ -0,0 +1,10 @@ +define(['./indexOf'], function (indexOf) { + + /** + * If array contains values. + */ + function contains(arr, val) { + return indexOf(arr, val) !== -1; + } + return contains; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js new file mode 100644 index 00000000..819bda3e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js @@ -0,0 +1,19 @@ +define(['./unique', './filter', './some', './contains'], function (unique, filter, some, contains) { + + + /** + * Return a new Array with elements that aren't present in the other Arrays. + */ + function difference(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return !some(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + return difference; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/every.js new file mode 100644 index 00000000..78ba46d3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/every.js @@ -0,0 +1,27 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Array every + */ + function every(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (!callback(arr[i], i, arr) ) { + result = false; + break; + } + } + + return result; + } + + return every; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js new file mode 100644 index 00000000..52cf685a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js @@ -0,0 +1,26 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Array filter + */ + function filter(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + return filter; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/find.js new file mode 100644 index 00000000..3957dcd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/find.js @@ -0,0 +1,13 @@ +define(['./findIndex'], function (findIndex) { + + /** + * Returns first item that matches criteria + */ + function find(arr, iterator, thisObj){ + var idx = findIndex(arr, iterator, thisObj); + return idx >= 0? arr[idx] : void(0); + } + + return find; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js new file mode 100644 index 00000000..59dfeeb9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js @@ -0,0 +1,23 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Returns the index of the first item that matches criteria + */ + function findIndex(arr, iterator, thisObj){ + iterator = makeIterator(iterator, thisObj); + if (arr == null) { + return -1; + } + + var i = -1, len = arr.length; + while (++i < len) { + if (iterator(arr[i], i, arr)) { + return i; + } + } + + return -1; + } + + return findIndex; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js new file mode 100644 index 00000000..42e87f43 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js @@ -0,0 +1,42 @@ +define(['../lang/isArray', './append'], function (isArray, append) { + + /* + * Helper function to flatten to a destination array. + * Used to remove the need to create intermediate arrays while flattening. + */ + function flattenTo(arr, result, level) { + if (arr == null) { + return result; + } else if (level === 0) { + append(result, arr); + return result; + } + + var value, + i = -1, + len = arr.length; + while (++i < len) { + value = arr[i]; + if (isArray(value)) { + flattenTo(value, result, level - 1); + } else { + result.push(value); + } + } + return result; + } + + /** + * Recursively flattens an array. + * A new array containing all the elements is returned. + * If `shallow` is true, it will only flatten one level. + */ + function flatten(arr, level) { + level = level == null? -1 : level; + return flattenTo(arr, [], level); + } + + return flatten; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js new file mode 100644 index 00000000..0e045868 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Array forEach + */ + function forEach(arr, callback, thisObj) { + if (arr == null) { + return; + } + var i = -1, + len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback.call(thisObj, arr[i], i, arr) === false ) { + break; + } + } + } + + return forEach; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js new file mode 100644 index 00000000..0e75f99b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Array.indexOf + */ + function indexOf(arr, item, fromIndex) { + fromIndex = fromIndex || 0; + if (arr == null) { + return -1; + } + + var len = arr.length, + i = fromIndex < 0 ? len + fromIndex : fromIndex; + while (i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[i] === item) { + return i; + } + + i++; + } + + return -1; + } + + return indexOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js new file mode 100644 index 00000000..d8d831f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js @@ -0,0 +1,14 @@ +define(['./difference', '../lang/toArray'], function (difference, toArray) { + + /** + * Insert item into array if not already present. + */ + function insert(arr, rest_items) { + var diff = difference(toArray(arguments).slice(1), arr); + if (diff.length) { + Array.prototype.push.apply(arr, diff); + } + return arr.length; + } + return insert; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js new file mode 100644 index 00000000..64e6ee97 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js @@ -0,0 +1,20 @@ +define(['./unique', './filter', './every', './contains'], function (unique, filter, every, contains) { + + + /** + * Return a new Array with elements common to all Arrays. + * - based on underscore.js implementation + */ + function intersection(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return every(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + return intersection; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js new file mode 100644 index 00000000..a2e78b39 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js @@ -0,0 +1,23 @@ +define(['./forEach'], function (forEach) { + + /** + * Call `methodName` on each item of the array passing custom arguments if + * needed. + */ + function invoke(arr, methodName, var_args){ + if (arr == null) { + return arr; + } + + var args = Array.prototype.slice.call(arguments, 2); + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + value[methodName].apply(value, args); + } + + return arr; + } + + return invoke; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/join.js new file mode 100644 index 00000000..2c618d29 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/join.js @@ -0,0 +1,17 @@ +define(['./filter'], function(filter) { + + function isValidString(val) { + return (val != null && val !== ''); + } + + /** + * Joins strings with the specified separator inserted between each value. + * Null values and empty strings will be excluded. + */ + function join(items, separator) { + separator = separator || ''; + return filter(items, isValidString).join(separator); + } + + return join; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js new file mode 100644 index 00000000..931235f4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Array lastIndexOf + */ + function lastIndexOf(arr, item, fromIndex) { + if (arr == null) { + return -1; + } + + var len = arr.length; + fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; + fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; + + while (fromIndex >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[fromIndex] === item) { + return fromIndex; + } + fromIndex--; + } + + return -1; + } + + return lastIndexOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/map.js new file mode 100644 index 00000000..1580b481 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/map.js @@ -0,0 +1,22 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Array map + */ + function map(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null){ + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + results[i] = callback(arr[i], i, arr); + } + + return results; + } + + return map; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/max.js new file mode 100644 index 00000000..a7326c89 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/max.js @@ -0,0 +1,34 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Return maximum value inside array + */ + function max(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return Infinity; + } else if (arr.length && !iterator) { + return Math.max.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = -Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp > compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + return max; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/min.js new file mode 100644 index 00000000..41644480 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/min.js @@ -0,0 +1,34 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Return minimum value inside array + */ + function min(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return -Infinity; + } else if (arr.length && !iterator) { + return Math.min.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp < compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + return min; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js new file mode 100644 index 00000000..97d7f595 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js @@ -0,0 +1,14 @@ +define(['../random/randInt'], function (randInt) { + + /** + * Remove a random item from the Array and return it + */ + function pick(arr){ + if (arr == null || !arr.length) return; + var idx = randInt(0, arr.length - 1); + return arr.splice(idx, 1)[0]; + } + + return pick; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js new file mode 100644 index 00000000..c908856e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js @@ -0,0 +1,12 @@ +define(['./map'], function (map) { + + /** + * Extract a list of property values. + */ + function pluck(arr, propName){ + return map(arr, propName); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/range.js new file mode 100644 index 00000000..148ebf96 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/range.js @@ -0,0 +1,27 @@ +define(['../math/countSteps'], function (countSteps) { + + /** + * Returns an Array of numbers inside range. + */ + function range(start, stop, step) { + if (stop == null) { + stop = start; + start = 0; + } + step = step || 1; + + var result = [], + nSteps = countSteps(stop - start, step), + i = start; + + while (i <= stop) { + result.push(i); + i += step; + } + + return result; + } + + return range; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js new file mode 100644 index 00000000..88aacfd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js @@ -0,0 +1,33 @@ +define(['./forEach'], function (forEach) { + + /** + * Array reduce + */ + function reduce(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2, + result = initVal; + + if (arr == null || !arr.length) { + if (!hasInit) { + throw new Error('reduce of empty array with no initial value'); + } else { + return initVal; + } + } + + var i = -1, len = arr.length; + while (++i < len) { + if (!hasInit) { + result = arr[i]; + hasInit = true; + } else { + result = fn(result, arr[i], i, arr); + } + } + + return result; + } + + return reduce; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js new file mode 100644 index 00000000..ddae0e7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js @@ -0,0 +1,34 @@ +define(function () { + + /** + * Array reduceRight + */ + function reduceRight(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2; + + if (arr == null || !arr.length) { + if (hasInit) { + return initVal; + } else { + throw new Error('reduce of empty array with no initial value'); + } + } + + var i = arr.length, result = initVal, value; + while (--i >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + value = arr[i]; + if (!hasInit) { + result = value; + hasInit = true; + } else { + result = fn(result, value, i, arr); + } + } + return result; + } + + return reduceRight; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js new file mode 100644 index 00000000..db105dde --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js @@ -0,0 +1,25 @@ +define(['./forEach', '../function/makeIterator_'], function(forEach, makeIterator) { + + /** + * Array reject + */ + function reject(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (!callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + return reject; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js new file mode 100644 index 00000000..dec9134d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js @@ -0,0 +1,13 @@ +define(['./indexOf'], function(indexOf){ + + /** + * Remove a single item from the array. + * (it won't remove duplicates, just a single item) + */ + function remove(arr, item){ + var idx = indexOf(arr, item); + if (idx !== -1) arr.splice(idx, 1); + } + + return remove; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js new file mode 100644 index 00000000..e81022b8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js @@ -0,0 +1,15 @@ +define(['./indexOf'], function(indexOf){ + + /** + * Remove all instances of an item from array. + */ + function removeAll(arr, item){ + var idx = indexOf(arr, item); + while (idx !== -1) { + arr.splice(idx, 1); + idx = indexOf(arr, item, idx); + } + } + + return removeAll; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js new file mode 100644 index 00000000..f5a60972 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js @@ -0,0 +1,28 @@ +define(['../random/randInt', './forEach'], function (randInt, forEach) { + + /** + * Shuffle array items. + */ + function shuffle(arr) { + var results = [], + rnd; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + if (!i) { + results[0] = arr[0]; + } else { + rnd = randInt(0, i); + results[i] = results[rnd]; + results[rnd] = arr[i]; + } + } + + return results; + } + + return shuffle; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/some.js new file mode 100644 index 00000000..e46a9781 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/some.js @@ -0,0 +1,27 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Array some + */ + function some(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback(arr[i], i, arr) ) { + result = true; + break; + } + } + + return result; + } + + return some; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js new file mode 100644 index 00000000..4c194042 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js @@ -0,0 +1,55 @@ +define(function () { + + /** + * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) + */ + function mergeSort(arr, compareFn) { + if (arr == null) { + return []; + } else if (arr.length < 2) { + return arr; + } + + if (compareFn == null) { + compareFn = defaultCompare; + } + + var mid, left, right; + + mid = ~~(arr.length / 2); + left = mergeSort( arr.slice(0, mid), compareFn ); + right = mergeSort( arr.slice(mid, arr.length), compareFn ); + + return merge(left, right, compareFn); + } + + function defaultCompare(a, b) { + return a < b ? -1 : (a > b? 1 : 0); + } + + function merge(left, right, compareFn) { + var result = []; + + while (left.length && right.length) { + if (compareFn(left[0], right[0]) <= 0) { + // if 0 it should preserve same order (stable) + result.push(left.shift()); + } else { + result.push(right.shift()); + } + } + + if (left.length) { + result.push.apply(result, left); + } + + if (right.length) { + result.push.apply(result, right); + } + + return result; + } + + return mergeSort; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/split.js new file mode 100644 index 00000000..a17275eb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/split.js @@ -0,0 +1,35 @@ +define(function() { + + /** + * Split array into a fixed number of segments. + */ + function split(array, segments) { + segments = segments || 2; + var results = []; + if (array == null) { + return results; + } + + var minLength = Math.floor(array.length / segments), + remainder = array.length % segments, + i = 0, + len = array.length, + segmentIndex = 0, + segmentLength; + + while (i < len) { + segmentLength = minLength; + if (segmentIndex < remainder) { + segmentLength++; + } + + results.push(array.slice(i, i + segmentLength)); + + segmentIndex++; + i += segmentLength; + } + + return results; + } + return split; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js new file mode 100644 index 00000000..aac8fd1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js @@ -0,0 +1,28 @@ +define(['../lang/isFunction'], function (isFunction) { + + /** + * Creates an object that holds a lookup for the objects in the array. + */ + function toLookup(arr, key) { + var result = {}; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length, value; + if (isFunction(key)) { + while (++i < len) { + value = arr[i]; + result[key(value)] = value; + } + } else { + while (++i < len) { + value = arr[i]; + result[value[key]] = value; + } + } + + return result; + } + return toLookup; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/union.js new file mode 100644 index 00000000..5f9922e5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/union.js @@ -0,0 +1,18 @@ +define(['./unique', './append'], function (unique, append) { + + /** + * Concat multiple arrays and remove duplicates + */ + function union(arrs) { + var results = []; + var i = -1, len = arguments.length; + while (++i < len) { + append(results, arguments[i]); + } + + return unique(results); + } + + return union; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js new file mode 100644 index 00000000..c4bd23b4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js @@ -0,0 +1,16 @@ +define(['./indexOf', './filter'], function(indexOf, filter){ + + /** + * @return {array} Array of unique items + */ + function unique(arr){ + return filter(arr, isUnique); + } + + function isUnique(item, i, arr){ + return indexOf(arr, item, i+1) === -1; + } + + return unique; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js new file mode 100644 index 00000000..7df89d9c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js @@ -0,0 +1,24 @@ +define(['./unique', './filter', './contains'], function (unique, filter, contains) { + + + /** + * Exclusive OR. Returns items that are present in a single array. + * - like ptyhon's `symmetric_difference` + */ + function xor(arr1, arr2) { + arr1 = unique(arr1); + arr2 = unique(arr2); + + var a1 = filter(arr1, function(item){ + return !contains(arr2, item); + }), + a2 = filter(arr2, function(item){ + return !contains(arr1, item); + }); + + return a1.concat(a2); + } + + return xor; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js new file mode 100644 index 00000000..374cd282 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js @@ -0,0 +1,27 @@ +define(['./max', './pluck', './map'], function (max, pluck, map) { + + function getLength(arr) { + return arr == null ? 0 : arr.length; + } + + /** + * Merges together the values of each of the arrays with the values at the + * corresponding position. + */ + function zip(arr){ + var len = arr ? max(map(arguments, getLength)) : 0, + results = [], + i = -1, + item; + while (++i < len) { + results.push(map(arguments, function(item) { + return item == null ? undefined : item[i]; + })); + } + + return results; + } + + return zip; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection.js new file mode 100644 index 00000000..386e6da9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection.js @@ -0,0 +1,22 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'contains' : require('./collection/contains'), + 'every' : require('./collection/every'), + 'filter' : require('./collection/filter'), + 'find' : require('./collection/find'), + 'forEach' : require('./collection/forEach'), + 'make_' : require('./collection/make_'), + 'map' : require('./collection/map'), + 'max' : require('./collection/max'), + 'min' : require('./collection/min'), + 'pluck' : require('./collection/pluck'), + 'reduce' : require('./collection/reduce'), + 'reject' : require('./collection/reject'), + 'size' : require('./collection/size'), + 'some' : require('./collection/some') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js new file mode 100644 index 00000000..192167e8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { + + /** + */ + return make(arrContains, objContains); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js new file mode 100644 index 00000000..6317f503 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { + + /** + */ + return make(arrEvery, objEvery); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js new file mode 100644 index 00000000..4e7fadc8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js @@ -0,0 +1,22 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * filter collection values, returns array. + */ + function filter(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + var results = []; + if (!list) { + return results; + } + forEach(list, function(value, index, list) { + if (iterator(value, index, list)) { + results[results.length] = value; + } + }); + return results; + } + + return filter; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js new file mode 100644 index 00000000..681f9414 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { + + /** + * Find value that returns true on iterator check. + */ + return make(arrFind, objFind); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js new file mode 100644 index 00000000..3b39d3ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { + + /** + */ + return make(arrForEach, objForEach); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js new file mode 100644 index 00000000..312e0564 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js @@ -0,0 +1,19 @@ +define(function(){ + + /** + * internal method used to create other collection modules. + */ + function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { + return function(){ + var args = Array.prototype.slice.call(arguments); + if (args[0] == null) { + return defaultReturn; + } + // array-like is treated as array + return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); + }; + } + + return makeCollectionMethod; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js new file mode 100644 index 00000000..96e24987 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js @@ -0,0 +1,20 @@ +define(['../lang/isObject', '../object/values', '../array/map', '../function/makeIterator_'], function (isObject, values, arrMap, makeIterator) { + + /** + * Map collection values, returns Array. + */ + function map(list, callback, thisObj) { + callback = makeIterator(callback, thisObj); + // list.length to check array-like object, if not array-like + // we simply map all the object values + if( isObject(list) && list.length == null ){ + list = values(list); + } + return arrMap(list, function (val, key, list) { + return callback(val, key, list); + }); + } + + return map; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js new file mode 100644 index 00000000..de9a6da5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { + + /** + * Get maximum value inside collection + */ + return make(arrMax, objMax); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js new file mode 100644 index 00000000..f0c239a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { + + /** + * Get minimum value inside collection. + */ + return make(arrMin, objMin); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js new file mode 100644 index 00000000..ef784a7a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js @@ -0,0 +1,14 @@ +define(['./map'], function (map) { + + /** + * Extract a list of property values. + */ + function pluck(list, key) { + return map(list, function(value) { + return value[key]; + }); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js new file mode 100644 index 00000000..bd05d43d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { + + /** + */ + return make(arrReduce, objReduce); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js new file mode 100644 index 00000000..581adfdc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js @@ -0,0 +1,15 @@ +define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { + + /** + * Inverse or collection/filter + */ + function reject(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + return filter(list, function(value, index, list) { + return !iterator(value, index, list); + }, thisObj); + } + + return reject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js new file mode 100644 index 00000000..4e5ab419 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js @@ -0,0 +1,18 @@ +define(['../lang/isArray', '../object/size'], function (isArray, objSize) { + + /** + * Get collection size + */ + function size(list) { + if (!list) { + return 0; + } + if (isArray(list)) { + return list.length; + } + return objSize(list); + } + + return size; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js new file mode 100644 index 00000000..c0aebee2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { + + /** + */ + return make(arrSome, objSome); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date.js new file mode 100644 index 00000000..4d449150 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date.js @@ -0,0 +1,21 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'dayOfTheYear' : require('./date/dayOfTheYear'), + 'diff' : require('./date/diff'), + 'i18n_' : require('./date/i18n_'), + 'isLeapYear' : require('./date/isLeapYear'), + 'isSame' : require('./date/isSame'), + 'parseIso' : require('./date/parseIso'), + 'startOf' : require('./date/startOf'), + 'strftime' : require('./date/strftime'), + 'timezoneAbbr' : require('./date/timezoneAbbr'), + 'timezoneOffset' : require('./date/timezoneOffset'), + 'totalDaysInMonth' : require('./date/totalDaysInMonth'), + 'totalDaysInYear' : require('./date/totalDaysInYear'), + 'weekOfTheYear' : require('./date/weekOfTheYear') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js new file mode 100644 index 00000000..dc77ae1b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js @@ -0,0 +1,13 @@ +define(['../lang/isDate'], function (isDate) { + + /** + * return the day of the year (1..366) + */ + function dayOfTheYear(date){ + return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - + Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; + } + + return dayOfTheYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js new file mode 100644 index 00000000..667165fe --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js @@ -0,0 +1,128 @@ +define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){ + + /** + * calculate the difference between dates (range) + */ + function diff(start, end, unitName){ + // sort the dates to make it easier to process (specially year/month) + if (start > end) { + var swap = start; + start = end; + end = swap; + } + + var output; + + if (unitName === 'month') { + output = getMonthsDiff(start, end); + } else if (unitName === 'year'){ + output = getYearsDiff(start, end); + } else if (unitName != null) { + if (unitName === 'day') { + // ignore timezone difference because of daylight savings time + start = toUtc(start); + end = toUtc(end); + } + output = convert(end - start, 'ms', unitName); + } else { + output = end - start; + } + + return output; + } + + + function toUtc(d){ + // we ignore timezone differences on purpose because of daylight + // savings time, otherwise it would return fractional days/weeks even + // if a full day elapsed. eg: + // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) + // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) + // diff should be 4 days and not 4.041666666666667 + return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getHours(), d.getMinutes(), d.getSeconds(), + d.getMilliseconds()); + } + + + function getMonthsDiff(start, end){ + return getElapsedMonths(start, end) + + getElapsedYears(start, end) * 12 + + getFractionalMonth(start, end); + } + + + function getYearsDiff(start, end){ + var elapsedYears = getElapsedYears(start, end); + return elapsedYears + getFractionalYear(start, end, elapsedYears); + } + + + function getElapsedMonths(start, end){ + var monthDiff = end.getMonth() - start.getMonth(); + if (monthDiff < 0) { + monthDiff += 12; + } + // less than a full month + if (start.getDate() > end.getDate()) { + monthDiff -= 1; + } + return monthDiff; + } + + + function getElapsedYears(start, end){ + var yearDiff = end.getFullYear() - start.getFullYear(); + // less than a full year + if (start.getMonth() > end.getMonth()) { + yearDiff -= 1; + } + return yearDiff; + } + + + function getFractionalMonth(start, end){ + var fractionalDiff = 0; + var startDay = start.getDate(); + var endDay = end.getDate(); + + if (startDay !== endDay) { + var startTotalDays = totalDaysInMonth(start); + var endTotalDays = totalDaysInMonth(end); + var totalDays; + var daysElapsed; + + if (startDay > endDay) { + // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) + var baseDay = startTotalDays - startDay; + daysElapsed = endDay + baseDay; + // total days should be relative to 1st day of next month if + // startDay > endTotalDays + totalDays = (startDay > endTotalDays)? + endTotalDays + baseDay + 1 : startDay + baseDay; + } else { + // fractional is only based on endMonth eg: Jan 12 - Feb 18 + // (6 fractional days, 28 days until next full month) + daysElapsed = endDay - startDay; + totalDays = endTotalDays; + } + + fractionalDiff = daysElapsed / totalDays; + } + + return fractionalDiff; + } + + + function getFractionalYear(start, end, elapsedYears){ + var base = elapsedYears? + new Date(end.getFullYear(), start.getMonth(), start.getDate()) : + start; + var elapsedDays = diff(base, end, 'day'); + return elapsedDays / totalDaysInYear(end); + } + + + return diff; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js new file mode 100644 index 00000000..5e640c22 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js @@ -0,0 +1,61 @@ +define(function(){ + // en-US (English, United States) + return { + "am" : "AM", + "pm" : "PM", + + "x": "%m/%d/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %I:%M:%S %p %Z", + + "months" : [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + + "months_abbr" : [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + + "days" : [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + + "days_abbr" : [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ] + }; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js new file mode 100644 index 00000000..47256dd2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js @@ -0,0 +1,61 @@ +define(function(){ + // pt-BR (Brazillian Portuguese) + return { + "am" : "", + "pm" : "", + + "x": "%d/%m/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %H:%M:%S %Z", + + "months" : [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + + "months_abbr" : [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Out", + "Nov", + "Dez" + ], + + "days" : [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" + ], + + "days_abbr" : [ + "Dom", + "Seg", + "Ter", + "Qua", + "Qui", + "Sex", + "Sáb" + ] + }; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js new file mode 100644 index 00000000..c04ce885 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js @@ -0,0 +1,13 @@ +define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ + + // we also use mixIn to make sure we don't affect the original locale + var activeLocale = mixIn({}, enUS, { + // we expose a "set" method to allow overriding the global locale + set : function(localeData){ + mixIn(activeLocale, localeData); + } + }); + + return activeLocale; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js new file mode 100644 index 00000000..e400b43d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js @@ -0,0 +1,15 @@ +define(['../lang/isDate'], function (isDate) { + + /** + * checks if it's a leap year + */ + function isLeapYear(fullYear){ + if (isDate(fullYear)) { + fullYear = fullYear.getFullYear(); + } + return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); + } + + return isLeapYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js new file mode 100644 index 00000000..f30531fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js @@ -0,0 +1,16 @@ +define(['./startOf'], function (startOf) { + + /** + * Check if date is "same" with optional period + */ + function isSame(date1, date2, period){ + if (period) { + date1 = startOf(date1, period); + date2 = startOf(date2, period); + } + return Number(date1) === Number(date2); + } + + return isSame; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js new file mode 100644 index 00000000..9a2aacb0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js @@ -0,0 +1,146 @@ +define(['../array/some'], function (some) { + + var datePatterns = [ + /^([0-9]{4})$/, // YYYY + /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) + /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD + ]; + var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD + + var timePatterns = [ + /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh + /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm + /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss + ]; + + var DATE_TIME = /^(.+)T(.+)$/; + var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; + + function matchAll(str, patterns) { + var match; + var found = some(patterns, function(pattern) { + return !!(match = pattern.exec(str)); + }); + + return found ? match : null; + } + + function getDate(year, month, day) { + var date = new Date(Date.UTC(year, month, day)); + + // Explicitly set year to avoid Date.UTC making dates < 100 relative to + // 1900 + date.setUTCFullYear(year); + + var valid = + date.getUTCFullYear() === year && + date.getUTCMonth() === month && + date.getUTCDate() === day; + return valid ? +date : NaN; + } + + function parseOrdinalDate(str) { + var match = ORD_DATE.exec(str); + if (match ) { + var year = +match[1], + day = +match[2], + date = new Date(Date.UTC(year, 0, day)); + + if (date.getUTCFullYear() === year) { + return +date; + } + } + + return NaN; + } + + function parseDate(str) { + var match, year, month, day; + + var match = matchAll(str, datePatterns); + if (match === null) { + // Ordinal dates are verified differently. + return parseOrdinalDate(str); + } + + year = (match[1] === void 0) ? 0 : +match[1]; + month = (match[2] === void 0) ? 0 : +match[2] - 1; + day = (match[3] === void 0) ? 1 : +match[3]; + + return getDate(year, month, day); + } + + function getTime(hr, min, sec) { + var valid = + (hr < 24 && hr >= 0 && + min < 60 && min >= 0 && + sec < 60 && min >= 0) || + (hr === 24 && min === 0 && sec === 0); + if (!valid) { + return NaN; + } + + return ((hr * 60 + min) * 60 + sec) * 1000; + } + + function parseOffset(str) { + var match; + if (str.charAt(str.length - 1) === 'Z') { + str = str.substring(0, str.length - 1); + } else if ((match = TIME_ZONE.exec(str))) { + var match = TIME_ZONE.exec(str); + if (match) { + var hours = +match[3], + minutes = (match[4] === void 0) ? 0 : +match[4], + offset = getTime(hours, minutes, 0); + + if (match[2] === '-') { + offset *= -1; + } + + return { offset: offset, time: match[1] }; + } + } + + // No time zone specified, assume UTC + return { offset: 0, time: str }; + } + + function parseTime(str) { + var match; + var offset = parseOffset(str); + + str = offset.time; + offset = offset.offset; + if (isNaN(offset)) { + return NaN; + } + + match = matchAll(str, timePatterns); + if (match === null) { + return NaN; + } + + var hours = (match[1] === void 0) ? 0 : +match[1], + minutes = (match[2] === void 0) ? 0 : +match[2], + seconds = (match[3] === void 0) ? 0 : +match[3]; + + return getTime(hours, minutes, seconds) - offset; + } + + /** + * Parse an ISO8601 formatted date string, and return a Date object. + */ + function parseISO8601(str){ + var match = DATE_TIME.exec(str); + if (!match) { + // No time specified + return parseDate(str); + } + + return parseDate(match[1]) + parseTime(match[2]); + } + + return parseISO8601; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js new file mode 100644 index 00000000..747f114d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js @@ -0,0 +1,54 @@ +define(['../lang/clone'], function (clone) { + + /** + * get a new Date object representing start of period + */ + function startOf(date, period){ + date = clone(date); + + // intentionally removed "break" from switch since start of + // month/year/etc should also reset the following periods + switch (period) { + case 'year': + date.setMonth(0); + /* falls through */ + case 'month': + date.setDate(1); + /* falls through */ + case 'week': + case 'day': + date.setHours(0); + /* falls through */ + case 'hour': + date.setMinutes(0); + /* falls through */ + case 'minute': + date.setSeconds(0); + /* falls through */ + case 'second': + date.setMilliseconds(0); + break; + default: + throw new Error('"'+ period +'" is not a valid period'); + } + + // week is the only case that should reset the weekDay and maybe even + // overflow to previous month + if (period === 'week') { + var weekDay = date.getDay(); + var baseDate = date.getDate(); + if (weekDay) { + if (weekDay >= baseDate) { + //start of the week is on previous month + date.setDate(0); + } + date.setDate(date.getDate() - date.getDay()); + } + } + + return date; + } + + return startOf; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js new file mode 100644 index 00000000..dd782505 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js @@ -0,0 +1,113 @@ +define(['../number/pad', './i18n_', './dayOfTheYear', './timezoneOffset', './timezoneAbbr', './weekOfTheYear'], function (pad, i18n, dayOfTheYear, timezoneOffset, timezoneAbbr, weekOfTheYear) { + + var _combinations = { + 'D': '%m/%d/%y', + 'F': '%Y-%m-%d', + 'r': '%I:%M:%S %p', + 'R': '%H:%M', + 'T': '%H:%M:%S', + 'x': 'locale', + 'X': 'locale', + 'c': 'locale' + }; + + + /** + * format date based on strftime format + */ + function strftime(date, format, localeData){ + localeData = localeData || i18n; + var reToken = /%([a-z%])/gi; + + function makeIterator(fn) { + return function(match, token){ + return fn(date, token, localeData); + }; + } + + return format + .replace(reToken, makeIterator(expandCombinations)) + .replace(reToken, makeIterator(convertToken)); + } + + + function expandCombinations(date, token, l10n){ + if (token in _combinations) { + var expanded = _combinations[token]; + return expanded === 'locale'? l10n[token] : expanded; + } else { + return '%'+ token; + } + } + + + function convertToken(date, token, l10n){ + switch (token){ + case 'a': + return l10n.days_abbr[date.getDay()]; + case 'A': + return l10n.days[date.getDay()]; + case 'h': + case 'b': + return l10n.months_abbr[date.getMonth()]; + case 'B': + return l10n.months[date.getMonth()]; + case 'C': + return pad(Math.floor(date.getFullYear() / 100), 2); + case 'd': + return pad(date.getDate(), 2); + case 'e': + return pad(date.getDate(), 2, ' '); + case 'H': + return pad(date.getHours(), 2); + case 'I': + return pad(date.getHours() % 12, 2); + case 'j': + return pad(dayOfTheYear(date), 3); + case 'L': + return pad(date.getMilliseconds(), 3); + case 'm': + return pad(date.getMonth() + 1, 2); + case 'M': + return pad(date.getMinutes(), 2); + case 'n': + return '\n'; + case 'p': + return date.getHours() >= 12? l10n.pm : l10n.am; + case 'P': + return convertToken(date, 'p', l10n).toLowerCase(); + case 's': + return date.getTime() / 1000; + case 'S': + return pad(date.getSeconds(), 2); + case 't': + return '\t'; + case 'u': + var day = date.getDay(); + return day === 0? 7 : day; + case 'U': + return pad(weekOfTheYear(date), 2); + case 'w': + return date.getDay(); + case 'W': + return pad(weekOfTheYear(date, 1), 2); + case 'y': + return pad(date.getFullYear() % 100, 2); + case 'Y': + return pad(date.getFullYear(), 4); + case 'z': + return timezoneOffset(date); + case 'Z': + return timezoneAbbr(date); + case '%': + return '%'; + default: + // keep unrecognized tokens + return '%'+ token; + } + } + + + return strftime; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js new file mode 100644 index 00000000..225a6856 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js @@ -0,0 +1,17 @@ +define(['./timezoneOffset'], function(timezoneOffset) { + + /** + * Abbreviated time zone name or similar information. + */ + function timezoneAbbr(date){ + // Date.toString gives different results depending on the + // browser/system so we fallback to timezone offset + // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' + // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' + var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); + return tz? tz[1] : timezoneOffset(date); + } + + return timezoneAbbr; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js new file mode 100644 index 00000000..ca06705d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js @@ -0,0 +1,16 @@ +define(['../number/pad'], function (pad) { + + /** + * time zone as hour and minute offset from UTC (e.g. +0900) + */ + function timezoneOffset(date){ + var offset = date.getTimezoneOffset(); + var abs = Math.abs(offset); + var h = pad(Math.floor(abs / 60), 2); + var m = pad(abs % 60, 2); + return (offset > 0? '-' : '+') + h + m; + } + + return timezoneOffset; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js new file mode 100644 index 00000000..98f7e9d1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js @@ -0,0 +1,24 @@ +define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) { + + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + + /** + * returns the total amount of days in the month (considering leap years) + */ + function totalDaysInMonth(fullYear, monthIndex){ + if (isDate(fullYear)) { + var date = fullYear; + year = date.getFullYear(); + monthIndex = date.getMonth(); + } + + if (monthIndex === 1 && isLeapYear(fullYear)) { + return 29; + } else { + return DAYS_IN_MONTH[monthIndex]; + } + } + + return totalDaysInMonth; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js new file mode 100644 index 00000000..e9036b42 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js @@ -0,0 +1,13 @@ +define(['./isLeapYear'], function (isLeapYear) { + + /** + * return the amount of days in the year following the gregorian calendar + * and leap years + */ + function totalDaysInYear(fullYear){ + return isLeapYear(fullYear)? 366 : 365; + } + + return totalDaysInYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js new file mode 100644 index 00000000..8dabc458 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js @@ -0,0 +1,16 @@ +define(['./dayOfTheYear'], function (dayOfTheYear) { + + /** + * Return the week of the year based on given firstDayOfWeek + */ + function weekOfTheYear(date, firstDayOfWeek){ + firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; + var doy = dayOfTheYear(date); + var dow = (7 + date.getDay() - firstDayOfWeek) % 7; + var relativeWeekDay = 6 - firstDayOfWeek - dow; + return Math.floor((doy + relativeWeekDay) / 7); + } + + return weekOfTheYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function.js new file mode 100644 index 00000000..23f4fd74 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function.js @@ -0,0 +1,18 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'bind' : require('./function/bind'), + 'compose' : require('./function/compose'), + 'debounce' : require('./function/debounce'), + 'func' : require('./function/func'), + 'makeIterator_' : require('./function/makeIterator_'), + 'partial' : require('./function/partial'), + 'prop' : require('./function/prop'), + 'series' : require('./function/series'), + 'throttle' : require('./function/throttle'), + 'timeout' : require('./function/timeout') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js new file mode 100644 index 00000000..09e5e20a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js @@ -0,0 +1,23 @@ +define(function(){ + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + * @param {Function} fn Function. + * @param {object} context Execution context. + * @param {rest} args Arguments (0...n arguments). + * @return {Function} Wrapped Function. + */ + function bind(fn, context, args){ + var argsArr = slice(arguments, 2); //curried args + return function(){ + return fn.apply(context, argsArr.concat(slice(arguments))); + }; + } + + return bind; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js new file mode 100644 index 00000000..d8b228fa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Returns a function that composes multiple functions, passing results to + * each other. + */ + function compose() { + var fns = arguments; + return function(arg){ + // only cares about the first argument since the chain can only + // deal with a single return value anyway. It should start from + // the last fn. + var n = fns.length; + while (n--) { + arg = fns[n].call(this, arg); + } + return arg; + }; + } + + return compose; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js new file mode 100644 index 00000000..21644ecc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js @@ -0,0 +1,29 @@ +define(function () { + + /** + * Debounce callback execution + */ + function debounce(fn, threshold, isAsap){ + var timeout, result; + function debounced(){ + var args = arguments, context = this; + function delayed(){ + if (! isAsap) { + result = fn.apply(context, args); + } + timeout = null; + } + if (timeout) { + clearTimeout(timeout); + } else if (isAsap) { + result = fn.apply(context, args); + } + timeout = setTimeout(delayed, threshold); + return result; + } + return debounced; + } + + return debounce; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/func.js new file mode 100644 index 00000000..b920e00e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/func.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Returns a function that call a method on the passed object + */ + function func(name){ + return function(obj){ + return obj[name](); + }; + } + + return func; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js new file mode 100644 index 00000000..deb6e137 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js @@ -0,0 +1,33 @@ +define(['./prop', '../object/deepMatches'], function(prop, deepMatches) { + + /** + * Converts argument into a valid iterator. + * Used internally on most array/object/collection methods that receives a + * callback/iterator providing a shortcut syntax. + */ + function makeIterator(src, thisObj){ + switch(typeof src) { + case 'object': + // typeof null == "object" + return (src != null)? function(val, key, target){ + return deepMatches(val, src); + } : src; + case 'string': + case 'number': + return prop(src); + case 'function': + if (typeof thisObj === 'undefined') { + return src; + } else { + return function(val, i, arr){ + return src.call(thisObj, val, i, arr); + }; + } + default: + return src; + } + } + + return makeIterator; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js new file mode 100644 index 00000000..ad730746 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js @@ -0,0 +1,19 @@ +define(function () { + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Creates a partially applied function. + */ + function partial(fn, var_args){ + var argsArr = slice(arguments, 1); //curried args + return function(){ + return fn.apply(this, argsArr.concat(slice(arguments))); + }; + } + + return partial; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js new file mode 100644 index 00000000..c9df78ca --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Returns a function that gets a property of the passed object + */ + function prop(name){ + return function(obj){ + return obj[name]; + }; + } + + return prop; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/series.js new file mode 100644 index 00000000..c8856a27 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/series.js @@ -0,0 +1,22 @@ +define(function () { + + /** + * Returns a function that will execute a list of functions in sequence + * passing the same arguments to each one. (useful for batch processing + * items during a forEach loop) + */ + function series(){ + var fns = arguments; + return function(){ + var i = 0, + n = fns.length; + while (i < n) { + fns[i].apply(this, arguments); + i += 1; + } + }; + } + + return series; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js new file mode 100644 index 00000000..8ce3929a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js @@ -0,0 +1,32 @@ +define(['../time/now'], function (now) { + + /** + */ + function throttle(fn, delay){ + var context, timeout, result, args, + cur, diff, prev = 0; + function delayed(){ + prev = now(); + timeout = null; + result = fn.apply(context, args); + } + function throttled(){ + context = this; + args = arguments; + cur = now(); + diff = delay - (cur - prev); + if (diff <= 0) { + clearTimeout(timeout); + prev = cur; + result = fn.apply(context, args); + } else if (! timeout) { + timeout = setTimeout(delayed, diff); + } + return result; + } + return throttled; + } + + return throttle; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js new file mode 100644 index 00000000..15388bdd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js @@ -0,0 +1,21 @@ +define(function () { + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Delays the call of a function within a given context. + */ + function timeout(fn, millis, context){ + + var args = slice(arguments, 3); + + return setTimeout(function() { + fn.apply(context, args); + }, millis); + } + + return timeout; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/index.js new file mode 100644 index 00000000..744bb119 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/index.js @@ -0,0 +1,24 @@ +/**@license + * mout v0.6.0 | http://moutjs.com | MIT license + */ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'VERSION' : '0.6.0', + 'array' : require('./array'), + 'collection' : require('./collection'), + 'date' : require('./date'), + 'function' : require('./function'), + 'lang' : require('./lang'), + 'math' : require('./math'), + 'number' : require('./number'), + 'object' : require('./object'), + 'queryString' : require('./queryString'), + 'random' : require('./random'), + 'string' : require('./string'), + 'time' : require('./time') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang.js new file mode 100644 index 00000000..de16b597 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang.js @@ -0,0 +1,36 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'clone' : require('./lang/clone'), + 'createObject' : require('./lang/createObject'), + 'ctorApply' : require('./lang/ctorApply'), + 'deepClone' : require('./lang/deepClone'), + 'defaults' : require('./lang/defaults'), + 'inheritPrototype' : require('./lang/inheritPrototype'), + 'is' : require('./lang/is'), + 'isArguments' : require('./lang/isArguments'), + 'isArray' : require('./lang/isArray'), + 'isBoolean' : require('./lang/isBoolean'), + 'isDate' : require('./lang/isDate'), + 'isEmpty' : require('./lang/isEmpty'), + 'isFinite' : require('./lang/isFinite'), + 'isFunction' : require('./lang/isFunction'), + 'isInteger' : require('./lang/isInteger'), + 'isKind' : require('./lang/isKind'), + 'isNaN' : require('./lang/isNaN'), + 'isNull' : require('./lang/isNull'), + 'isNumber' : require('./lang/isNumber'), + 'isObject' : require('./lang/isObject'), + 'isPlainObject' : require('./lang/isPlainObject'), + 'isRegExp' : require('./lang/isRegExp'), + 'isString' : require('./lang/isString'), + 'isUndefined' : require('./lang/isUndefined'), + 'isnt' : require('./lang/isnt'), + 'kindOf' : require('./lang/kindOf'), + 'toArray' : require('./lang/toArray'), + 'toString' : require('./lang/toString') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js new file mode 100644 index 00000000..468489a1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js @@ -0,0 +1,47 @@ +define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { + + /** + * Clone native types. + */ + function clone(val){ + switch (kindOf(val)) { + case 'Object': + return cloneObject(val); + case 'Array': + return cloneArray(val); + case 'RegExp': + return cloneRegExp(val); + case 'Date': + return cloneDate(val); + default: + return val; + } + } + + function cloneObject(source) { + if (isPlainObject(source)) { + return mixIn({}, source); + } else { + return source; + } + } + + function cloneRegExp(r) { + var flags = ''; + flags += r.multiline ? 'm' : ''; + flags += r.global ? 'g' : ''; + flags += r.ignorecase ? 'i' : ''; + return new RegExp(r.source, flags); + } + + function cloneDate(date) { + return new Date(+date); + } + + function cloneArray(arr) { + return arr.slice(); + } + + return clone; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js new file mode 100644 index 00000000..f7661500 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js @@ -0,0 +1,18 @@ +define(['../object/mixIn'], function(mixIn){ + + /** + * Create Object using prototypal inheritance and setting custom properties. + * - Mix between Douglas Crockford Prototypal Inheritance and the EcmaScript 5 `Object.create()` method. + * @param {object} parent Parent Object. + * @param {object} [props] Object properties. + * @return {object} Created object. + */ + function createObject(parent, props){ + function F(){} + F.prototype = parent; + return mixIn(new F(), props); + + } + return createObject; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js new file mode 100644 index 00000000..a9ac1c54 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js @@ -0,0 +1,17 @@ +define(function () { + + function F(){} + + /** + * Do fn.apply on a constructor. + */ + function ctorApply(ctor, args) { + F.prototype = ctor.prototype; + var instance = new F(); + ctor.apply(instance, args); + return instance; + } + + return ctorApply; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js new file mode 100644 index 00000000..d45c10aa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js @@ -0,0 +1,45 @@ +define(['./clone', '../object/forOwn', './kindOf', './isPlainObject'], function (clone, forOwn, kindOf, isPlainObject) { + + /** + * Recursively clone native types. + */ + function deepClone(val, instanceClone) { + switch ( kindOf(val) ) { + case 'Object': + return cloneObject(val, instanceClone); + case 'Array': + return cloneArray(val, instanceClone); + default: + return clone(val); + } + } + + function cloneObject(source, instanceClone) { + if (isPlainObject(source)) { + var out = {}; + forOwn(source, function(val, key) { + this[key] = deepClone(val, instanceClone); + }, out); + return out; + } else if (instanceClone) { + return instanceClone(source); + } else { + return source; + } + } + + function cloneArray(arr, instanceClone) { + var out = [], + i = -1, + n = arr.length, + val; + while (++i < n) { + out[i] = deepClone(arr[i], instanceClone); + } + return out; + } + + return deepClone; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js new file mode 100644 index 00000000..5156b1bb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js @@ -0,0 +1,16 @@ +define(['./toArray', '../array/find'], function (toArray, find) { + + /** + * Return first non void argument + */ + function defaults(var_args){ + return find(toArray(arguments), nonVoid); + } + + function nonVoid(val){ + return val != null; + } + + return defaults; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js new file mode 100644 index 00000000..c1fda3a7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js @@ -0,0 +1,16 @@ +define(['./createObject'], function(createObject){ + + /** + * Inherit prototype from another Object. + * - inspired by Nicholas Zackas Solution + * @param {object} child Child object + * @param {object} parent Parent Object + */ + function inheritPrototype(child, parent){ + var p = createObject(parent.prototype); + p.constructor = child; + child.prototype = p; + } + + return inheritPrototype; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js new file mode 100644 index 00000000..261a2077 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Check if both arguments are egal. + */ + function is(x, y){ + // implementation borrowed from harmony:egal spec + if (x === y) { + // 0 === -0, but they are not identical + return x !== 0 || 1 / x === 1 / y; + } + + // NaN !== NaN, but they are identical. + // NaNs are the only non-reflexive value, i.e., if x !== x, + // then x is a NaN. + // isNaN is broken: it converts its argument to number, so + // isNaN("foo") => true + return x !== x && y !== y; + } + + return is; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js new file mode 100644 index 00000000..f889ee8e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js @@ -0,0 +1,15 @@ +define(['./isKind'], function (isKind) { + + /** + */ + var isArgs = isKind(arguments, 'Arguments')? + function(val){ + return isKind(val, 'Arguments'); + } : + function(val){ + // Arguments is an Object on IE7 + return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); + }; + + return isArgs; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js new file mode 100644 index 00000000..886e2aa5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + var isArray = Array.isArray || function (val) { + return isKind(val, 'Array'); + }; + return isArray; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js new file mode 100644 index 00000000..1ca27a69 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isBoolean(val) { + return isKind(val, 'Boolean'); + } + return isBoolean; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js new file mode 100644 index 00000000..2708d676 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isDate(val) { + return isKind(val, 'Date'); + } + return isDate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js new file mode 100644 index 00000000..4cc3d2db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js @@ -0,0 +1,23 @@ +define(['../object/forOwn', './isArray'], function (forOwn, isArray) { + + function isEmpty(val){ + if (val == null) { + // typeof null == 'object' so we check it first + return false; + } else if ( typeof val === 'string' || isArray(val) ) { + return !val.length; + } else if ( typeof val === 'object' || typeof val === 'function' ) { + var result = true; + forOwn(val, function(){ + result = false; + return false; // break loop + }); + return result; + } else { + return false; + } + } + + return isEmpty; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js new file mode 100644 index 00000000..5a982f4b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js @@ -0,0 +1,21 @@ +define(['./isNumber'], function (isNumber) { + + var global = this; + + /** + * Check if value is finite + */ + function isFinite(val){ + var is = false; + if (typeof val === 'string' && val !== '') { + is = global.isFinite( parseFloat(val) ); + } else if (isNumber(val)){ + // need to use isNumber because of Number constructor + is = global.isFinite( val ); + } + return is; + } + + return isFinite; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js new file mode 100644 index 00000000..ff5df7f0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isFunction(val) { + return isKind(val, 'Function'); + } + return isFunction; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js new file mode 100644 index 00000000..1931f516 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js @@ -0,0 +1,12 @@ +define(['./isNumber'], function (isNumber) { + + /** + * Check if value is an integer + */ + function isInteger(val){ + return isNumber(val) && (val % 1 === 0); + } + + return isInteger; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js new file mode 100644 index 00000000..6937a12f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js @@ -0,0 +1,9 @@ +define(['./kindOf'], function (kindOf) { + /** + * Check if value is from a specific "kind". + */ + function isKind(val, kind){ + return kindOf(val) === kind; + } + return isKind; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js new file mode 100644 index 00000000..9467a3c8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js @@ -0,0 +1,15 @@ +define(['./isNumber'], function (isNumber) { + + /** + * Check if value is NaN for realz + */ + function isNaN(val){ + // based on the fact that NaN !== NaN + // need to check if it's a number to avoid conflicts with host objects + // also need to coerce ToNumber to avoid edge case `new Number(NaN)` + return !isNumber(val) || val != +val; + } + + return isNaN; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js new file mode 100644 index 00000000..506e05ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js @@ -0,0 +1,9 @@ +define(function () { + /** + */ + function isNull(val){ + return val === null; + } + return isNull; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js new file mode 100644 index 00000000..9a832c5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isNumber(val) { + return isKind(val, 'Number'); + } + return isNumber; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js new file mode 100644 index 00000000..0befb063 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isObject(val) { + return isKind(val, 'Object'); + } + return isObject; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js new file mode 100644 index 00000000..6c5854fd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Checks if the value is created by the `Object` constructor. + */ + function isPlainObject(value) { + return (!!value + && typeof value === 'object' + && value.constructor === Object); + } + + return isPlainObject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js new file mode 100644 index 00000000..d78a03da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isRegExp(val) { + return isKind(val, 'RegExp'); + } + return isRegExp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js new file mode 100644 index 00000000..8a42fe01 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isString(val) { + return isKind(val, 'String'); + } + return isString; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js new file mode 100644 index 00000000..c57b28eb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js @@ -0,0 +1,10 @@ +define(function () { + var UNDEF; + + /** + */ + function isUndef(val){ + return val === UNDEF; + } + return isUndef; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js new file mode 100644 index 00000000..d4336222 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js @@ -0,0 +1,12 @@ +define(['./is'], function (is) { + + /** + * Check if both values are not identical/egal + */ + function isnt(x, y){ + return !is(x, y); + } + + return isnt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js new file mode 100644 index 00000000..97d21d15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js @@ -0,0 +1,20 @@ +define(function () { + + var _rKind = /^\[object (.*)\]$/, + _toString = Object.prototype.toString, + UNDEF; + + /** + * Gets the "kind" of value. (e.g. "String", "Number", etc) + */ + function kindOf(val) { + if (val === null) { + return 'Null'; + } else if (val === UNDEF) { + return 'Undefined'; + } else { + return _rKind.exec( _toString.call(val) )[1]; + } + } + return kindOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js new file mode 100644 index 00000000..552916f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js @@ -0,0 +1,31 @@ +define(['./kindOf'], function (kindOf) { + + var _win = this; + + /** + * Convert array-like object into array + */ + function toArray(val){ + var ret = [], + kind = kindOf(val), + n; + + if (val != null) { + if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { + //string, regexp, function have .length but user probably just want + //to wrap value into an array.. + ret[ret.length] = val; + } else { + //window returns true on isObject in IE7 and may have length + //property. `typeof NodeList` returns `function` on Safari so + //we can't use it (#58) + n = val.length; + while (n--) { + ret[n] = val[n]; + } + } + } + return ret; + } + return toArray; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js new file mode 100644 index 00000000..c28b89af --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * Typecast a value to a String, using an empty string value for null or + * undefined. + */ + function toString(val){ + return val == null ? '' : val.toString(); + } + + return toString; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math.js new file mode 100644 index 00000000..e2ba8705 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math.js @@ -0,0 +1,19 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'ceil' : require('./math/ceil'), + 'clamp' : require('./math/clamp'), + 'countSteps' : require('./math/countSteps'), + 'floor' : require('./math/floor'), + 'inRange' : require('./math/inRange'), + 'isNear' : require('./math/isNear'), + 'lerp' : require('./math/lerp'), + 'loop' : require('./math/loop'), + 'map' : require('./math/map'), + 'norm' : require('./math/norm'), + 'round' : require('./math/round') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js new file mode 100644 index 00000000..d73b0581 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Round value up with a custom radix. + */ + function ceil(val, step){ + step = Math.abs(step || 1); + return Math.ceil(val / step) * step; + } + + return ceil; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js new file mode 100644 index 00000000..fb5a1484 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Clamps value inside range. + */ + function clamp(val, min, max){ + return val < min? min : (val > max? max : val); + } + return clamp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js new file mode 100644 index 00000000..0ecb32f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js @@ -0,0 +1,16 @@ +define(function(){ + /** + * Count number of full steps. + */ + function countSteps(val, step, overflow){ + val = Math.floor(val / step); + + if (overflow) { + return val % overflow; + } + + return val; + } + + return countSteps; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js new file mode 100644 index 00000000..8a4456b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Floor value to full steps. + */ + function floor(val, step){ + step = Math.abs(step || 1); + return Math.floor(val / step) * step; + } + return floor; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js new file mode 100644 index 00000000..0c890536 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Checks if value is inside the range. + */ + function inRange(val, min, max, threshold){ + threshold = threshold || 0; + return (val + threshold >= min && val - threshold <= max); + } + + return inRange; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js new file mode 100644 index 00000000..b308a0b0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Check if value is close to target. + */ + function isNear(val, target, threshold){ + return (Math.abs(val - target) <= threshold); + } + return isNear; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js new file mode 100644 index 00000000..26b99d04 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Linear interpolation. + * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE + */ + function lerp(ratio, start, end){ + return start + (end - start) * ratio; + } + + return lerp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js new file mode 100644 index 00000000..c735ecf6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Loops value inside range. + */ + function loop(val, min, max){ + return val < min? max : (val > max? min : val); + } + + return loop; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/map.js new file mode 100644 index 00000000..bf7dc5d5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/map.js @@ -0,0 +1,10 @@ +define(['./lerp', './norm'], function(lerp, norm){ + /** + * Maps a number from one scale to another. + * @example map(3, 0, 4, -1, 1) -> 0.5 + */ + function map(val, min1, max1, min2, max2){ + return lerp( norm(val, min1, max1), min2, max2 ); + } + return map; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js new file mode 100644 index 00000000..fccae20e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Gets normalized ratio of value inside range. + */ + function norm(val, min, max){ + return (val - min) / (max - min); + } + return norm; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/round.js new file mode 100644 index 00000000..b43e4ac2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/round.js @@ -0,0 +1,12 @@ +define(function () { + /** + * Round number to a specific radix + */ + function round(value, radix){ + radix = radix || 1; // default round 1 + return Math.round(value / radix) * radix; + } + + return round; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number.js new file mode 100644 index 00000000..cb52fc75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number.js @@ -0,0 +1,21 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'MAX_INT' : require('./number/MAX_INT'), + 'MAX_UINT' : require('./number/MAX_UINT'), + 'MIN_INT' : require('./number/MIN_INT'), + 'abbreviate' : require('./number/abbreviate'), + 'currencyFormat' : require('./number/currencyFormat'), + 'enforcePrecision' : require('./number/enforcePrecision'), + 'pad' : require('./number/pad'), + 'rol' : require('./number/rol'), + 'ror' : require('./number/ror'), + 'sign' : require('./number/sign'), + 'toInt' : require('./number/toInt'), + 'toUInt' : require('./number/toUInt'), + 'toUInt31' : require('./number/toUInt31') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js new file mode 100644 index 00000000..23a6e1a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit signed integer value. (2^31 - 1) + */ +define(function(){ + return 2147483647; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js new file mode 100644 index 00000000..a035096c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit unsigned integet value (2^32 - 1) + */ +define(function(){ + return 4294967295; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js new file mode 100644 index 00000000..9b3e9781 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Minimum 32-bit signed integer value (-2^31). + */ +define(function(){ + return -2147483648; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js new file mode 100644 index 00000000..7e7405ad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js @@ -0,0 +1,35 @@ +define(['./enforcePrecision'], function (enforcePrecision) { + + var _defaultDict = { + thousand : 'K', + million : 'M', + billion : 'B' + }; + + /** + * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) + */ + function abbreviateNumber(val, nDecimals, dict){ + nDecimals = nDecimals != null? nDecimals : 1; + dict = dict || _defaultDict; + val = enforcePrecision(val, nDecimals); + + var str, mod; + + if (val < 1000000) { + mod = enforcePrecision(val / 1000, nDecimals); + // might overflow to next scale during rounding + str = mod < 1000? mod + dict.thousand : 1 + dict.million; + } else if (val < 1000000000) { + mod = enforcePrecision(val / 1000000, nDecimals); + str = mod < 1000? mod + dict.million : 1 + dict.billion; + } else { + str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; + } + + return str; + } + + return abbreviateNumber; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js new file mode 100644 index 00000000..dcde8fc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js @@ -0,0 +1,26 @@ +define(function () { + + /** + * Converts number into currency format + */ + function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { + nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; + decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; + thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; + + //can't use enforce precision since it returns a number and we are + //doing a RegExp over the string + var fixed = val.toFixed(nDecimalDigits), + //separate begin [$1], middle [$2] and decimal digits [$4] + parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); + + if(parts){ //val >= 1000 || val <= -1000 + return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); + }else{ + return fixed.replace('.', decimalSeparator); + } + } + + return currencyFormat; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js new file mode 100644 index 00000000..84554d0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js @@ -0,0 +1,13 @@ +define(function(){ + /** + * Enforce a specific amount of decimal digits and also fix floating + * point rounding issues. + * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> + * 0.61` + */ + function enforcePrecision(val, nDecimalDigits){ + var pow = Math.pow(10, nDecimalDigits); + return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); + } + return enforcePrecision; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js new file mode 100644 index 00000000..3b2c062a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js @@ -0,0 +1,12 @@ +define(['../string/lpad'], function(lpad){ + + /** + * Add padding zeros if n.length < minLength. + */ + function pad(n, minLength, char){ + return lpad(''+ n, minLength, char || '0'); + } + + return pad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js new file mode 100644 index 00000000..a148f444 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Bitwise circular shift left + * http://en.wikipedia.org/wiki/Circular_shift + */ + function rol(val, shift){ + return (val << shift) | (val >> (32 - shift)); + } + return rol; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js new file mode 100644 index 00000000..b5c66f92 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Bitwise circular shift right + * http://en.wikipedia.org/wiki/Circular_shift + */ + function ror(val, shift){ + return (val >> shift) | (val << (32 - shift)); + } + return ror; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js new file mode 100644 index 00000000..dfc131d5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js @@ -0,0 +1,15 @@ +define(function () { + + /** + * Get sign of the value. + */ + function sign(val) { + var num = Number(val); + if (num === 0) return num; // +0 and +0 === 0 + if (isNaN(num)) return num; // NaN + return num < 0? -1 : 1; + } + + return sign; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js new file mode 100644 index 00000000..1e9b4c0b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js @@ -0,0 +1,15 @@ +define(function(){ + + /** + * "Convert" value into an 32-bit integer. + * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. + * IMPORTANT: val will wrap at 2^31 and -2^31. + * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 + */ + function toInt(val){ + return ~~val; + } + + return toInt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js new file mode 100644 index 00000000..d5b25b2c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * "Convert" value into a 32-bit unsigned integer. + * IMPORTANT: Value will wrap at 2^32. + */ + function toUInt(val){ + return val >>> 0; + } + + return toUInt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js new file mode 100644 index 00000000..9785a054 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js @@ -0,0 +1,13 @@ +define(['./MAX_INT'], function(MAX_INT){ + + /** + * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + * IMPORTANT: value wil wrap at 2^31, if negative will return 0. + */ + function toUInt31(val){ + return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); + } + + return toUInt31; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object.js new file mode 100644 index 00000000..343e7826 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object.js @@ -0,0 +1,42 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'bindAll' : require('./object/bindAll'), + 'contains' : require('./object/contains'), + 'deepEquals' : require('./object/deepEquals'), + 'deepFillIn' : require('./object/deepFillIn'), + 'deepMatches' : require('./object/deepMatches'), + 'deepMixIn' : require('./object/deepMixIn'), + 'equals' : require('./object/equals'), + 'every' : require('./object/every'), + 'fillIn' : require('./object/fillIn'), + 'filter' : require('./object/filter'), + 'find' : require('./object/find'), + 'forIn' : require('./object/forIn'), + 'forOwn' : require('./object/forOwn'), + 'functions' : require('./object/functions'), + 'get' : require('./object/get'), + 'has' : require('./object/has'), + 'hasOwn' : require('./object/hasOwn'), + 'keys' : require('./object/keys'), + 'map' : require('./object/map'), + 'matches' : require('./object/matches'), + 'max' : require('./object/max'), + 'merge' : require('./object/merge'), + 'min' : require('./object/min'), + 'mixIn' : require('./object/mixIn'), + 'namespace' : require('./object/namespace'), + 'pick' : require('./object/pick'), + 'pluck' : require('./object/pluck'), + 'reduce' : require('./object/reduce'), + 'reject' : require('./object/reject'), + 'set' : require('./object/set'), + 'size' : require('./object/size'), + 'some' : require('./object/some'), + 'unset' : require('./object/unset'), + 'values' : require('./object/values') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js new file mode 100644 index 00000000..b131ed15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js @@ -0,0 +1,16 @@ +define(['./functions', '../function/bind', '../array/forEach'], function (functions, bind, forEach) { + + /** + * Binds methods of the object to be run in it's own context. + */ + function bindAll(obj, rest_methodNames){ + var keys = arguments.length > 1? + Array.prototype.slice.call(arguments, 1) : functions(obj); + forEach(keys, function(key){ + obj[key] = bind(obj[key], obj); + }); + } + + return bindAll; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js new file mode 100644 index 00000000..297e8986 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js @@ -0,0 +1,13 @@ +define(['./some'], function (some) { + + /** + * Check if object contains value + */ + function contains(obj, needle) { + return some(obj, function(val) { + return (val === needle); + }); + } + return contains; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js new file mode 100644 index 00000000..8b7d5d15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js @@ -0,0 +1,26 @@ +define(['../lang/isObject', './equals'], function (isObject, equals) { + + function defaultCompare(a, b) { + return a === b; + } + + /** + * Recursively checks for same properties and values. + */ + function deepEquals(a, b, callback){ + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + function compare(a, b){ + return deepEquals(a, b, callback); + } + + return equals(a, b, compare); + } + + return deepEquals; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js new file mode 100644 index 00000000..84ba154a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js @@ -0,0 +1,31 @@ +define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { + + /** + * Deeply copy missing properties in the target from the defaults. + */ + function deepFillIn(target, defaults){ + var i = 0, + n = arguments.length, + obj; + + while(++i < n) { + obj = arguments[i]; + if (obj) { + forOwn(obj, function(newValue, key) { + var curValue = target[key]; + if (curValue == null) { + target[key] = newValue; + } else if (isPlainObject(curValue) + && isPlainObject(newValue)) { + deepFillIn(curValue, newValue); + } + }); + } + } + + return target; + } + + return deepFillIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js new file mode 100644 index 00000000..2eae6297 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js @@ -0,0 +1,54 @@ +define(['./forOwn', '../lang/isArray'], function(forOwn, isArray) { + + function containsMatch(array, pattern) { + var i = -1, length = array.length; + while (++i < length) { + if (deepMatches(array[i], pattern)) { + return true; + } + } + + return false; + } + + function matchArray(target, pattern) { + var i = -1, patternLength = pattern.length; + while (++i < patternLength) { + if (!containsMatch(target, pattern[i])) { + return false; + } + } + + return true; + } + + function matchObject(target, pattern) { + var result = true; + forOwn(pattern, function(val, key) { + if (!deepMatches(target[key], val)) { + // Return false to break out of forOwn early + return (result = false); + } + }); + + return result; + } + + /** + * Recursively check if the objects match. + */ + function deepMatches(target, pattern){ + if (target && typeof target === 'object') { + if (isArray(target) && isArray(pattern)) { + return matchArray(target, pattern); + } else { + return matchObject(target, pattern); + } + } else { + return target === pattern; + } + } + + return deepMatches; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js new file mode 100644 index 00000000..1b4178ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js @@ -0,0 +1,33 @@ +define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { + + /** + * Mixes objects into the target object, recursively mixing existing child + * objects. + */ + function deepMixIn(target, objects) { + var i = 0, + n = arguments.length, + obj; + + while(++i < n){ + obj = arguments[i]; + if (obj) { + forOwn(obj, copyProp, target); + } + } + + return target; + } + + function copyProp(val, key) { + var existing = this[key]; + if (isPlainObject(val) && isPlainObject(existing)) { + deepMixIn(existing, val); + } else { + this[key] = val; + } + } + + return deepMixIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js new file mode 100644 index 00000000..596cb952 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js @@ -0,0 +1,34 @@ +define(['./hasOwn', './every', '../lang/isObject'], function(hasOwn, every, isObject) { + + function defaultCompare(a, b) { + return a === b; + } + + // Makes a function to compare the object values from the specified compare + // operation callback. + function makeCompare(callback) { + return function(value, key) { + return hasOwn(this, key) && callback(value, this[key]); + }; + } + + function checkProperties(value, key) { + return hasOwn(this, key); + } + + /** + * Checks if two objects have the same keys and values. + */ + function equals(a, b, callback) { + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + return (every(a, makeCompare(callback), b) && + every(b, checkProperties, a)); + } + + return equals; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/every.js new file mode 100644 index 00000000..52983a5e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/every.js @@ -0,0 +1,22 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Object every + */ + function every(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + forOwn(obj, function(val, key) { + // we consider any falsy values as "false" on purpose so shorthand + // syntax can be used to check property existence + if (!callback(val, key, obj)) { + result = false; + return false; // break + } + }); + return result; + } + + return every; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js new file mode 100644 index 00000000..0845d3c2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js @@ -0,0 +1,19 @@ +define(['../array/forEach', './forOwn'], function (forEach, forOwn) { + + /** + * Copy missing properties in the obj from the defaults. + */ + function fillIn(obj, var_defaults){ + forEach(Array.prototype.slice.call(arguments, 1), function(base){ + forOwn(base, function(val, key){ + if (obj[key] == null) { + obj[key] = val; + } + }); + }); + return obj; + } + + return fillIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js new file mode 100644 index 00000000..f213b915 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js @@ -0,0 +1,19 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Creates a new object with all the properties where the callback returns + * true. + */ + function filterValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + output[key] = value; + } + }); + + return output; + } + return filterValues; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/find.js new file mode 100644 index 00000000..47e6b09d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/find.js @@ -0,0 +1,20 @@ +define(['./some', '../function/makeIterator_'], function(some, makeIterator) { + + /** + * Returns first item that matches criteria + */ + function find(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result; + some(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + result = value; + return true; //break + } + }); + return result; + } + + return find; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js new file mode 100644 index 00000000..2058e9cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js @@ -0,0 +1,62 @@ +define(function () { + + var _hasDontEnumBug, + _dontEnums; + + function checkDontEnum(){ + _dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + + _hasDontEnumBug = true; + + for (var key in {'toString': null}) { + _hasDontEnumBug = false; + } + } + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forIn(obj, fn, thisObj){ + var key, i = 0; + // no need to check if argument is a real object that way we can use + // it for arrays, functions, date, etc. + + //post-pone check till needed + if (_hasDontEnumBug == null) checkDontEnum(); + + for (key in obj) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + + if (_hasDontEnumBug) { + while (key = _dontEnums[i++]) { + // since we aren't using hasOwn check we need to make sure the + // property was overwritten + if (obj[key] !== Object.prototype[key]) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + } + } + } + + function exec(fn, obj, key, thisObj){ + return fn.call(thisObj, obj[key], key, obj); + } + + return forIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js new file mode 100644 index 00000000..b40cbaf1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js @@ -0,0 +1,18 @@ +define(['./hasOwn', './forIn'], function (hasOwn, forIn) { + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forOwn(obj, fn, thisObj){ + forIn(obj, function(val, key){ + if (hasOwn(obj, key)) { + return fn.call(thisObj, obj[key], key, obj); + } + }); + } + + return forOwn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js new file mode 100644 index 00000000..60fee3dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js @@ -0,0 +1,18 @@ +define(['./forIn'], function (forIn) { + + /** + * return a list of all enumerable properties that have function values + */ + function functions(obj){ + var keys = []; + forIn(obj, function(val, key){ + if (typeof val === 'function'){ + keys.push(key); + } + }); + return keys.sort(); + } + + return functions; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/get.js new file mode 100644 index 00000000..ca80b059 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/get.js @@ -0,0 +1,20 @@ +define(function () { + + /** + * get "nested" object property + */ + function get(obj, prop){ + var parts = prop.split('.'), + last = parts.pop(); + + while (prop = parts.shift()) { + obj = obj[prop]; + if (typeof obj !== 'object') return; + } + + return obj[last]; + } + + return get; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/has.js new file mode 100644 index 00000000..cc29817f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/has.js @@ -0,0 +1,15 @@ +define(['./get'], function (get) { + + var UNDEF; + + /** + * Check if object has nested property. + */ + function has(obj, prop){ + return get(obj, prop) !== UNDEF; + } + + return has; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js new file mode 100644 index 00000000..5c53bcf2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js @@ -0,0 +1,12 @@ +define(function () { + + /** + * Safer Object.hasOwnProperty + */ + function hasOwn(obj, prop){ + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + return hasOwn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js new file mode 100644 index 00000000..ed7c4f91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object keys + */ + var keys = Object.keys || function (obj) { + var keys = []; + forOwn(obj, function(val, key){ + keys.push(key); + }); + return keys; + }; + + return keys; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/map.js new file mode 100644 index 00000000..2958f6b0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/map.js @@ -0,0 +1,17 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Creates a new object where all the values are the result of calling + * `callback`. + */ + function mapValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(val, key, obj) { + output[key] = callback(val, key, obj); + }); + + return output; + } + return mapValues; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js new file mode 100644 index 00000000..73ff427c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js @@ -0,0 +1,20 @@ +define(['./forOwn'], function (forOwn) { + + /** + * checks if a object contains all given properties/values + */ + function matches(target, props){ + // can't use "object/every" because of circular dependency + var result = true; + forOwn(props, function(val, key){ + if (target[key] !== val) { + // break loop at first difference + return (result = false); + } + }); + return result; + } + + return matches; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/max.js new file mode 100644 index 00000000..ef311dcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/max.js @@ -0,0 +1,11 @@ +define(['../array/max', './values'], function(arrMax, values) { + + /** + * Returns maximum value inside object. + */ + function max(obj, compareFn) { + return arrMax(values(obj), compareFn); + } + + return max; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js new file mode 100644 index 00000000..d7cfedec --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js @@ -0,0 +1,38 @@ +define(['./hasOwn', '../lang/deepClone', '../lang/isObject'], function (hasOwn, deepClone, isObject) { + + /** + * Deep merge objects. + */ + function merge() { + var i = 1, + key, val, obj, target; + + // make sure we don't modify source element and it's properties + // objects are passed by reference + target = deepClone( arguments[0] ); + + while (obj = arguments[i++]) { + for (key in obj) { + if ( ! hasOwn(obj, key) ) { + continue; + } + + val = obj[key]; + + if ( isObject(val) && isObject(target[key]) ){ + // inception, deep merge objects + target[key] = merge(target[key], val); + } else { + // make sure arrays, regexp, date, objects are cloned + target[key] = deepClone(val); + } + + } + } + + return target; + } + + return merge; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/min.js new file mode 100644 index 00000000..9fb4c1a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/min.js @@ -0,0 +1,11 @@ +define(['../array/min', './values'], function(arrMin, values) { + + /** + * Returns minimum value inside object. + */ + function min(obj, iterator) { + return arrMin(values(obj), iterator); + } + + return min; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js new file mode 100644 index 00000000..6210b7e7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js @@ -0,0 +1,28 @@ +define(['./forOwn'], function(forOwn){ + + /** + * Combine properties from all the objects into first one. + * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. + * @param {object} target Target Object + * @param {...object} objects Objects to be combined (0...n objects). + * @return {object} Target Object. + */ + function mixIn(target, objects){ + var i = 0, + n = arguments.length, + obj; + while(++i < n){ + obj = arguments[i]; + if (obj != null) { + forOwn(obj, copyProp, target); + } + } + return target; + } + + function copyProp(val, key){ + this[key] = val; + } + + return mixIn; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js new file mode 100644 index 00000000..7ed65db8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js @@ -0,0 +1,19 @@ +define(['../array/forEach'], function (forEach) { + + /** + * Create nested object if non-existent + */ + function namespace(obj, path){ + if (!path) return obj; + forEach(path.split('.'), function(key){ + if (!obj[key]) { + obj[key] = {}; + } + obj = obj[key]; + }); + return obj; + } + + return namespace; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js new file mode 100644 index 00000000..76e22bfc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js @@ -0,0 +1,18 @@ +define(function(){ + + /** + * Return a copy of the object, filtered to only have values for the whitelisted keys. + */ + function pick(obj, var_keys){ + var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), + out = {}, + i = 0, key; + while (key = keys[i++]) { + out[key] = obj[key]; + } + return out; + } + + return pick; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js new file mode 100644 index 00000000..d47744bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js @@ -0,0 +1,12 @@ +define(['./map', '../function/prop'], function (map, prop) { + + /** + * Extract a list of property values. + */ + function pluck(obj, propName){ + return map(obj, prop(propName)); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js new file mode 100644 index 00000000..d3a57788 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js @@ -0,0 +1,28 @@ +define(['./forOwn', './size'], function(forOwn, size) { + + /** + * Object reduce + */ + function reduce(obj, callback, memo, thisObj) { + var initial = arguments.length > 2; + + if (!size(obj) && !initial) { + throw new Error('reduce of empty object with no initial value'); + } + + forOwn(obj, function(value, key, list) { + if (!initial) { + memo = value; + initial = true; + } + else { + memo = callback.call(thisObj, memo, value, key, list); + } + }); + + return memo; + } + + return reduce; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js new file mode 100644 index 00000000..84296428 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js @@ -0,0 +1,15 @@ +define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { + + /** + * Object reject + */ + function reject(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + return filter(obj, function(value, index, obj) { + return !callback(value, index, obj); + }, thisObj); + } + + return reject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/set.js new file mode 100644 index 00000000..b8fa25a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/set.js @@ -0,0 +1,17 @@ +define(['./namespace'], function (namespace) { + + /** + * set "nested" object property + */ + function set(obj, prop, val){ + var parts = (/^(.+)\.(.+)$/).exec(prop); + if (parts){ + namespace(obj, parts[1])[parts[2]] = val; + } else { + obj[prop] = val; + } + } + + return set; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/size.js new file mode 100644 index 00000000..c6e377cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/size.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object size + */ + function size(obj) { + var count = 0; + forOwn(obj, function(){ + count++; + }); + return count; + } + + return size; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/some.js new file mode 100644 index 00000000..1bd6fdae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/some.js @@ -0,0 +1,20 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Object some + */ + function some(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + forOwn(obj, function(val, key) { + if (callback(val, key, obj)) { + result = true; + return false; // break + } + }); + return result; + } + + return some; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js new file mode 100644 index 00000000..787fc19a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js @@ -0,0 +1,23 @@ +define(['./has'], function (has) { + + /** + * Unset object property. + */ + function unset(obj, prop){ + if (has(obj, prop)) { + var parts = prop.split('.'), + last = parts.pop(); + while (prop = parts.shift()) { + obj = obj[prop]; + } + return (delete obj[last]); + + } else { + // if property doesn't exist treat as deleted + return true; + } + } + + return unset; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/values.js new file mode 100644 index 00000000..b311fd09 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/values.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object values + */ + function values(obj) { + var vals = []; + forOwn(obj, function(val, key){ + vals.push(val); + }); + return vals; + } + + return values; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString.js new file mode 100644 index 00000000..44346127 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString.js @@ -0,0 +1,15 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'contains' : require('./queryString/contains'), + 'decode' : require('./queryString/decode'), + 'encode' : require('./queryString/encode'), + 'getParam' : require('./queryString/getParam'), + 'getQuery' : require('./queryString/getQuery'), + 'parse' : require('./queryString/parse'), + 'setParam' : require('./queryString/setParam') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js new file mode 100644 index 00000000..a6d11cce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js @@ -0,0 +1,12 @@ +define(['./getQuery'], function (getQuery) { + + /** + * Checks if query string contains parameter. + */ + function contains(url, paramName) { + var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` + return regex.test(getQuery(url)); + } + + return contains; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js new file mode 100644 index 00000000..02bc1609 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js @@ -0,0 +1,20 @@ +define(['../string/typecast', '../lang/isString'], function (typecast, isString) { + + /** + * Decode query string into an object of keys => vals. + */ + function decode(queryStr, shouldTypecast) { + var queryArr = (queryStr || '').replace('?', '').split('&'), + n = queryArr.length, + obj = {}, + item, val; + while (n--) { + item = queryArr[n].split('='); + val = shouldTypecast === false? item[1] : typecast(item[1]); + obj[item[0]] = isString(val)? decodeURIComponent(val) : val; + } + return obj; + } + + return decode; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js new file mode 100644 index 00000000..bd72a5b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js @@ -0,0 +1,15 @@ +define(['../object/forOwn'], function (forOwn) { + + /** + * Encode object into a query string. + */ + function encode(obj){ + var query = []; + forOwn(obj, function(val, key){ + query.push( key +'='+ encodeURIComponent(val) ); + }); + return (query.length)? '?'+ query.join('&') : ''; + } + + return encode; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js new file mode 100644 index 00000000..d9813724 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js @@ -0,0 +1,14 @@ +define(['../string/typecast', './getQuery'], function (typecast, getQuery) { + + /** + * Get query parameter value. + */ + function getParam(url, param, shouldTypecast){ + var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 + result = regexp.exec( getQuery(url) ), + val = (result && result[2])? result[2] : null; + return shouldTypecast === false? val : typecast(val); + } + + return getParam; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js new file mode 100644 index 00000000..aa3d99f3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * Gets full query as string with all special chars decoded. + */ + function getQuery(url) { + url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) + var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt + return (queryString)? decodeURIComponent(queryString[0]) : ''; + } + + return getQuery; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js new file mode 100644 index 00000000..ac153e3f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js @@ -0,0 +1,12 @@ +define(['./decode', './getQuery'], function (decode, getQuery) { + + /** + * Get query string, parses and decodes it. + */ + function parse(url, shouldTypecast) { + return decode(getQuery(url), shouldTypecast); + } + + return parse; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js new file mode 100644 index 00000000..97081aa7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Set query string parameter value + */ + function setParam(url, paramName, value){ + url = url || ''; + + var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); + var param = paramName +'='+ encodeURIComponent( value ); + + if ( re.test(url) ) { + return url.replace(re, '$1'+ param); + } else { + if (url.indexOf('?') === -1) { + url += '?'; + } + if (url.indexOf('=') !== -1) { + url += '&'; + } + return url + param; + } + + } + + return setParam; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random.js new file mode 100644 index 00000000..b2641ee3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random.js @@ -0,0 +1,16 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'choice' : require('./random/choice'), + 'guid' : require('./random/guid'), + 'rand' : require('./random/rand'), + 'randBit' : require('./random/randBit'), + 'randHex' : require('./random/randHex'), + 'randInt' : require('./random/randInt'), + 'randSign' : require('./random/randSign'), + 'random' : require('./random/random') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js new file mode 100644 index 00000000..0d0c38df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js @@ -0,0 +1,14 @@ +define(['./randInt', '../lang/isArray'], function (randInt, isArray) { + + /** + * Returns a random element from the supplied arguments + * or from the array (if single argument is an array). + */ + function choice(items) { + var target = (arguments.length === 1 && isArray(items))? items : arguments; + return target[ randInt(0, target.length - 1) ]; + } + + return choice; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js new file mode 100644 index 00000000..82f3a2db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js @@ -0,0 +1,23 @@ +define(['./randHex', './choice'], function (randHex, choice) { + + /** + * Returns pseudo-random guid (UUID v4) + * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random + * by default and sequences can be predicted in some cases. See the + * "random/random" documentation for more info about it and how to replace + * the default PRNG. + */ + function guid() { + return ( + randHex(8)+'-'+ + randHex(4)+'-'+ + // v4 UUID always contain "4" at this position to specify it was + // randomly generated + '4' + randHex(3) +'-'+ + // v4 UUID always contain chars [a,b,8,9] at this position + choice(8, 9, 'a', 'b') + randHex(3)+'-'+ + randHex(12) + ); + } + return guid; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js new file mode 100644 index 00000000..b8c231dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js @@ -0,0 +1,13 @@ +define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ + + /** + * Returns random number inside range + */ + function rand(min, max){ + min = min == null? MIN_INT : min; + max = max == null? MAX_INT : max; + return min + (max - min) * random(); + } + + return rand; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js new file mode 100644 index 00000000..b3422d2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js @@ -0,0 +1,11 @@ +define(['./random'], function (random) { + + /** + * Returns random bit (0 or 1) + */ + function randomBit() { + return random() > 0.5? 1 : 0; + } + + return randomBit; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js new file mode 100644 index 00000000..6e9bf1c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js @@ -0,0 +1,19 @@ +define(['./choice'], function (choice) { + + var _chars = '0123456789abcdef'.split(''); + + /** + * Returns a random hexadecimal string + */ + function randHex(size){ + size = size && size > 0? size : 6; + var str = ''; + while (size--) { + str += choice(_chars); + } + return str; + } + + return randHex; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js new file mode 100644 index 00000000..1750e9de --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js @@ -0,0 +1,16 @@ +define(['../number/MIN_INT', '../number/MAX_INT', './rand'], function(MIN_INT, MAX_INT, rand){ + + /** + * Gets random integer inside range or snap to min/max values. + */ + function randInt(min, max){ + min = min == null? MIN_INT : ~~min; + max = max == null? MAX_INT : ~~max; + // can't be max + 0.5 otherwise it will round up if `rand` + // returns `max` causing it to overflow range. + // -0.5 and + 0.49 are required to avoid bias caused by rounding + return Math.round( rand(min - 0.5, max + 0.499999999999) ); + } + + return randInt; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js new file mode 100644 index 00000000..4141cdf6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js @@ -0,0 +1,11 @@ +define(['./random'], function (random) { + + /** + * Returns random sign (-1 or 1) + */ + function randomSign() { + return random() > 0.5? 1 : -1; + } + + return randomSign; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/random.js new file mode 100644 index 00000000..4270822e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/random.js @@ -0,0 +1,18 @@ +define(function () { + + /** + * Just a wrapper to Math.random. No methods inside mout/random should call + * Math.random() directly so we can inject the pseudo-random number + * generator if needed (ie. in case we need a seeded random or a better + * algorithm than the native one) + */ + function random(){ + return random.get(); + } + + // we expose the method so it can be swapped if needed + random.get = Math.random; + + return random; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string.js new file mode 100644 index 00000000..3f5fd804 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string.js @@ -0,0 +1,45 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'WHITE_SPACES' : require('./string/WHITE_SPACES'), + 'camelCase' : require('./string/camelCase'), + 'contains' : require('./string/contains'), + 'crop' : require('./string/crop'), + 'endsWith' : require('./string/endsWith'), + 'escapeHtml' : require('./string/escapeHtml'), + 'escapeRegExp' : require('./string/escapeRegExp'), + 'escapeUnicode' : require('./string/escapeUnicode'), + 'hyphenate' : require('./string/hyphenate'), + 'interpolate' : require('./string/interpolate'), + 'lowerCase' : require('./string/lowerCase'), + 'lpad' : require('./string/lpad'), + 'ltrim' : require('./string/ltrim'), + 'makePath' : require('./string/makePath'), + 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), + 'pascalCase' : require('./string/pascalCase'), + 'properCase' : require('./string/properCase'), + 'removeNonASCII' : require('./string/removeNonASCII'), + 'removeNonWord' : require('./string/removeNonWord'), + 'repeat' : require('./string/repeat'), + 'replace' : require('./string/replace'), + 'replaceAccents' : require('./string/replaceAccents'), + 'rpad' : require('./string/rpad'), + 'rtrim' : require('./string/rtrim'), + 'sentenceCase' : require('./string/sentenceCase'), + 'slugify' : require('./string/slugify'), + 'startsWith' : require('./string/startsWith'), + 'stripHtmlTags' : require('./string/stripHtmlTags'), + 'trim' : require('./string/trim'), + 'truncate' : require('./string/truncate'), + 'typecast' : require('./string/typecast'), + 'unCamelCase' : require('./string/unCamelCase'), + 'underscore' : require('./string/underscore'), + 'unescapeHtml' : require('./string/unescapeHtml'), + 'unescapeUnicode' : require('./string/unescapeUnicode'), + 'unhyphenate' : require('./string/unhyphenate'), + 'upperCase' : require('./string/upperCase') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js new file mode 100644 index 00000000..e830d86d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js @@ -0,0 +1,12 @@ +define(function() { + /** + * Contains all Unicode white-spaces. Taken from + * http://en.wikipedia.org/wiki/Whitespace_character. + */ + return [ + ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', + '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', + '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', + '\u205F', '\u3000' + ]; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js new file mode 100644 index 00000000..02e6c04d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js @@ -0,0 +1,16 @@ +define(['../lang/toString', './replaceAccents', './removeNonWord', './upperCase', './lowerCase'], function(toString, replaceAccents, removeNonWord, upperCase, lowerCase){ + /** + * Convert string to camelCase text. + */ + function camelCase(str){ + str = toString(str); + str = replaceAccents(str); + str = removeNonWord(str) + .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces + .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE + .replace(/\s+/g, '') //remove spaces + .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase + return str; + } + return camelCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js new file mode 100644 index 00000000..825b5a5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js @@ -0,0 +1,14 @@ +define(['../lang/toString'], function(toString) { + + /** + * Searches for a given substring + */ + function contains(str, substring, fromIndex){ + str = toString(str); + substring = toString(substring); + return str.indexOf(substring, fromIndex) !== -1; + } + + return contains; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js new file mode 100644 index 00000000..3c073f05 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './truncate'], function (toString, truncate) { + /** + * Truncate string at full words. + */ + function crop(str, maxChars, append) { + str = toString(str); + return truncate(str, maxChars, append, true); + } + + return crop; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js new file mode 100644 index 00000000..31a73f20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function(toString) { + /** + * Checks if string ends with specified suffix. + */ + function endsWith(str, suffix) { + str = toString(str); + suffix = toString(suffix); + + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + + return endsWith; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js new file mode 100644 index 00000000..de34b61b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function(toString) { + + /** + * Escapes a string for insertion into HTML. + */ + function escapeHtml(str){ + str = toString(str) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/'/g, ''') + .replace(/"/g, '"'); + return str; + } + + return escapeHtml; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js new file mode 100644 index 00000000..32facac0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js @@ -0,0 +1,15 @@ +define(['../lang/toString'], function(toString) { + + var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; + + /** + * Escape RegExp string chars. + */ + function escapeRegExp(str) { + str = toString(str); + return str.replace(ESCAPE_CHARS,'\\$&'); + } + + return escapeRegExp; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js new file mode 100644 index 00000000..bd5e8c4c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js @@ -0,0 +1,21 @@ +define(['../lang/toString'], function(toString) { + + /** + * Escape string into unicode sequences + */ + function escapeUnicode(str, shouldEscapePrintable){ + str = toString(str); + return str.replace(/[\s\S]/g, function(ch){ + // skip printable ASCII chars if we should not escape them + if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { + return ch; + } + // we use "000" and slice(-4) for brevity, need to pad zeros, + // unicode escape always have 4 chars after "\u" + return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); + }); + } + + return escapeUnicode; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js new file mode 100644 index 00000000..679c405c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js @@ -0,0 +1,12 @@ +define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ + /** + * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function hyphenate(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "-"); + } + + return hyphenate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js new file mode 100644 index 00000000..ecb8ba80 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function(toString) { + + var stache = /\{\{(\w+)\}\}/g; //mustache-like + + /** + * String interpolation + */ + function interpolate(template, replacements, syntax){ + template = toString(template); + var replaceFn = function(match, prop){ + return (prop in replacements)? toString(replacements[prop]) : ''; + }; + return template.replace(syntax || stache, replaceFn); + } + + return interpolate; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js new file mode 100644 index 00000000..b045d69c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * "Safer" String.toLowerCase() + */ + function lowerCase(str){ + str = toString(str); + return str.toLowerCase(); + } + + return lowerCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js new file mode 100644 index 00000000..ea4f5fbf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js @@ -0,0 +1,16 @@ +define(['../lang/toString', './repeat'], function(toString, repeat) { + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function lpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + + return ((str.length < minLen) + ? repeat(ch, minLen - str.length) + str : str); + } + + return lpad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js new file mode 100644 index 00000000..477df953 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js @@ -0,0 +1,33 @@ +define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ + /** + * Remove chars from beginning of string. + */ + function ltrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var start = 0, + len = str.length, + charLen = chars.length, + found = true, + i, c; + + while (found && start < len) { + found = false; + i = -1; + c = str.charAt(start); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + start++; + break; + } + } + } + + return (start >= len) ? '' : str.substr(start, len); + } + + return ltrim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js new file mode 100644 index 00000000..7aa7baba --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js @@ -0,0 +1,13 @@ +define(['../array/join'], function(join){ + + /** + * Group arguments as path segments, if any of the args is `null` or an + * empty string it will be ignored from resulting path. + */ + function makePath(var_args){ + var result = join(Array.prototype.slice.call(arguments), '/'); + return result.replace(/\/{2,}/g, '/'); + } + + return makePath; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js new file mode 100644 index 00000000..44e4194f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function (toString) { + + /** + * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) + */ + function normalizeLineBreaks(str, lineEnd) { + str = toString(str); + lineEnd = lineEnd || '\n'; + + return str + .replace(/\r\n/g, lineEnd) // DOS + .replace(/\r/g, lineEnd) // Mac + .replace(/\n/g, lineEnd); // Unix + } + + return normalizeLineBreaks; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js new file mode 100644 index 00000000..ead9ead4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ + /** + * camelCase + UPPERCASE first char + */ + function pascalCase(str){ + str = toString(str); + return camelCase(str).replace(/^[a-z]/, upperCase); + } + + return pascalCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js new file mode 100644 index 00000000..2987b507 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ + /** + * UPPERCASE first char of each word. + */ + function properCase(str){ + str = toString(str); + return lowerCase(str).replace(/^\w|\s\w/g, upperCase); + } + + return properCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js new file mode 100644 index 00000000..4905869d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js @@ -0,0 +1,14 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove non-printable ASCII chars + */ + function removeNonASCII(str){ + str = toString(str); + + // Matches non-printable ASCII chars - + // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters + return str.replace(/[^\x20-\x7E]/g, ''); + } + + return removeNonASCII; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js new file mode 100644 index 00000000..2b1a2040 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove non-word chars. + */ + function removeNonWord(str){ + str = toString(str); + return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); + } + + return removeNonWord; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js new file mode 100644 index 00000000..02f5659f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function(toString){ + + /** + * Repeat string n times + */ + function repeat(str, n){ + str = toString(str); + return (new Array(n + 1)).join(str); + } + + return repeat; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js new file mode 100644 index 00000000..8b762fdc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js @@ -0,0 +1,32 @@ +define(['../lang/toString', '../lang/toArray'], function (toString, toArray) { + + /** + * Replace string(s) with the replacement(s) in the source. + */ + function replace(str, search, replacements) { + str = toString(str); + search = toArray(search); + replacements = toArray(replacements); + + var searchLength = search.length, + replacementsLength = replacements.length; + + if (replacementsLength !== 1 && searchLength !== replacementsLength) { + throw new Error('Unequal number of searches and replacements'); + } + + var i = -1; + while (++i < searchLength) { + // Use the first replacement for all searches if only one + // replacement is provided + str = str.replace( + search[i], + replacements[(replacementsLength === 1) ? 0 : i]); + } + + return str; + } + + return replace; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js new file mode 100644 index 00000000..3a63f55a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js @@ -0,0 +1,36 @@ +define(['../lang/toString'], function(toString){ + /** + * Replaces all accented chars with regular ones + */ + function replaceAccents(str){ + str = toString(str); + + // verifies if the String has accents and replace them + if (str.search(/[\xC0-\xFF]/g) > -1) { + str = str + .replace(/[\xC0-\xC5]/g, "A") + .replace(/[\xC6]/g, "AE") + .replace(/[\xC7]/g, "C") + .replace(/[\xC8-\xCB]/g, "E") + .replace(/[\xCC-\xCF]/g, "I") + .replace(/[\xD0]/g, "D") + .replace(/[\xD1]/g, "N") + .replace(/[\xD2-\xD6\xD8]/g, "O") + .replace(/[\xD9-\xDC]/g, "U") + .replace(/[\xDD]/g, "Y") + .replace(/[\xDE]/g, "P") + .replace(/[\xE0-\xE5]/g, "a") + .replace(/[\xE6]/g, "ae") + .replace(/[\xE7]/g, "c") + .replace(/[\xE8-\xEB]/g, "e") + .replace(/[\xEC-\xEF]/g, "i") + .replace(/[\xF1]/g, "n") + .replace(/[\xF2-\xF6\xF8]/g, "o") + .replace(/[\xF9-\xFC]/g, "u") + .replace(/[\xFE]/g, "p") + .replace(/[\xFD\xFF]/g, "y"); + } + return str; + } + return replaceAccents; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js new file mode 100644 index 00000000..2efd9c88 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js @@ -0,0 +1,14 @@ +define(['../lang/toString', './repeat'], function (toString, repeat) { + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function rpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; + } + + return rpad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js new file mode 100644 index 00000000..a4cc282d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js @@ -0,0 +1,32 @@ +define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ + /** + * Remove chars from end of string. + */ + function rtrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var end = str.length - 1, + charLen = chars.length, + found = true, + i, c; + + while (found && end >= 0) { + found = false; + i = -1; + c = str.charAt(end); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + end--; + break; + } + } + } + + return (end >= 0) ? str.substring(0, end + 1) : ''; + } + + return rtrim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js new file mode 100644 index 00000000..cfe45af5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js @@ -0,0 +1,13 @@ +define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ + /** + * UPPERCASE first char of each sentence and lowercase other chars. + */ + function sentenceCase(str){ + str = toString(str); + + // Replace first char of each sentence (new line or after '.\s+') to + // UPPERCASE + return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); + } + return sentenceCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js new file mode 100644 index 00000000..c6d68c7e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js @@ -0,0 +1,21 @@ +define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ + /** + * Convert to lower case, remove accents, remove non-word chars and + * replace spaces with the specified delimeter. + * Does not split camelCase text. + */ + function slugify(str, delimeter){ + str = toString(str); + + if (delimeter == null) { + delimeter = "-"; + } + str = replaceAccents(str); + str = removeNonWord(str); + str = trim(str) //should come after removeNonWord + .replace(/ +/g, delimeter) //replace spaces with delimeter + .toLowerCase(); + return str; + } + return slugify; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js new file mode 100644 index 00000000..88ae5453 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function (toString) { + /** + * Checks if string starts with specified prefix. + */ + function startsWith(str, prefix) { + str = toString(str); + prefix = toString(prefix); + + return str.indexOf(prefix) === 0; + } + + return startsWith; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js new file mode 100644 index 00000000..e8da956d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove HTML tags from string. + */ + function stripHtmlTags(str){ + str = toString(str); + + return str.replace(/<[^>]*>/g, ''); + } + return stripHtmlTags; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js new file mode 100644 index 00000000..55526041 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js @@ -0,0 +1,12 @@ +define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ + /** + * Remove white-spaces from beginning and end of string. + */ + function trim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + return ltrim(rtrim(str, chars), chars); + } + + return trim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js new file mode 100644 index 00000000..34000d9f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js @@ -0,0 +1,20 @@ +define(['../lang/toString', './trim'], function(toString, trim){ + /** + * Limit number of chars. + */ + function truncate(str, maxChars, append, onlyFullWords){ + str = toString(str); + append = append || '...'; + maxChars = onlyFullWords? maxChars + 1 : maxChars; + + str = trim(str); + if(str.length <= maxChars){ + return str; + } + str = str.substr(0, maxChars - append.length); + //crop at last space or remove trailing whitespace + str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); + return str + append; + } + return truncate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js new file mode 100644 index 00000000..a7c83153 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js @@ -0,0 +1,29 @@ +define(function () { + + var UNDEF; + + /** + * Parses string and convert it into a native value. + */ + function typecast(val) { + var r; + if ( val === null || val === 'null' ) { + r = null; + } else if ( val === 'true' ) { + r = true; + } else if ( val === 'false' ) { + r = false; + } else if ( val === UNDEF || val === 'undefined' ) { + r = UNDEF; + } else if ( val === '' || isNaN(val) ) { + //isNaN('') returns false + r = val; + } else { + //parseFloat(null || '') returns NaN + r = parseFloat(val); + } + return r; + } + + return typecast; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js new file mode 100644 index 00000000..eeef39b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js @@ -0,0 +1,23 @@ +define(['../lang/toString'], function(toString){ + + var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; + + /** + * Add space between camelCase text. + */ + function unCamelCase(str, delimiter){ + if (delimiter == null) { + delimiter = ' '; + } + + function join(str, c1, c2) { + return c1 + delimiter + c2; + } + + str = toString(str); + str = str.replace(CAMEL_CASE_BORDER, join); + str = str.toLowerCase(); //add space between camelCase text + return str; + } + return unCamelCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js new file mode 100644 index 00000000..75dd4649 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ + /** + * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function underscore(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "_"); + } + return underscore; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js new file mode 100644 index 00000000..173c69c2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function (toString) { + + /** + * Unescapes HTML special chars + */ + function unescapeHtml(str){ + str = toString(str) + .replace(/&/g , '&') + .replace(/</g , '<') + .replace(/>/g , '>') + .replace(/'/g , "'") + .replace(/"/g, '"'); + return str; + } + + return unescapeHtml; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js new file mode 100644 index 00000000..d4a7ba1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js @@ -0,0 +1,16 @@ +define(['../lang/toString'], function(toString) { + + /** + * Unescape unicode char sequences + */ + function unescapeUnicode(str){ + str = toString(str); + return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ + var code = parseInt(ch.slice(2), 16); + return String.fromCharCode(code); + }); + } + + return unescapeUnicode; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js new file mode 100644 index 00000000..6ac2fa4c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js @@ -0,0 +1,10 @@ +define(['../lang/toString'], function(toString){ + /** + * Replaces hyphens with spaces. (only hyphens between word chars) + */ + function unhyphenate(str){ + str = toString(str); + return str.replace(/(\w)(-)(\w)/g, '$1 $3'); + } + return unhyphenate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js new file mode 100644 index 00000000..8b2073e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js @@ -0,0 +1,10 @@ +define(['../lang/toString'], function(toString){ + /** + * "Safer" String.toUpperCase() + */ + function upperCase(str){ + str = toString(str); + return str.toUpperCase(); + } + return upperCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time.js new file mode 100644 index 00000000..67c90685 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time.js @@ -0,0 +1,12 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'convert' : require('./time/convert'), + 'now' : require('./time/now'), + 'parseMs' : require('./time/parseMs'), + 'toTimeString' : require('./time/toTimeString') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js new file mode 100644 index 00000000..2de0cf2e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js @@ -0,0 +1,41 @@ +define(function () { + + /** + * convert time into another unit + */ + function convert(val, sourceUnitName, destinationUnitName){ + destinationUnitName = destinationUnitName || 'ms'; + return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); + } + + + //TODO: maybe extract to a separate module + function getUnit(unitName){ + switch(unitName){ + case 'ms': + case 'millisecond': + return 1; + case 's': + case 'second': + return 1000; + case 'm': + case 'minute': + return 60000; + case 'h': + case 'hour': + return 3600000; + case 'd': + case 'day': + return 86400000; + case 'w': + case 'week': + return 604800000; + default: + throw new Error('"'+ unitName + '" is not a valid unit'); + } + } + + + return convert; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/now.js new file mode 100644 index 00000000..a3a38bcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/now.js @@ -0,0 +1,12 @@ +define(function () { + + /** + * Get current time in miliseconds + */ + var now = (typeof Date.now === 'function')? Date.now : function(){ + return +(new Date()); + }; + + return now; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js new file mode 100644 index 00000000..964929ae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js @@ -0,0 +1,17 @@ +define(['../math/countSteps'], function(countSteps){ + + /** + * Parse timestamp into an object. + */ + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + return parseMs; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js new file mode 100644 index 00000000..edf18218 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js @@ -0,0 +1,23 @@ +define(['../math/countSteps', '../number/pad'], function(countSteps, pad){ + + var HOUR = 3600000, + MINUTE = 60000, + SECOND = 1000; + + /** + * Format timestamp into a time string. + */ + function toTimeString(ms){ + var h = ms < HOUR ? 0 : countSteps(ms, HOUR), + m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), + s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), + str = ''; + + str += h? h + ':' : ''; + str += pad(m, 2) + ':'; + str += pad(s, 2); + + return str; + } + return toTimeString; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string.js new file mode 100644 index 00000000..7f0ca3bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string.js @@ -0,0 +1,45 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'WHITE_SPACES' : require('./string/WHITE_SPACES'), + 'camelCase' : require('./string/camelCase'), + 'contains' : require('./string/contains'), + 'crop' : require('./string/crop'), + 'endsWith' : require('./string/endsWith'), + 'escapeHtml' : require('./string/escapeHtml'), + 'escapeRegExp' : require('./string/escapeRegExp'), + 'escapeUnicode' : require('./string/escapeUnicode'), + 'hyphenate' : require('./string/hyphenate'), + 'interpolate' : require('./string/interpolate'), + 'lowerCase' : require('./string/lowerCase'), + 'lpad' : require('./string/lpad'), + 'ltrim' : require('./string/ltrim'), + 'makePath' : require('./string/makePath'), + 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), + 'pascalCase' : require('./string/pascalCase'), + 'properCase' : require('./string/properCase'), + 'removeNonASCII' : require('./string/removeNonASCII'), + 'removeNonWord' : require('./string/removeNonWord'), + 'repeat' : require('./string/repeat'), + 'replace' : require('./string/replace'), + 'replaceAccents' : require('./string/replaceAccents'), + 'rpad' : require('./string/rpad'), + 'rtrim' : require('./string/rtrim'), + 'sentenceCase' : require('./string/sentenceCase'), + 'slugify' : require('./string/slugify'), + 'startsWith' : require('./string/startsWith'), + 'stripHtmlTags' : require('./string/stripHtmlTags'), + 'trim' : require('./string/trim'), + 'truncate' : require('./string/truncate'), + 'typecast' : require('./string/typecast'), + 'unCamelCase' : require('./string/unCamelCase'), + 'underscore' : require('./string/underscore'), + 'unescapeHtml' : require('./string/unescapeHtml'), + 'unescapeUnicode' : require('./string/unescapeUnicode'), + 'unhyphenate' : require('./string/unhyphenate'), + 'upperCase' : require('./string/upperCase') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js new file mode 100644 index 00000000..03e01254 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js @@ -0,0 +1,12 @@ + + /** + * Contains all Unicode white-spaces. Taken from + * http://en.wikipedia.org/wiki/Whitespace_character. + */ + module.exports = [ + ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', + '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', + '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', + '\u205F', '\u3000' + ]; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js new file mode 100644 index 00000000..aadb69a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js @@ -0,0 +1,20 @@ +var toString = require('../lang/toString'); +var replaceAccents = require('./replaceAccents'); +var removeNonWord = require('./removeNonWord'); +var upperCase = require('./upperCase'); +var lowerCase = require('./lowerCase'); + /** + * Convert string to camelCase text. + */ + function camelCase(str){ + str = toString(str); + str = replaceAccents(str); + str = removeNonWord(str) + .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces + .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE + .replace(/\s+/g, '') //remove spaces + .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase + return str; + } + module.exports = camelCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/contains.js new file mode 100644 index 00000000..cb22cae4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/contains.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); + + /** + * Searches for a given substring + */ + function contains(str, substring, fromIndex){ + str = toString(str); + substring = toString(substring); + return str.indexOf(substring, fromIndex) !== -1; + } + + module.exports = contains; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/crop.js new file mode 100644 index 00000000..53b93b49 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/crop.js @@ -0,0 +1,12 @@ +var toString = require('../lang/toString'); +var truncate = require('./truncate'); + /** + * Truncate string at full words. + */ + function crop(str, maxChars, append) { + str = toString(str); + return truncate(str, maxChars, append, true); + } + + module.exports = crop; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js new file mode 100644 index 00000000..d504e9dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + /** + * Checks if string ends with specified suffix. + */ + function endsWith(str, suffix) { + str = toString(str); + suffix = toString(suffix); + + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + + module.exports = endsWith; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js new file mode 100644 index 00000000..e67c4b21 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Escapes a string for insertion into HTML. + */ + function escapeHtml(str){ + str = toString(str) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/'/g, ''') + .replace(/"/g, '"'); + return str; + } + + module.exports = escapeHtml; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js new file mode 100644 index 00000000..70cb84ff --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); + + var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; + + /** + * Escape RegExp string chars. + */ + function escapeRegExp(str) { + str = toString(str); + return str.replace(ESCAPE_CHARS,'\\$&'); + } + + module.exports = escapeRegExp; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js new file mode 100644 index 00000000..ec649adf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js @@ -0,0 +1,21 @@ +var toString = require('../lang/toString'); + + /** + * Escape string into unicode sequences + */ + function escapeUnicode(str, shouldEscapePrintable){ + str = toString(str); + return str.replace(/[\s\S]/g, function(ch){ + // skip printable ASCII chars if we should not escape them + if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { + return ch; + } + // we use "000" and slice(-4) for brevity, need to pad zeros, + // unicode escape always have 4 chars after "\u" + return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); + }); + } + + module.exports = escapeUnicode; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js new file mode 100644 index 00000000..95e32436 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); +var slugify = require('./slugify'); +var unCamelCase = require('./unCamelCase'); + /** + * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function hyphenate(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "-"); + } + + module.exports = hyphenate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js new file mode 100644 index 00000000..ac88fac2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + var stache = /\{\{(\w+)\}\}/g; //mustache-like + + /** + * String interpolation + */ + function interpolate(template, replacements, syntax){ + template = toString(template); + var replaceFn = function(match, prop){ + return (prop in replacements)? toString(replacements[prop]) : ''; + }; + return template.replace(syntax || stache, replaceFn); + } + + module.exports = interpolate; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js new file mode 100644 index 00000000..30bb7ad9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * "Safer" String.toLowerCase() + */ + function lowerCase(str){ + str = toString(str); + return str.toLowerCase(); + } + + module.exports = lowerCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lpad.js new file mode 100644 index 00000000..694d711e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lpad.js @@ -0,0 +1,17 @@ +var toString = require('../lang/toString'); +var repeat = require('./repeat'); + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function lpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + + return ((str.length < minLen) + ? repeat(ch, minLen - str.length) + str : str); + } + + module.exports = lpad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js new file mode 100644 index 00000000..23d7b33f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js @@ -0,0 +1,34 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); + /** + * Remove chars from beginning of string. + */ + function ltrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var start = 0, + len = str.length, + charLen = chars.length, + found = true, + i, c; + + while (found && start < len) { + found = false; + i = -1; + c = str.charAt(start); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + start++; + break; + } + } + } + + return (start >= len) ? '' : str.substr(start, len); + } + + module.exports = ltrim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/makePath.js new file mode 100644 index 00000000..69aef310 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/makePath.js @@ -0,0 +1,13 @@ +var join = require('../array/join'); + + /** + * Group arguments as path segments, if any of the args is `null` or an + * empty string it will be ignored from resulting path. + */ + function makePath(var_args){ + var result = join(Array.prototype.slice.call(arguments), '/'); + return result.replace(/\/{2,}/g, '/'); + } + + module.exports = makePath; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js new file mode 100644 index 00000000..8a8dccfd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) + */ + function normalizeLineBreaks(str, lineEnd) { + str = toString(str); + lineEnd = lineEnd || '\n'; + + return str + .replace(/\r\n/g, lineEnd) // DOS + .replace(/\r/g, lineEnd) // Mac + .replace(/\n/g, lineEnd); // Unix + } + + module.exports = normalizeLineBreaks; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js new file mode 100644 index 00000000..fd190353 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var camelCase = require('./camelCase'); +var upperCase = require('./upperCase'); + /** + * camelCase + UPPERCASE first char + */ + function pascalCase(str){ + str = toString(str); + return camelCase(str).replace(/^[a-z]/, upperCase); + } + + module.exports = pascalCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/properCase.js new file mode 100644 index 00000000..61636be4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/properCase.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var lowerCase = require('./lowerCase'); +var upperCase = require('./upperCase'); + /** + * UPPERCASE first char of each word. + */ + function properCase(str){ + str = toString(str); + return lowerCase(str).replace(/^\w|\s\w/g, upperCase); + } + + module.exports = properCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js new file mode 100644 index 00000000..fb463816 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); + /** + * Remove non-printable ASCII chars + */ + function removeNonASCII(str){ + str = toString(str); + + // Matches non-printable ASCII chars - + // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters + return str.replace(/[^\x20-\x7E]/g, ''); + } + + module.exports = removeNonASCII; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js new file mode 100644 index 00000000..bdd153b9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * Remove non-word chars. + */ + function removeNonWord(str){ + str = toString(str); + return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); + } + + module.exports = removeNonWord; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/repeat.js new file mode 100644 index 00000000..0f9b4754 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/repeat.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + + /** + * Repeat string n times + */ + function repeat(str, n){ + str = toString(str); + return (new Array(n + 1)).join(str); + } + + module.exports = repeat; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replace.js new file mode 100644 index 00000000..14433fc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replace.js @@ -0,0 +1,33 @@ +var toString = require('../lang/toString'); +var toArray = require('../lang/toArray'); + + /** + * Replace string(s) with the replacement(s) in the source. + */ + function replace(str, search, replacements) { + str = toString(str); + search = toArray(search); + replacements = toArray(replacements); + + var searchLength = search.length, + replacementsLength = replacements.length; + + if (replacementsLength !== 1 && searchLength !== replacementsLength) { + throw new Error('Unequal number of searches and replacements'); + } + + var i = -1; + while (++i < searchLength) { + // Use the first replacement for all searches if only one + // replacement is provided + str = str.replace( + search[i], + replacements[(replacementsLength === 1) ? 0 : i]); + } + + return str; + } + + module.exports = replace; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js new file mode 100644 index 00000000..bb221265 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js @@ -0,0 +1,36 @@ +var toString = require('../lang/toString'); + /** + * Replaces all accented chars with regular ones + */ + function replaceAccents(str){ + str = toString(str); + + // verifies if the String has accents and replace them + if (str.search(/[\xC0-\xFF]/g) > -1) { + str = str + .replace(/[\xC0-\xC5]/g, "A") + .replace(/[\xC6]/g, "AE") + .replace(/[\xC7]/g, "C") + .replace(/[\xC8-\xCB]/g, "E") + .replace(/[\xCC-\xCF]/g, "I") + .replace(/[\xD0]/g, "D") + .replace(/[\xD1]/g, "N") + .replace(/[\xD2-\xD6\xD8]/g, "O") + .replace(/[\xD9-\xDC]/g, "U") + .replace(/[\xDD]/g, "Y") + .replace(/[\xDE]/g, "P") + .replace(/[\xE0-\xE5]/g, "a") + .replace(/[\xE6]/g, "ae") + .replace(/[\xE7]/g, "c") + .replace(/[\xE8-\xEB]/g, "e") + .replace(/[\xEC-\xEF]/g, "i") + .replace(/[\xF1]/g, "n") + .replace(/[\xF2-\xF6\xF8]/g, "o") + .replace(/[\xF9-\xFC]/g, "u") + .replace(/[\xFE]/g, "p") + .replace(/[\xFD\xFF]/g, "y"); + } + return str; + } + module.exports = replaceAccents; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rpad.js new file mode 100644 index 00000000..99f6378d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rpad.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var repeat = require('./repeat'); + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function rpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; + } + + module.exports = rpad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js new file mode 100644 index 00000000..66ba80e9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js @@ -0,0 +1,33 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); + /** + * Remove chars from end of string. + */ + function rtrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var end = str.length - 1, + charLen = chars.length, + found = true, + i, c; + + while (found && end >= 0) { + found = false; + i = -1; + c = str.charAt(end); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + end--; + break; + } + } + } + + return (end >= 0) ? str.substring(0, end + 1) : ''; + } + + module.exports = rtrim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js new file mode 100644 index 00000000..354104c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var lowerCase = require('./lowerCase'); +var upperCase = require('./upperCase'); + /** + * UPPERCASE first char of each sentence and lowercase other chars. + */ + function sentenceCase(str){ + str = toString(str); + + // Replace first char of each sentence (new line or after '.\s+') to + // UPPERCASE + return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); + } + module.exports = sentenceCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/slugify.js new file mode 100644 index 00000000..142f0d9b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/slugify.js @@ -0,0 +1,24 @@ +var toString = require('../lang/toString'); +var replaceAccents = require('./replaceAccents'); +var removeNonWord = require('./removeNonWord'); +var trim = require('./trim'); + /** + * Convert to lower case, remove accents, remove non-word chars and + * replace spaces with the specified delimeter. + * Does not split camelCase text. + */ + function slugify(str, delimeter){ + str = toString(str); + + if (delimeter == null) { + delimeter = "-"; + } + str = replaceAccents(str); + str = removeNonWord(str); + str = trim(str) //should come after removeNonWord + .replace(/ +/g, delimeter) //replace spaces with delimeter + .toLowerCase(); + return str; + } + module.exports = slugify; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js new file mode 100644 index 00000000..bce2bd20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + /** + * Checks if string starts with specified prefix. + */ + function startsWith(str, prefix) { + str = toString(str); + prefix = toString(prefix); + + return str.indexOf(prefix) === 0; + } + + module.exports = startsWith; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js new file mode 100644 index 00000000..01d17b0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * Remove HTML tags from string. + */ + function stripHtmlTags(str){ + str = toString(str); + + return str.replace(/<[^>]*>/g, ''); + } + module.exports = stripHtmlTags; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/trim.js new file mode 100644 index 00000000..9652b0c7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/trim.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); +var ltrim = require('./ltrim'); +var rtrim = require('./rtrim'); + /** + * Remove white-spaces from beginning and end of string. + */ + function trim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + return ltrim(rtrim(str, chars), chars); + } + + module.exports = trim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/truncate.js new file mode 100644 index 00000000..a98d6c7d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/truncate.js @@ -0,0 +1,21 @@ +var toString = require('../lang/toString'); +var trim = require('./trim'); + /** + * Limit number of chars. + */ + function truncate(str, maxChars, append, onlyFullWords){ + str = toString(str); + append = append || '...'; + maxChars = onlyFullWords? maxChars + 1 : maxChars; + + str = trim(str); + if(str.length <= maxChars){ + return str; + } + str = str.substr(0, maxChars - append.length); + //crop at last space or remove trailing whitespace + str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); + return str + append; + } + module.exports = truncate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/typecast.js new file mode 100644 index 00000000..c1386a49 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/typecast.js @@ -0,0 +1,29 @@ + + + var UNDEF; + + /** + * Parses string and convert it into a native value. + */ + function typecast(val) { + var r; + if ( val === null || val === 'null' ) { + r = null; + } else if ( val === 'true' ) { + r = true; + } else if ( val === 'false' ) { + r = false; + } else if ( val === UNDEF || val === 'undefined' ) { + r = UNDEF; + } else if ( val === '' || isNaN(val) ) { + //isNaN('') returns false + r = val; + } else { + //parseFloat(null || '') returns NaN + r = parseFloat(val); + } + return r; + } + + module.exports = typecast; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js new file mode 100644 index 00000000..4968f378 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js @@ -0,0 +1,23 @@ +var toString = require('../lang/toString'); + + var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; + + /** + * Add space between camelCase text. + */ + function unCamelCase(str, delimiter){ + if (delimiter == null) { + delimiter = ' '; + } + + function join(str, c1, c2) { + return c1 + delimiter + c2; + } + + str = toString(str); + str = str.replace(CAMEL_CASE_BORDER, join); + str = str.toLowerCase(); //add space between camelCase text + return str; + } + module.exports = unCamelCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/underscore.js new file mode 100644 index 00000000..ebd6e2b7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/underscore.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var slugify = require('./slugify'); +var unCamelCase = require('./unCamelCase'); + /** + * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function underscore(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "_"); + } + module.exports = underscore; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js new file mode 100644 index 00000000..52cf3f45 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Unescapes HTML special chars + */ + function unescapeHtml(str){ + str = toString(str) + .replace(/&/g , '&') + .replace(/</g , '<') + .replace(/>/g , '>') + .replace(/'/g , "'") + .replace(/"/g, '"'); + return str; + } + + module.exports = unescapeHtml; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js new file mode 100644 index 00000000..0b7fb73b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js @@ -0,0 +1,16 @@ +var toString = require('../lang/toString'); + + /** + * Unescape unicode char sequences + */ + function unescapeUnicode(str){ + str = toString(str); + return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ + var code = parseInt(ch.slice(2), 16); + return String.fromCharCode(code); + }); + } + + module.exports = unescapeUnicode; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js new file mode 100644 index 00000000..311dfa17 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js @@ -0,0 +1,10 @@ +var toString = require('../lang/toString'); + /** + * Replaces hyphens with spaces. (only hyphens between word chars) + */ + function unhyphenate(str){ + str = toString(str); + return str.replace(/(\w)(-)(\w)/g, '$1 $3'); + } + module.exports = unhyphenate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js new file mode 100644 index 00000000..6c92552c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js @@ -0,0 +1,10 @@ +var toString = require('../lang/toString'); + /** + * "Safer" String.toUpperCase() + */ + function upperCase(str){ + str = toString(str); + return str.toUpperCase(); + } + module.exports = upperCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time.js new file mode 100644 index 00000000..9f533296 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time.js @@ -0,0 +1,12 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'convert' : require('./time/convert'), + 'now' : require('./time/now'), + 'parseMs' : require('./time/parseMs'), + 'toTimeString' : require('./time/toTimeString') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/convert.js new file mode 100644 index 00000000..852a0f03 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/convert.js @@ -0,0 +1,41 @@ + + + /** + * convert time into another unit + */ + function convert(val, sourceUnitName, destinationUnitName){ + destinationUnitName = destinationUnitName || 'ms'; + return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); + } + + + //TODO: maybe extract to a separate module + function getUnit(unitName){ + switch(unitName){ + case 'ms': + case 'millisecond': + return 1; + case 's': + case 'second': + return 1000; + case 'm': + case 'minute': + return 60000; + case 'h': + case 'hour': + return 3600000; + case 'd': + case 'day': + return 86400000; + case 'w': + case 'week': + return 604800000; + default: + throw new Error('"'+ unitName + '" is not a valid unit'); + } + } + + + module.exports = convert; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/now.js new file mode 100644 index 00000000..effcfbe3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/now.js @@ -0,0 +1,12 @@ + + + /** + * Get current time in miliseconds + */ + var now = (typeof Date.now === 'function')? Date.now : function(){ + return +(new Date()); + }; + + module.exports = now; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js new file mode 100644 index 00000000..6d997976 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js @@ -0,0 +1,17 @@ +var countSteps = require('../math/countSteps'); + + /** + * Parse timestamp into an object. + */ + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + module.exports = parseMs; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js new file mode 100644 index 00000000..101d69fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js @@ -0,0 +1,24 @@ +var countSteps = require('../math/countSteps'); +var pad = require('../number/pad'); + + var HOUR = 3600000, + MINUTE = 60000, + SECOND = 1000; + + /** + * Format timestamp into a time string. + */ + function toTimeString(ms){ + var h = ms < HOUR ? 0 : countSteps(ms, HOUR), + m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), + s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), + str = ''; + + str += h? h + ':' : ''; + str += pad(m, 2) + ':'; + str += pad(s, 2); + + return str; + } + module.exports = toTimeString; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/.npmignore new file mode 100644 index 00000000..f1250e58 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/History.md new file mode 100644 index 00000000..88119480 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/History.md @@ -0,0 +1,42 @@ + +1.0.0 / 2013-06-18 +================== + + * remove .version + * >=. Closes #19 + * Merge pull request #15 from davglass/readline-osx + * On OSX revert back to terminal hack to avoid a readline bug + +0.1.0 / 2012-09-19 +================== + + * Fixed logic bug that caused bar to jump one extra space at the end [davglass] + * Working with readline impl, even on Windows [davglass] + * Using readline instead of the \r hack [davglass] + +0.0.5 / 2012-08-07 +================== + + * add ability to tick by zero chunks - tick(0) + * fix ETA. Closes #4 [lwille] + +0.0.4 / 2011-11-14 +================== + + * Allow more recent versions of node + +0.0.3 / 2011-04-20 +================== + + * Changed; erase the line when complete + +0.0.2 / 2011-04-20 +================== + + * Added custom tokens support + * Fixed; clear line before writing + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Makefile new file mode 100644 index 00000000..36a3ed7d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Makefile @@ -0,0 +1,5 @@ + +test: + @echo "populate me" + +.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Readme.md new file mode 100644 index 00000000..4e08a49b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Readme.md @@ -0,0 +1,117 @@ +# node-progress + + Flexible ascii progress bar + +## Installation + + npm install progress + +## Usage + + First we create a `ProgressBar`, giving it a format string + as well as the `total`, telling the progress bar when it will + be considered complete. After that all we need to do is `tick()` appropriately. + +```javascript +var ProgressBar = require('progress'); + +var bar = new ProgressBar(':bar', { total: 10 }); +var timer = setInterval(function(){ + bar.tick(); + if (bar.complete) { + console.log('\ncomplete\n'); + clearInterval(timer); + } +}, 100); +``` + +## Options: + + - `total` total number of ticks to complete + - `width` the displayed width of the progress bar defaulting to total + - `stream` the output stream defaulting to stdout + - `complete` completion character defaulting to "=" + - `incomplete` incomplete character defaulting to "-" + - `clear` option to clear the bar on completion defaulting to false + - `callback` optional function to call when the progress bar completes + +## Tokens: + + - `:bar` the progress bar itself + - `:current` current tick number + - `:total` total ticks + - `:elapsed` time elapsed in seconds + - `:percent` completion percentage + - `:eta` estimated completion time in seconds + +## Examples + +### Download + + In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length. + +```javascript +var ProgressBar = require('../') + , https = require('https'); + +var req = https.request({ + host: 'download.github.com' + , port: 443 + , path: '/visionmedia-node-jscoverage-0d4608a.zip' +}); + +req.on('response', function(res){ + var len = parseInt(res.headers['content-length'], 10); + + console.log(); + var bar = new ProgressBar(' downloading [:bar] :percent :etas', { + complete: '=' + , incomplete: ' ' + , width: 20 + , total: len + }); + + res.on('data', function(chunk){ + bar.tick(chunk.length); + }); + + res.on('end', function(){ + console.log('\n'); + }); +}); + +req.end(); +``` + + The code above will generate a progress bar that looks like this: + +``` +downloading [===== ] 29% 3.7s +``` + +You can see more examples in the `examples` folder. + +## License + +(The MIT License) + +Copyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>` + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/index.js new file mode 100644 index 00000000..4449dd30 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/node-progress'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js new file mode 100644 index 00000000..ca0ce4f0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js @@ -0,0 +1,183 @@ +/*! + * node-progress + * Copyright(c) 2011 TJ Holowaychuk + * MIT Licensed + */ + +/** + * Expose `ProgressBar`. + */ + +exports = module.exports = ProgressBar; + +/** + * Initialize a `ProgressBar` with the given + * `fmt` string and `options` or `total`. + * + * Options: + * + * - `total` total number of ticks to complete + * - `width` the displayed width of the progress bar defaulting to total + * - `stream` the output stream defaulting to stdout + * - `complete` completion character defaulting to "=" + * - `incomplete` incomplete character defaulting to "-" + * - `callback` optional function to call when the progress bar completes + * + * Tokens: + * + * - `:bar` the progress bar itself + * - `:current` current tick number + * - `:total` total ticks + * - `:elapsed` time elapsed in seconds + * - `:percent` completion percentage + * - `:eta` eta in seconds + * + * @param {String} fmt + * @param {Object|Number} options or total + * @api public + */ + +function ProgressBar(fmt, options) { + this.rl = require('readline').createInterface({ + input: process.stdin, + output: options.stream || process.stdout + }); + this.rl.setPrompt('', 0); + this.rl.clearLine = function() { + this.write(null, {ctrl: true, name: 'u'}); + }; + + if (typeof(options) == 'number') { + var total = options; + options = {}; + options.total = total; + } else { + options = options || {}; + if ('string' != typeof fmt) throw new Error('format required'); + if ('number' != typeof options.total) throw new Error('total required'); + } + + this.fmt = fmt; + this.curr = 0; + this.total = options.total; + this.width = options.width || this.total; + this.clear = options.clear + this.chars = { + complete: options.complete || '=' + , incomplete: options.incomplete || '-' + }; + this.callback = options.callback || function () {}; +} + +/** + * "tick" the progress bar with optional `len` and + * optional `tokens`. + * + * @param {Number|Object} len or tokens + * @param {Object} tokens + * @api public + */ + +ProgressBar.prototype.tick = function(len, tokens){ + if (len !== 0) + len = len || 1; + + // swap tokens + if ('object' == typeof len) tokens = len, len = 1; + + // start time for eta + if (0 == this.curr) this.start = new Date; + + this.curr += len + this.render(tokens); + + // progress complete + if (this.curr >= this.total) { + this.complete = true; + this.terminate(); + this.callback(this); + return; + } +}; + +/** + * Method to render the progress bar with optional `tokens` to + * place in the progress bar's `fmt` field. + * + * @param {Object} tokens + * @api public + */ + +ProgressBar.prototype.render = function(tokens){ + if(!process.stdout.isTTY) { + return; + } + + var ratio = this.curr / this.total; + ratio = Math.min(Math.max(ratio, 0), 1); + + var percent = ratio * 100 + , complete = Math.round(this.width * ratio) + , incomplete + , elapsed = new Date - this.start + , eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); + + complete = Array(complete).join(this.chars.complete); + incomplete = Array(this.width - complete.length).join(this.chars.incomplete); + + var str = this.fmt + .replace(':bar', complete + incomplete) + .replace(':current', this.curr) + .replace(':total', this.total) + .replace(':elapsed', isNaN(elapsed) ? "0.0" : (elapsed / 1000).toFixed(1)) + .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? "0.0" : (eta / 1000).toFixed(1)) + .replace(':percent', percent.toFixed(0) + '%'); + + if (tokens) { + for (var key in tokens) { + str = str.replace(':' + key, tokens[key]); + } + } + + this.rl.clearLine(); + this.rl.write(str); +}; + +/** + * "update" the progress bar to represent an exact percentage. + * The ratio (between 0 and 1) specified will be multiplied by `total` and + * floored, representing the closest available "tick." For example, if a + * progress bar has a length of 3 and `update(0.5)` is called, the progress + * will be set to 1. + * + * A ratio of 0.5 will attempt to set the progress to halfway. + * + * @param {Number} ratio The ratio (between 0 and 1 inclusive) to set the + * overall completion to. + * @api public + */ + +ProgressBar.prototype.update = function(ratio, tokens) { + var goal = Math.floor(ratio * this.total); + var delta = goal - this.curr; + + this.tick(delta, tokens); +}; + +/** + * Terminates a progress bar. + * + * @api public + */ + +ProgressBar.prototype.terminate = function() { + this.rl.resume(); + + if (this.clear) { + this.rl.clearLine(); + this.rl.close(); + } else { + this.rl.close(); + console.log(); + } +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/package.json new file mode 100644 index 00000000..c4744b51 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/package.json @@ -0,0 +1,34 @@ +{ + "name": "progress", + "version": "1.1.3", + "description": "Flexible ascii progress bar", + "keywords": [ + "cli", + "progress" + ], + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "dependencies": {}, + "main": "index", + "engines": { + "node": ">=0.4.0" + }, + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/node-progress" + }, + "readme": "# node-progress\n\n Flexible ascii progress bar\n\n## Installation\n\n npm install progress\n\n## Usage\n\n First we create a `ProgressBar`, giving it a format string\n as well as the `total`, telling the progress bar when it will\n be considered complete. After that all we need to do is `tick()` appropriately.\n\n```javascript\nvar ProgressBar = require('progress');\n\nvar bar = new ProgressBar(':bar', { total: 10 });\nvar timer = setInterval(function(){\n bar.tick();\n if (bar.complete) {\n console.log('\\ncomplete\\n');\n clearInterval(timer);\n }\n}, 100);\n```\n\n## Options:\n\n - `total` total number of ticks to complete\n - `width` the displayed width of the progress bar defaulting to total\n - `stream` the output stream defaulting to stdout\n - `complete` completion character defaulting to \"=\"\n - `incomplete` incomplete character defaulting to \"-\"\n - `clear` option to clear the bar on completion defaulting to false\n - `callback` optional function to call when the progress bar completes\n\n## Tokens:\n\n - `:bar` the progress bar itself\n - `:current` current tick number\n - `:total` total ticks\n - `:elapsed` time elapsed in seconds\n - `:percent` completion percentage\n - `:eta` estimated completion time in seconds\n\n## Examples\n\n### Download\n\n In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length.\n\n```javascript\nvar ProgressBar = require('../')\n , https = require('https');\n\nvar req = https.request({\n host: 'download.github.com'\n , port: 443\n , path: '/visionmedia-node-jscoverage-0d4608a.zip'\n});\n\nreq.on('response', function(res){\n var len = parseInt(res.headers['content-length'], 10);\n\n console.log();\n var bar = new ProgressBar(' downloading [:bar] :percent :etas', {\n complete: '='\n , incomplete: ' '\n , width: 20\n , total: len\n });\n\n res.on('data', function(chunk){\n bar.tick(chunk.length);\n });\n\n res.on('end', function(){\n console.log('\\n');\n });\n});\n\nreq.end();\n```\n\n The code above will generate a progress bar that looks like this:\n\n```\ndownloading [===== ] 29% 3.7s\n```\n\nYou can see more examples in the `examples` folder.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>`\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "Readme.md", + "bugs": { + "url": "https://github.com/visionmedia/node-progress/issues" + }, + "homepage": "https://github.com/visionmedia/node-progress", + "_id": "progress@1.1.3", + "dist": { + "shasum": "42f89c5fc3b6f0408a0bdd68993b174f96aababf" + }, + "_from": "progress@~1.1.0", + "_resolved": "https://registry.npmjs.org/progress/-/progress-1.1.3.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS new file mode 100644 index 00000000..247b7543 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS @@ -0,0 +1,6 @@ +# Authors sorted by whether or not they're me. +Isaac Z. Schlueter (http://blog.izs.me) +Wayne Larsen (http://github.com/wvl) +ritch +Marcel Laverdet +Yosef Dinerstein diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/LICENSE new file mode 100644 index 00000000..05a40109 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/README.md new file mode 100644 index 00000000..cd123b65 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/README.md @@ -0,0 +1,30 @@ +`rm -rf` for node. + +Install with `npm install rimraf`, or just drop rimraf.js somewhere. + +## API + +`rimraf(f, callback)` + +The callback will be called with an error if there is one. Certain +errors are handled for you: + +* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of + `opts.maxBusyTries` times before giving up. +* `ENOENT` - If the file doesn't exist, rimraf will return + successfully, since your desired outcome is already the case. + +## rimraf.sync + +It can remove stuff synchronously, too. But that's not so good. Use +the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf ` which is useful for cross platform support. + +## mkdirp + +If you need to create a directory recursively, check out +[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/bin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/bin.js new file mode 100755 index 00000000..29bfa8a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/bin.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}); + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf ') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + process.exit(help ? 0 : 1) +} else { + args.forEach(function(arg) { + rimraf.sync(arg) + }) +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/package.json new file mode 100644 index 00000000..211cc9dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/package.json @@ -0,0 +1,60 @@ +{ + "name": "rimraf", + "version": "2.2.6", + "main": "rimraf.js", + "description": "A deep deletion module for node (like `rm -rf`)", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": { + "type": "MIT", + "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "test": "cd test && bash run.sh" + }, + "bin": { + "rimraf": "./bin.js" + }, + "contributors": [ + { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + { + "name": "Wayne Larsen", + "email": "wayne@larsen.st", + "url": "http://github.com/wvl" + }, + { + "name": "ritch", + "email": "skawful@gmail.com" + }, + { + "name": "Marcel Laverdet" + }, + { + "name": "Yosef Dinerstein", + "email": "yosefd@microsoft.com" + } + ], + "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf ` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" + }, + "homepage": "https://github.com/isaacs/rimraf", + "_id": "rimraf@2.2.6", + "dist": { + "shasum": "7ada6a6d39b2301af3c8fe7b936c2e46e7c4463d" + }, + "_from": "rimraf@~2.2.6", + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js new file mode 100644 index 00000000..ce62051f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js @@ -0,0 +1,178 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var path = require("path") +var fs = require("fs") + +// for EMFILE handling +var timeout = 0 +exports.EMFILE_MAX = 1000 +exports.BUSYTRIES_MAX = 3 + +var isWindows = (process.platform === "win32") + +function rimraf (p, cb) { + if (!cb) throw new Error("No callback passed to rimraf()") + + var busyTries = 0 + rimraf_(p, function CB (er) { + if (er) { + if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && + busyTries < exports.BUSYTRIES_MAX) { + busyTries ++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, CB) + }, time) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { + return setTimeout(function () { + rimraf_(p, CB) + }, timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + cb(er) + }) +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, cb) { + fs.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) + if (er.code === "EISDIR") + return rmdir(p, er, cb) + } + return cb(er) + }) +} + +function fixWinEPERM (p, er, cb) { + fs.chmod(p, 666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + fs.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, er, cb) + else + fs.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, er, cb) { + try { + fs.chmodSync(p, 666) + } catch (er2) { + if (er2.code !== "ENOENT") + throw er + } + + try { + var stats = fs.statSync(p) + } catch (er3) { + if (er3 !== "ENOENT") + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, er) + else + fs.unlinkSync(p) +} + +function rmdir (p, originalEr, cb) { + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + fs.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, cb) { + fs.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return fs.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + fs.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p) { + try { + fs.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) + if (er.code !== "EISDIR") + throw er + rmdirSync(p, er) + } +} + +function rmdirSync (p, originalEr) { + try { + fs.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p) + } +} + +function rmkidsSync (p) { + fs.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f)) + }) + fs.rmdirSync(p) +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh new file mode 100644 index 00000000..598f0163 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e +for i in test-*.js; do + echo -n $i ... + bash setup.sh + node $i + ! [ -d target ] + echo "pass" +done +rm -rf target diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh new file mode 100644 index 00000000..2602e631 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -e + +files=10 +folders=2 +depth=4 +target="$PWD/target" + +rm -rf target + +fill () { + local depth=$1 + local files=$2 + local folders=$3 + local target=$4 + + if ! [ -d $target ]; then + mkdir -p $target + fi + + local f + + f=$files + while [ $f -gt 0 ]; do + touch "$target/f-$depth-$f" + let f-- + done + + let depth-- + + if [ $depth -le 0 ]; then + return 0 + fi + + f=$folders + while [ $f -gt 0 ]; do + mkdir "$target/folder-$depth-$f" + fill $depth $files $folders "$target/d-$depth-$f" + let f-- + done +} + +fill $depth $files $folders $target + +# sanity assert +[ -d $target ] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js new file mode 100644 index 00000000..9c2e0b7b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js @@ -0,0 +1,5 @@ +var rimraf = require("../rimraf") + , path = require("path") +rimraf(path.join(__dirname, "target"), function (er) { + if (er) throw er +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js new file mode 100644 index 00000000..eb71f104 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js @@ -0,0 +1,3 @@ +var rimraf = require("../rimraf") + , path = require("path") +rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/LICENSE new file mode 100644 index 00000000..05a40109 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/README.md new file mode 100644 index 00000000..ff1eb531 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/README.md @@ -0,0 +1,5 @@ +The "which" util from npm's guts. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/bin/which new file mode 100755 index 00000000..8432ce2f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/bin/which @@ -0,0 +1,14 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) { + console.error("Usage: which ") + process.exit(1) +} + +which(process.argv[2], function (er, thing) { + if (er) { + console.error(er.message) + process.exit(er.errno || 127) + } + console.log(thing) +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/package.json new file mode 100644 index 00000000..f1938b07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/package.json @@ -0,0 +1,35 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "which", + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "version": "1.0.5", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "main": "which.js", + "bin": { + "which": "./bin/which" + }, + "engines": { + "node": "*" + }, + "dependencies": {}, + "devDependencies": {}, + "readme": "The \"which\" util from npm's guts.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "homepage": "https://github.com/isaacs/node-which", + "_id": "which@1.0.5", + "dist": { + "shasum": "195619a6ad7e8fefd0aa76445a6d4c8d370a322c" + }, + "_from": "which@~1.0.5", + "_resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/which.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/which.js new file mode 100644 index 00000000..db7e8f74 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/which.js @@ -0,0 +1,104 @@ +module.exports = which +which.sync = whichSync + +var path = require("path") + , fs + , COLON = process.platform === "win32" ? ";" : ":" + , isExe + +try { + fs = require("graceful-fs") +} catch (ex) { + fs = require("fs") +} + +if (process.platform == "win32") { + // On windows, there is no good way to check that a file is executable + isExe = function isExe () { return true } +} else { + isExe = function isExe (mod, uid, gid) { + //console.error(mod, uid, gid); + //console.error("isExe?", (mod & 0111).toString(8)) + var ret = (mod & 0001) + || (mod & 0010) && process.getgid && gid === process.getgid() + || (mod & 0100) && process.getuid && uid === process.getuid() + //console.error("isExe?", ret) + return ret + } +} + + + +function which (cmd, cb) { + if (isAbsolute(cmd)) return cb(null, cmd) + var pathEnv = (process.env.PATH || "").split(COLON) + , pathExt = [""] + if (process.platform === "win32") { + pathEnv.push(process.cwd()) + pathExt = (process.env.PATHEXT || ".EXE").split(COLON) + if (cmd.indexOf(".") !== -1) pathExt.unshift("") + } + //console.error("pathEnv", pathEnv) + ;(function F (i, l) { + if (i === l) return cb(new Error("not found: "+cmd)) + var p = path.resolve(pathEnv[i], cmd) + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + //console.error(p + ext) + fs.stat(p + ext, function (er, stat) { + if (!er && + stat && + stat.isFile() && + isExe(stat.mode, stat.uid, stat.gid)) { + //console.error("yes, exe!", p + ext) + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd) { + if (isAbsolute(cmd)) return cmd + var pathEnv = (process.env.PATH || "").split(COLON) + , pathExt = [""] + if (process.platform === "win32") { + pathEnv.push(process.cwd()) + pathExt = (process.env.PATHEXT || ".EXE").split(COLON) + if (cmd.indexOf(".") !== -1) pathExt.unshift("") + } + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var p = path.join(pathEnv[i], cmd) + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var stat + try { stat = fs.statSync(cur) } catch (ex) {} + if (stat && + stat.isFile() && + isExe(stat.mode, stat.uid, stat.gid)) return cur + } + } + throw new Error("not found: "+cmd) +} + +var isAbsolute = process.platform === "win32" ? absWin : absUnix + +function absWin (p) { + if (absUnix(p)) return true + // pull off the device/UNC bit from a windows path. + // from node's lib/path.js + var splitDeviceRe = + /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ + , result = splitDeviceRe.exec(p) + , device = result[1] || '' + , isUnc = device && device.charAt(1) !== ':' + , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute + + return isAbsolute +} + +function absUnix (p) { + return p.charAt(0) === "/" || p === "" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/package.json new file mode 100644 index 00000000..66d4488e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/package.json @@ -0,0 +1,54 @@ +{ + "name": "bin-wrapper", + "version": "0.1.9", + "description": "Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies", + "keywords": [ + "bin", + "build", + "make", + "wrapper" + ], + "homepage": "https://github.com/kevva/bin-wrapper", + "bugs": { + "url": "https://github.com/kevva/bin-wrapper/issues" + }, + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "http://kevinmartensson.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/kevva/bin-wrapper.git" + }, + "scripts": { + "test": "mocha --reporter list --timeout 0" + }, + "main": "bin-wrapper.js", + "files": [ + "bin-wrapper.js" + ], + "dependencies": { + "download": "~0.1.2", + "isbin": "0.0.2", + "mout": "~0.6.0", + "progress": "~1.1.0", + "rimraf": "~2.2.6", + "which": "~1.0.5" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "readme": "# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper)\n\nBinary wrapper for Node.js that makes your programs seamlessly available as local dependencies\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper`\n\n## Examples\n\nAll `platform` and `arch` specific options takes precedence over the base \noptions. See [test.js](test.js) for a full fleshed example.\n\n```js\nvar Bin = require('bin-wrapper');\n\nvar opts = {\n name: 'Gifsicle',\n bin: 'gifsicle',\n path: 'vendor',\n url: 'http://url/to/gifsicle',\n src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz',\n buildScript: './configure --bindir=\"vendor\" && make install',\n platform: {\n win32: {\n bin: 'gifsicle.exe',\n url: [\n 'http://url/to/gifsicle.exe'\n 'http://url/to/gifsicle.dll'\n ]\n }\n }\n}\nvar bin = new Bin(opts);\n\nbin.check('--version', function (works) {\n if (!works) {\n console.log('Pre-build test failed, compiling from source');\n return bin.build();\n }\n\n console.log('Binary passed the test');\n});\n```\n\nGet the path to your binary with `bin.path`.\n\n```js\nconsole.log(bin.path);\n// => path/to/vendor/gifsicle\n```\n\n## API\n\n### .check(cmd, cb)\n\nCheck if a binary is present and working. If it isn't, download and test it by \nrunning the binary with `cmd` and see if it exits correctly.\n\n### .build(cb)\n\nDownload the source archive defined in the `src` property and build it using the \nbuild script defined in the `buildScript` property.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", + "readmeFilename": "README.md", + "_id": "bin-wrapper@0.1.9", + "dist": { + "shasum": "237ee496fb6049caedaba51ad9e62fc199a86060" + }, + "_from": "bin-wrapper@~0.1.3", + "_resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-0.1.9.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/chalk.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/chalk.js new file mode 100644 index 00000000..17c6dbab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/chalk.js @@ -0,0 +1,62 @@ +'use strict'; +var ansi = require('ansi-styles'); +var defineProps = Object.defineProperties; + +ansi.grey = ansi.gray; + +var styles = (function () { + var ret = {}; + + Object.keys(ansi).forEach(function (key) { + ret[key] = { + get: function () { + this._styles.push(key); + return this; + } + }; + }); + + return ret; +})(); + +var chalk = module.exports = defineProps({}, init()); + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + var obj = defineProps(function self(str) { + if (!chalk.enabled) { + return str; + } + + return self._styles.reduce(function (str, name) { + var code = ansi[name]; + return code[0] + (str || '') + code[1]; + }, str); + }, styles); + + obj._styles = []; + + return obj[name]; + } + } + }); + + return ret; +} + +chalk.styles = ansi; + +chalk.stripColor = function (str) { + return str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''); +}; + +chalk.supportsColor = require('has-color'); + +// detect mode if not set manually +if (chalk.enabled === undefined) { + chalk.enabled = chalk.supportsColor; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js new file mode 100644 index 00000000..56a5d19b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js @@ -0,0 +1,29 @@ +'use strict'; +module.exports = { + reset: ['\x1b[0m', '\x1b[0m'], + + bold: ['\x1b[1m', '\x1b[22m'], + italic: ['\x1b[3m', '\x1b[23m'], + underline: ['\x1b[4m', '\x1b[24m'], + inverse: ['\x1b[7m', '\x1b[27m'], + strikethrough: ['\x1b[9m', '\x1b[29m'], + + black: ['\x1b[30m', '\x1b[39m'], + red: ['\x1b[31m', '\x1b[39m'], + green: ['\x1b[32m', '\x1b[39m'], + yellow: ['\x1b[33m', '\x1b[39m'], + blue: ['\x1b[34m', '\x1b[39m'], + magenta: ['\x1b[35m', '\x1b[39m'], + cyan: ['\x1b[36m', '\x1b[39m'], + white: ['\x1b[37m', '\x1b[39m'], + gray: ['\x1B[90m', '\x1b[39m'], + + bgBlack: ['\x1b[40m', '\x1b[49m'], + bgRed: ['\x1b[41m', '\x1b[49m'], + bgGreen: ['\x1b[42m', '\x1b[49m'], + bgYellow: ['\x1b[43m', '\x1b[49m'], + bgBlue: ['\x1b[44m', '\x1b[49m'], + bgMagenta: ['\x1b[45m', '\x1b[49m'], + bgCyan: ['\x1b[46m', '\x1b[49m'], + bgWhite: ['\x1b[47m', '\x1b[49m'] +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..8acdb5e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/package.json @@ -0,0 +1,62 @@ +{ + "name": "ansi-styles", + "version": "0.2.0", + "description": "ANSI escape codes for colorizing strings in the terminal", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "homepage": "https://github.com/sindresorhus/ansi-styles", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-styles/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "ansi-styles.js" + ], + "main": "ansi-styles", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> ANSI escape codes for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green[0] + 'Hello world!' + ansi.green[1]);\n```\n\n## API\n\nEach style is an array of a start and end escape code.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "_id": "ansi-styles@0.2.0", + "dist": { + "shasum": "359ab4b15dcd64ba6d74734b72c36360a9af2c19" + }, + "_from": "ansi-styles@~0.2.0", + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..646837c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/readme.md @@ -0,0 +1,65 @@ +# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) + +> ANSI escape codes for colorizing strings in the terminal. + +You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. + +![screenshot](screenshot.png) + + +## Install + +Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` + + +## Example + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green[0] + 'Hello world!' + ansi.green[1]); +``` + +## API + +Each style is an array of a start and end escape code. + + +## Styles + +### General + +- reset +- bold +- italic +- underline +- inverse +- strikethrough + +### Text colors + +- black +- red +- green +- yellow +- blue +- magenta +- cyan +- white +- gray + +### Background colors + +- bgBlack +- bgRed +- bgGreen +- bgYellow +- bgBlue +- bgMagenta +- bgCyan +- bgWhite + + +## License + +MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/has-color.js new file mode 100644 index 00000000..27316b1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/has-color.js @@ -0,0 +1,24 @@ +'use strict'; +module.exports = (function () { + if (process.argv.indexOf('--no-color') !== -1) { + return false; + } + + if (process.argv.indexOf('--color') !== -1) { + return true; + } + + if (!process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); +})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/package.json new file mode 100644 index 00000000..d60b2d0a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/package.json @@ -0,0 +1,59 @@ +{ + "name": "has-color", + "version": "0.1.4", + "description": "Detect whether a terminal supports color", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "capability", + "detect" + ], + "homepage": "https://github.com/sindresorhus/has-color", + "bugs": { + "url": "https://github.com/sindresorhus/has-color/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "has-color.js" + ], + "main": "has-color", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/has-color.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "_id": "has-color@0.1.4", + "dist": { + "shasum": "d1dadeea5b9e8b446bf08603532333710c95a290" + }, + "_from": "has-color@~0.1.0", + "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.4.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/readme.md new file mode 100644 index 00000000..0918c851 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/readme.md @@ -0,0 +1,28 @@ +# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) + +> Detect whether a terminal supports color. + +Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). + + +## Install + +Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` + + +## Example + +```js +var hasColor = require('has-color'); + +if (hasColor) { + console.log('Terminal supports color.'); +} +``` + +It obeys the CLI flags `--color` and `--no-color`. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/package.json new file mode 100644 index 00000000..46a63f05 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/package.json @@ -0,0 +1,65 @@ +{ + "name": "chalk", + "version": "0.2.1", + "description": "Terminal string styling done right", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "ansi", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "homepage": "https://github.com/sindresorhus/chalk", + "bugs": { + "url": "https://github.com/sindresorhus/chalk/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "chalk.js" + ], + "main": "chalk", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/chalk.git" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "has-color": "~0.1.0", + "ansi-styles": "~0.2.0" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n> Terminal string styling done right.\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log(chalk.blue('Hello world!'));\n\n// combine styled and normal strings\nconsole.log(chalk.blue('Hello') + 'World' + chalk.red('!'));\n\n// compose multiple styles using the chainable API\nconsole.log(chalk.blue.bgRed.bold('Hello world!'));\n\n// nest styles\nchalk.red('Hello' + chalk.underline.bgBlue('world') + '!');\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.\\ + + + + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js new file mode 100644 index 00000000..24692256 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js @@ -0,0 +1,228 @@ +if (!this.uuid) { + // node.js + uuid = require('../uuid'); +} + +// +// x-platform log/assert shims +// + +function _log(msg, type) { + type = type || 'log'; + + if (typeof(document) != 'undefined') { + document.write('
' + msg.replace(/\n/g, '
') + '
'); + } + if (typeof(console) != 'undefined') { + var color = { + log: '\033[39m', + warn: '\033[33m', + error: '\033[31m' + }; + console[type](color[type] + msg + color.log); + } +} + +function log(msg) {_log(msg, 'log');} +function warn(msg) {_log(msg, 'warn');} +function error(msg) {_log(msg, 'error');} + +function assert(res, msg) { + if (!res) { + error('FAIL: ' + msg); + } else { + log('Pass: ' + msg); + } +} + +// +// Unit tests +// + +// Verify ordering of v1 ids created with explicit times +var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 + +function compare(name, ids) { + ids = ids.map(function(id) { + return id.split('-').reverse().join('-'); + }).sort(); + var sorted = ([].concat(ids)).sort(); + + assert(sorted.toString() == ids.toString(), name + ' have expected order'); +} + +// Verify ordering of v1 ids created using default behavior +compare('uuids with current time', [ + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1() +]); + +// Verify ordering of v1 ids created with explicit times +compare('uuids with time option', [ + uuid.v1({msecs: TIME - 10*3600*1000}), + uuid.v1({msecs: TIME - 1}), + uuid.v1({msecs: TIME}), + uuid.v1({msecs: TIME + 1}), + uuid.v1({msecs: TIME + 28*24*3600*1000}) +]); + +assert( + uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), + 'IDs created at same msec are different' +); + +// Verify throw if too many ids created +var thrown = false; +try { + uuid.v1({msecs: TIME, nsecs: 10000}); +} catch (e) { + thrown = true; +} +assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); + +// Verify clock regression bumps clockseq +var uidt = uuid.v1({msecs: TIME}); +var uidtb = uuid.v1({msecs: TIME - 1}); +assert( + parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, + 'Clock regression by msec increments the clockseq' +); + +// Verify clock regression bumps clockseq +var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); +var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); +assert( + parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, + 'Clock regression by nsec increments the clockseq' +); + +// Verify explicit options produce expected id +var id = uuid.v1({ + msecs: 1321651533573, + nsecs: 5432, + clockseq: 0x385c, + node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] +}); +assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); + +// Verify adjacent ids across a msec boundary are 1 time unit apart +var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); +var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); + +var before = u0.split('-')[0], after = u1.split('-')[0]; +var dt = parseInt(after, 16) - parseInt(before, 16); +assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); + +// +// Test parse/unparse +// + +id = '00112233445566778899aabbccddeeff'; +assert(uuid.unparse(uuid.parse(id.substr(0,10))) == + '00112233-4400-0000-0000-000000000000', 'Short parse'); +assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == + '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); + +// +// Perf tests +// + +var generators = { + v1: uuid.v1, + v4: uuid.v4 +}; + +var UUID_FORMAT = { + v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, + v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i +}; + +var N = 1e4; + +// Get %'age an actual value differs from the ideal value +function divergence(actual, ideal) { + return Math.round(100*100*(actual - ideal)/ideal)/100; +} + +function rate(msg, t) { + log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); +} + +for (var version in generators) { + var counts = {}, max = 0; + var generator = generators[version]; + var format = UUID_FORMAT[version]; + + log('\nSanity check ' + N + ' ' + version + ' uuids'); + for (var i = 0, ok = 0; i < N; i++) { + id = generator(); + if (!format.test(id)) { + throw Error(id + ' is not a valid UUID string'); + } + + if (id != uuid.unparse(uuid.parse(id))) { + assert(fail, id + ' is not a valid id'); + } + + // Count digits for our randomness check + if (version == 'v4') { + var digits = id.replace(/-/g, '').split(''); + for (var j = digits.length-1; j >= 0; j--) { + var c = digits[j]; + max = Math.max(max, counts[c] = (counts[c] || 0) + 1); + } + } + } + + // Check randomness for v4 UUIDs + if (version == 'v4') { + // Limit that we get worried about randomness. (Purely empirical choice, this!) + var limit = 2*100*Math.sqrt(1/N); + + log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); + + for (var i = 0; i < 16; i++) { + var c = i.toString(16); + var bar = '', n = counts[c], p = Math.round(n/max*100|0); + + // 1-3,5-8, and D-F: 1:16 odds over 30 digits + var ideal = N*30/16; + if (i == 4) { + // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1 + 30/16); + } else if (i >= 8 && i <= 11) { + // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1/4 + 30/16); + } else { + // Otherwise: 1:16 odds on 30 digits + ideal = N*30/16; + } + var d = divergence(n, ideal); + + // Draw bar using UTF squares (just for grins) + var s = n/max*50 | 0; + while (s--) bar += '='; + + assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); + } + } +} + +// Perf tests +for (var version in generators) { + log('\nPerformance testing ' + version + ' UUIDs'); + var generator = generators[version]; + var buf = new uuid.BufferClass(16); + + for (var i = 0, t = Date.now(); i < N; i++) generator(); + rate('uuid.' + version + '()', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); + rate('uuid.' + version + '(\'binary\')', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); + rate('uuid.' + version + '(\'binary\', buffer)', t); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js new file mode 100644 index 00000000..2fac6dc4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js @@ -0,0 +1,245 @@ +// uuid.js +// +// Copyright (c) 2010-2012 Robert Kieffer +// MIT License - http://opensource.org/licenses/mit-license.php + +(function() { + var _global = this; + + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + var _rng; + + // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html + // + // Moderately fast, high quality + if (typeof(require) == 'function') { + try { + var _rb = require('crypto').randomBytes; + _rng = _rb && function() {return _rb(16);}; + } catch(e) {} + } + + if (!_rng && _global.crypto && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + _rng = function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } + + if (!_rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + _rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; + } + + // Buffer class to use + var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; + + // Maps for number <-> hex string conversion + var _byteToHex = []; + var _hexToByte = {}; + for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; + } + + // **`parse()` - Parse a UUID into it's component bytes** + function parse(s, buf, offset) { + var i = (buf && offset) || 0, ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; + } + + // **`unparse()` - Convert UUID byte array (ala parse()) into a string** + function unparse(buf, offset) { + var i = offset || 0, bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; + } + + // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + + // random #'s we need to init node and clockseq + var _seedBytes = _rng(); + + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] + ]; + + // Per 4.2.2, randomize (14 bit) clockseq + var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + + // Previous uuid creation time + var _lastMSecs = 0, _lastNSecs = 0; + + // See https://github.com/broofa/node-uuid for API details + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = options.clockseq != null ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs != null ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq == null) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); + } + + // **`v4()` - Generate random UUID** + + // See https://github.com/broofa/node-uuid for API details + function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options == 'binary' ? new BufferClass(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); + } + + // Export public API + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + uuid.parse = parse; + uuid.unparse = unparse; + uuid.BufferClass = BufferClass; + + if (typeof define === 'function' && define.amd) { + // Publish as AMD module + define(function() {return uuid;}); + } else if (typeof(module) != 'undefined' && module.exports) { + // Publish as node.js module + module.exports = uuid; + } else { + // Publish as global (in browsers) + var _previousRoot = _global.uuid; + + // **`noConflict()` - (browser only) to reset global 'uuid' var** + uuid.noConflict = function() { + _global.uuid = _previousRoot; + return uuid; + }; + + _global.uuid = uuid; + } +}).call(this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md new file mode 100644 index 00000000..34c4a85d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md @@ -0,0 +1,4 @@ +oauth-sign +========== + +OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js new file mode 100644 index 00000000..e35bfa67 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js @@ -0,0 +1,43 @@ +var crypto = require('crypto') + , qs = require('querystring') + ; + +function sha1 (key, body) { + return crypto.createHmac('sha1', key).update(body).digest('base64') +} + +function rfc3986 (str) { + return encodeURIComponent(str) + .replace(/!/g,'%21') + .replace(/\*/g,'%2A') + .replace(/\(/g,'%28') + .replace(/\)/g,'%29') + .replace(/'/g,'%27') + ; +} + +function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { + // adapted from https://dev.twitter.com/docs/auth/oauth and + // https://dev.twitter.com/docs/auth/creating-signature + + var querystring = Object.keys(params).sort().map(function(key){ + // big WTF here with the escape + encoding but it's what twitter wants + return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key])) + }).join('%26') + + var base = [ + httpMethod ? httpMethod.toUpperCase() : 'GET', + rfc3986(base_uri), + querystring + ].join('&') + + var key = [ + consumer_secret, + token_secret || '' + ].map(rfc3986).join('&') + + return sha1(key, base) +} + +exports.hmacsign = hmacsign +exports.rfc3986 = rfc3986 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json new file mode 100644 index 00000000..abc9d21d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json @@ -0,0 +1,35 @@ +{ + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "name": "oauth-sign", + "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", + "version": "0.3.0", + "repository": { + "url": "https://github.com/mikeal/oauth-sign" + }, + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "scripts": { + "test": "node test.js" + }, + "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/mikeal/oauth-sign/issues" + }, + "homepage": "https://github.com/mikeal/oauth-sign", + "_id": "oauth-sign@0.3.0", + "dist": { + "shasum": "cb540f93bb2b22a7d5941691a288d60e8ea9386e" + }, + "_from": "oauth-sign@~0.3.0", + "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js new file mode 100644 index 00000000..46955ff6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js @@ -0,0 +1,49 @@ +var hmacsign = require('./index').hmacsign + , assert = require('assert') + , qs = require('querystring') + ; + +// Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth + +var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token', + { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11' + , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' + , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk' + , oauth_signature_method: 'HMAC-SHA1' + , oauth_timestamp: '1272323042' + , oauth_version: '1.0' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98") + +console.log(reqsign) +console.log('8wUi7m5HFQy76nowoCThusfgB+Q=') +assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=') + +var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token', + { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' + , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8' + , oauth_signature_method: 'HMAC-SHA1' + , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc' + , oauth_timestamp: '1272323047' + , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY' + , oauth_version: '1.0' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA") + +console.log(accsign) +console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=') +assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=') + +var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json', + { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g" + , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y" + , oauth_signature_method: "HMAC-SHA1" + , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw" + , oauth_timestamp: "1272325550" + , oauth_version: "1.0" + , status: 'setting up my twitter 私のさえずりを設定する' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA") + +console.log(upsign) +console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=') +assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=') + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules new file mode 100644 index 00000000..49e31dac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules @@ -0,0 +1,6 @@ +[submodule "support/expresso"] + path = support/expresso + url = git://github.com/visionmedia/expresso.git +[submodule "support/should"] + path = support/should + url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore new file mode 100644 index 00000000..e85ce2af --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore @@ -0,0 +1,7 @@ +test +.travis.yml +benchmark.js +component.json +examples.js +History.md +Makefile diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md new file mode 100644 index 00000000..27e54a4a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md @@ -0,0 +1,58 @@ +# node-querystring + + query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. + +## Installation + + $ npm install qs + +## Examples + +```js +var qs = require('qs'); + +qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); +// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } + +qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) +// => user[name]=Tobi&user[email]=tobi%40learnboost.com +``` + +## Testing + +Install dev dependencies: + + $ npm install -d + +and execute: + + $ make test + +browser: + + $ open test/browser/index.html + +## License + +(The MIT License) + +Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js new file mode 100644 index 00000000..b05938ac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js @@ -0,0 +1,366 @@ +/** + * Object#toString() ref for stringify(). + */ + +var toString = Object.prototype.toString; + +/** + * Object#hasOwnProperty ref + */ + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Array#indexOf shim. + */ + +var indexOf = typeof Array.prototype.indexOf === 'function' + ? function(arr, el) { return arr.indexOf(el); } + : function(arr, el) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === el) return i; + } + return -1; + }; + +/** + * Array.isArray shim. + */ + +var isArray = Array.isArray || function(arr) { + return toString.call(arr) == '[object Array]'; +}; + +/** + * Object.keys shim. + */ + +var objectKeys = Object.keys || function(obj) { + var ret = []; + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + ret.push(key); + } + } + return ret; +}; + +/** + * Array#forEach shim. + */ + +var forEach = typeof Array.prototype.forEach === 'function' + ? function(arr, fn) { return arr.forEach(fn); } + : function(arr, fn) { + for (var i = 0; i < arr.length; i++) fn(arr[i]); + }; + +/** + * Array#reduce shim. + */ + +var reduce = function(arr, fn, initial) { + if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); + var res = initial; + for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); + return res; +}; + +/** + * Cache non-integer test regexp. + */ + +var isint = /^[0-9]+$/; + +function promote(parent, key) { + if (parent[key].length == 0) return parent[key] = {} + var t = {}; + for (var i in parent[key]) { + if (hasOwnProperty.call(parent[key], i)) { + t[i] = parent[key][i]; + } + } + parent[key] = t; + return t; +} + +function parse(parts, parent, key, val) { + var part = parts.shift(); + + // illegal + if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; + + // end + if (!part) { + if (isArray(parent[key])) { + parent[key].push(val); + } else if ('object' == typeof parent[key]) { + parent[key] = val; + } else if ('undefined' == typeof parent[key]) { + parent[key] = val; + } else { + parent[key] = [parent[key], val]; + } + // array + } else { + var obj = parent[key] = parent[key] || []; + if (']' == part) { + if (isArray(obj)) { + if ('' != val) obj.push(val); + } else if ('object' == typeof obj) { + obj[objectKeys(obj).length] = val; + } else { + obj = parent[key] = [parent[key], val]; + } + // prop + } else if (~indexOf(part, ']')) { + part = part.substr(0, part.length - 1); + if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); + parse(parts, obj, part, val); + // key + } else { + if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); + parse(parts, obj, part, val); + } + } +} + +/** + * Merge parent key/val pair. + */ + +function merge(parent, key, val){ + if (~indexOf(key, ']')) { + var parts = key.split('[') + , len = parts.length + , last = len - 1; + parse(parts, parent, 'base', val); + // optimize + } else { + if (!isint.test(key) && isArray(parent.base)) { + var t = {}; + for (var k in parent.base) t[k] = parent.base[k]; + parent.base = t; + } + set(parent.base, key, val); + } + + return parent; +} + +/** + * Compact sparse arrays. + */ + +function compact(obj) { + if ('object' != typeof obj) return obj; + + if (isArray(obj)) { + var ret = []; + + for (var i in obj) { + if (hasOwnProperty.call(obj, i)) { + ret.push(obj[i]); + } + } + + return ret; + } + + for (var key in obj) { + obj[key] = compact(obj[key]); + } + + return obj; +} + +/** + * Parse the given obj. + */ + +function parseObject(obj){ + var ret = { base: {} }; + + forEach(objectKeys(obj), function(name){ + merge(ret, name, obj[name]); + }); + + return compact(ret.base); +} + +/** + * Parse the given str. + */ + +function parseString(str){ + var ret = reduce(String(str).split('&'), function(ret, pair){ + var eql = indexOf(pair, '=') + , brace = lastBraceInKey(pair) + , key = pair.substr(0, brace || eql) + , val = pair.substr(brace || eql, pair.length) + , val = val.substr(indexOf(val, '=') + 1, val.length); + + // ?foo + if ('' == key) key = pair, val = ''; + if ('' == key) return ret; + + return merge(ret, decode(key), decode(val)); + }, { base: {} }).base; + + return compact(ret); +} + +/** + * Parse the given query `str` or `obj`, returning an object. + * + * @param {String} str | {Object} obj + * @return {Object} + * @api public + */ + +exports.parse = function(str){ + if (null == str || '' == str) return {}; + return 'object' == typeof str + ? parseObject(str) + : parseString(str); +}; + +/** + * Turn the given `obj` into a query string + * + * @param {Object} obj + * @return {String} + * @api public + */ + +var stringify = exports.stringify = function(obj, prefix) { + if (isArray(obj)) { + return stringifyArray(obj, prefix); + } else if ('[object Object]' == toString.call(obj)) { + return stringifyObject(obj, prefix); + } else if ('string' == typeof obj) { + return stringifyString(obj, prefix); + } else { + return prefix + '=' + encodeURIComponent(String(obj)); + } +}; + +/** + * Stringify the given `str`. + * + * @param {String} str + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyString(str, prefix) { + if (!prefix) throw new TypeError('stringify expects an object'); + return prefix + '=' + encodeURIComponent(str); +} + +/** + * Stringify the given `arr`. + * + * @param {Array} arr + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyArray(arr, prefix) { + var ret = []; + if (!prefix) throw new TypeError('stringify expects an object'); + for (var i = 0; i < arr.length; i++) { + ret.push(stringify(arr[i], prefix + '[' + i + ']')); + } + return ret.join('&'); +} + +/** + * Stringify the given `obj`. + * + * @param {Object} obj + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyObject(obj, prefix) { + var ret = [] + , keys = objectKeys(obj) + , key; + + for (var i = 0, len = keys.length; i < len; ++i) { + key = keys[i]; + if ('' == key) continue; + if (null == obj[key]) { + ret.push(encodeURIComponent(key) + '='); + } else { + ret.push(stringify(obj[key], prefix + ? prefix + '[' + encodeURIComponent(key) + ']' + : encodeURIComponent(key))); + } + } + + return ret.join('&'); +} + +/** + * Set `obj`'s `key` to `val` respecting + * the weird and wonderful syntax of a qs, + * where "foo=bar&foo=baz" becomes an array. + * + * @param {Object} obj + * @param {String} key + * @param {String} val + * @api private + */ + +function set(obj, key, val) { + var v = obj[key]; + if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; + if (undefined === v) { + obj[key] = val; + } else if (isArray(v)) { + v.push(val); + } else { + obj[key] = [v, val]; + } +} + +/** + * Locate last brace in `str` within the key. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function lastBraceInKey(str) { + var len = str.length + , brace + , c; + for (var i = 0; i < len; ++i) { + c = str[i]; + if (']' == c) brace = false; + if ('[' == c) brace = true; + if ('=' == c && !brace) return i; + } +} + +/** + * Decode `str`. + * + * @param {String} str + * @return {String} + * @api private + */ + +function decode(str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (err) { + return str; + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json new file mode 100644 index 00000000..313485c0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json @@ -0,0 +1,38 @@ +{ + "name": "qs", + "description": "querystring parser", + "version": "0.6.6", + "keywords": [ + "query string", + "parser", + "component" + ], + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/node-querystring.git" + }, + "devDependencies": { + "mocha": "*", + "expect.js": "*" + }, + "scripts": { + "test": "make test" + }, + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca", + "url": "http://tjholowaychuk.com" + }, + "main": "index", + "engines": { + "node": "*" + }, + "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", + "readmeFilename": "Readme.md", + "bugs": { + "url": "https://github.com/visionmedia/node-querystring/issues" + }, + "homepage": "https://github.com/visionmedia/node-querystring", + "_id": "qs@0.6.6", + "_from": "qs@~0.6.0" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc new file mode 100644 index 00000000..8fcead4f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc @@ -0,0 +1,72 @@ +{ + // Settings + "passfail" : false, // Stop on first error. + "maxerr" : 100, // Maximum error before stopping. + + + // Predefined globals whom JSHint will ignore. + "browser" : false, // Standard browser globals e.g. `window`, `document`. + "node" : true, + "rhino" : false, + "couch" : false, + "wsh" : false, // Windows Scripting Host. + + "jquery" : false, + "prototypejs" : false, + "mootools" : false, + "dojo" : false, + + "predef" : [ // Custom globals. + "escape", "unescape" // aren't picked up by node flag above :/ + ], + + + // Development. + "debug" : false, // Allow debugger statements e.g. browser breakpoints. + "devel" : false, // Allow developments statements e.g. `console.log();`. + + + // EcmaScript 5. + "es5" : true, // Allow EcmaScript 5 syntax. + "esnext" : true, // Allow ES "next" syntax, specifically 'const' (V8 has this) + "strict" : false, // Require `use strict` pragma in every file. + "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). + + + // The Good Parts. + "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). + "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. + "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). + "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. + "curly" : false, // Require {} for every new block or scope. + "eqeqeq" : false, // Require triple equals i.e. `===`. + "eqnull" : true, // Tolerate use of `== null`. + "evil" : false, // Tolerate use of `eval`. + "expr" : true, // Tolerate `ExpressionStatement` as Programs. + "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` + "latedef" : false, // Prohibit variable use before definition. + "loopfunc" : false, // Allow functions to be defined within loops. + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. + "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. + "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. + "scripturl" : true, // Tolerate script-targeted URLs. + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. + "undef" : true, // Require all non-global variables be declared before they are used. + + + // Personal styling prefrences. + "lastsemic" : true, // Prohibit missing semicolon for the last statement in a one-line block + "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`. + "noempty" : true, // Prohipit use of empty blocks. + "nonew" : true, // Prohibit use of constructors for side-effects. + "nomen" : false, // Prohibit use of initial or trailing underbars in names. + "onevar" : false, // Allow only one `var` statement per function. + "onecase" : false, // Allow switches with one case statement + "plusplus" : false, // Prohibit use of `++` & `--`. + "proto" : false, // Allow use of __proto__ + "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. + "trailing" : true, // Prohibit trailing whitespaces. + "white" : false // Check against strict whitespace and indentation rules. +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore new file mode 100644 index 00000000..54efff98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +.*.sw[nmop] +npm-debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE new file mode 100644 index 00000000..3fac4c85 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE @@ -0,0 +1,78 @@ +Copyright GoInstant, Inc. and other contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +The following exceptions apply: + +=== + +`pubSufTest()` of generate-pubsuffix.js is in the public domain. + + // Any copyright is dedicated to the Public Domain. + // http://creativecommons.org/publicdomain/zero/1.0/ + +=== + +`public-suffix.txt` was obtained from + +via . + +That file contains the usual Mozilla triple-license, for which this project uses it +under the terms of the MPL 1.1: + + // ***** BEGIN LICENSE BLOCK ***** + // Version: MPL 1.1/GPL 2.0/LGPL 2.1 + // + // The contents of this file are subject to the Mozilla Public License Version + // 1.1 (the "License"); you may not use this file except in compliance with + // the License. You may obtain a copy of the License at + // http://www.mozilla.org/MPL/ + // + // Software distributed under the License is distributed on an "AS IS" basis, + // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + // for the specific language governing rights and limitations under the + // License. + // + // The Original Code is the Public Suffix List. + // + // The Initial Developer of the Original Code is + // Jo Hermans . + // Portions created by the Initial Developer are Copyright (C) 2007 + // the Initial Developer. All Rights Reserved. + // + // Contributor(s): + // Ruben Arakelyan + // Gervase Markham + // Pamela Greene + // David Triendl + // Jothan Frakes + // The kind representatives of many TLD registries + // + // Alternatively, the contents of this file may be used under the terms of + // either the GNU General Public License Version 2 or later (the "GPL"), or + // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + // in which case the provisions of the GPL or the LGPL are applicable instead + // of those above. If you wish to allow use of your version of this file only + // under the terms of either the GPL or the LGPL, and not to allow others to + // use your version of this file under the terms of the MPL, indicate your + // decision by deleting the provisions above and replace them with the notice + // and other provisions required by the GPL or the LGPL. If you do not delete + // the provisions above, a recipient may use your version of this file under + // the terms of any one of the MPL, the GPL or the LGPL. + // + // ***** END LICENSE BLOCK ***** diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md new file mode 100644 index 00000000..fd1dbb1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md @@ -0,0 +1,380 @@ +[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js + +![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg) + +# Synopsis + +``` javascript +var cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie' +var Cookie = cookies.Cookie; +var cookie = Cookie.parse(header); +cookie.value = 'somethingdifferent'; +header = cookie.toString(); + +var cookiejar = new cookies.CookieJar(); +cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); +// ... +cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { + res.headers['cookie'] = cookies.join('; '); +}); +``` + +# Installation + +It's _so_ easy! + +`npm install tough-cookie` + +Requires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default. + +Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. + +# API + +cookies +======= + +Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". + +parseDate(string[,strict]) +----------------- + +Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. "Thu, 01 Jan 1970 00:00:010 GMT" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid). + +formatDate(date) +---------------- + +Format a Date into a RFC1123 string (the RFC6265-recommended format). + +canonicalDomain(str) +-------------------- + +Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). + +domainMatch(str,domStr[,canonicalize=true]) +------------------------------------------- + +Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". + +The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not. + +defaultPath(path) +----------------- + +Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. + +The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. + +pathMatch(reqPath,cookiePath) +----------------------------- + +Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. + +This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. + +parse(header[,strict=false]) +---------------------------- + +alias for `Cookie.parse(header[,strict])` + +fromJSON(string) +---------------- + +alias for `Cookie.fromJSON(string)` + +getPublicSuffix(hostname) +------------------------- + +Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. + +For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. + +For further information, see http://publicsuffix.org/. This module derives its list from that site. + +cookieCompare(a,b) +------------------ + +For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest. + +``` javascript +var cookies = [ /* unsorted array of Cookie objects */ ]; +cookies = cookies.sort(cookieCompare); +``` + +permuteDomain(domain) +--------------------- + +Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. + + +permutePath(path) +----------------- + +Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. + +Cookie +====== + +Cookie.parse(header[,strict=false]) +----------------------------------- + +Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off. + +Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: + +``` javascript +if (res.headers['set-cookie'] instanceof Array) + cookies = res.headers['set-cookie'].map(Cookie.parse); +else + cookies = [Cookie.parse(res.headers['set-cookie'])]; +``` + +Cookie.fromJSON(string) +----------------------- + +Convert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects. + +Properties +========== + + * _key_ - string - the name or key of the cookie (default "") + * _value_ - string - the value of the cookie (default "") + * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` + * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` + * _domain_ - string - the `Domain=` attribute of the cookie + * _path_ - string - the `Path=` of the cookie + * _secure_ - boolean - the `Secure` cookie flag + * _httpOnly_ - boolean - the `HttpOnly` cookie flag + * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) + +After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: + + * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) + * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. + * _created_ - `Date` - when this cookie was added to the jar + * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. + +Construction([{options}]) +------------ + +Receives an options object that can contain any Cookie properties, uses the default for unspecified properties. + +.toString() +----------- + +encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. + +.cookieString() +--------------- + +encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). + +.setExpires(String) +------------------- + +sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. + +.setMaxAge(number) +------------------- + +sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. + +.expiryTime([now=Date.now()]) +----------------------------- + +.expiryDate([now=Date.now()]) +----------------------------- + +expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. + +Max-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute. + +If Expires (`.expires`) is set, that's returned. + +Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). + +.TTL([now=Date.now()]) +--------- + +compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. + +The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. + +.canonicalizedDoman() +--------------------- + +.cdomain() +---------- + +return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. + +.validate() +----------- + +Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. + +validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: + +``` javascript +if (cookie.validate() === true) { + // it's tasty +} else { + // yuck! +} +``` + +CookieJar +========= + +Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes]) +------------ + +Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. + + +Attributes +---------- + + * _rejectPublicSuffixes_ - boolean - reject cookies with domains like "com" and "co.uk" (default: `true`) + +Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. + +.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie)) +------------------------------------------------------------------- + +Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _strict_ - boolean - default `false` - perform extra checks + * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option. + +As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). + +.storeCookie(cookie, [{options},] cb(err,cookie)) +------------------------------------------------- + +__REMOVED__ removed in lieu of the CookieStore API below + +.getCookies(currentUrl, [{options},] cb(err,cookies)) +----------------------------------------------------- + +Retrieve the list of cookies that can be sent in a Cookie header for the current url. + +If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). + * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it). + +The `.lastAccessed` property of the returned cookies will have been updated. + +.getCookieString(...) +--------------------- + +Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. + +.getSetCookieStrings(...) +------------------------- + +Accepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`. + +# CookieStore API + +The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. + +All `domain` parameters will have been normalized before calling. + +The Cookie store must have all of the following methods. + +store.findCookie(domain, path, key, cb(err,cookie)) +--------------------------------------------------- + +Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. + +Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). + +store.findCookies(domain, path, cb(err,cookies)) +------------------------------------------------ + +Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. + +If no cookies are found, the callback MUST be passed an empty array. + +The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. + +As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). + +store.putCookie(cookie, cb(err)) +-------------------------------- + +Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. + +The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. + +Pass an error if the cookie cannot be stored. + +store.updateCookie(oldCookie, newCookie, cb(err)) +------------------------------------------------- + +Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. + +The `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion). + +Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. + +The `newCookie` and `oldCookie` objects MUST NOT be modified. + +Pass an error if the newCookie cannot be stored. + +store.removeCookie(domain, path, key, cb(err)) +---------------------------------------------- + +Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). + +The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. + +store.removeCookies(domain, path, cb(err)) +------------------------------------------ + +Removes matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed. + +Pass an error ONLY if removing any existing cookies failed. + +# TODO + + * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()` + * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891 + * better tests for `validate()`? + +# Copyright and License + +(tl;dr: MIT with some MPL/1.1) + +Copyright GoInstant, Inc. and other contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +Portions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js new file mode 100644 index 00000000..a7fa5452 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js @@ -0,0 +1,230 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +var fs = require('fs'); +var assert = require('assert'); +var punycode = require('punycode'); + +fs.readFile('./public-suffix.txt', 'utf8', function(err,string) { + if (err) throw err; + var lines = string.split("\n"); + process.nextTick(function() { + processList(lines); + }); +}); + +var index = {}; + +var COMMENT = new RegExp('//.+'); +function processList(lines) { + while (lines.length) { + var line = lines.shift(); + line = line.replace(COMMENT,'').trim(); + if (!line) continue; + addToIndex(index,line); + } + + pubSufTest(); + + var w = fs.createWriteStream('./lib/pubsuffix.js',{ + flags: 'w', + encoding: 'utf8', + mode: 0644, + }); + w.on('end', process.exit); + w.write("/****************************************************\n"); + w.write(" * AUTOMATICALLY GENERATED by generate-pubsuffix.js *\n"); + w.write(" * DO NOT EDIT! *\n"); + w.write(" ****************************************************/\n\n"); + + w.write("module.exports.getPublicSuffix = "); + w.write(getPublicSuffix.toString()); + w.write(";\n\n"); + + w.write("// The following generated structure is used under the MPL version 1.1\n"); + w.write("// See public-suffix.txt for more information\n\n"); + w.write("var index = module.exports.index = Object.freeze(\n"); + w.write(JSON.stringify(index)); + w.write(");\n\n"); + w.write("// END of automatically generated file\n"); + + w.end(); +} + +function addToIndex(index,line) { + var prefix = ''; + if (line.replace(/^(!|\*\.)/)) { + prefix = RegExp.$1; + line = line.slice(prefix.length); + } + line = prefix + punycode.toASCII(line); + + if (line.substr(0,1) == '!') + index[line.substr(1)] = false; + else + index[line] = true; +} + +// include the licence in the function since it gets written to pubsuffix.js +function getPublicSuffix(domain) { + /* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + if (!domain) return null; + if (domain.match(/^\./)) return null; + + domain = domain.toLowerCase(); + var parts = domain.split('.').reverse(); + + var suffix = ''; + var suffixLen = 0; + for (var i=0; i suffixLen) { + return parts.slice(0,suffixLen+1).reverse().join('.'); + } + + return null; +} + +function checkPublicSuffix(give,get) { + var got = getPublicSuffix(give); + assert.equal(got, get, give+' should be '+(get==null?'NULL':get)+' but got '+got); +} + +// pubSufTest() was converted to JavaScript from http://publicsuffix.org/list/test.txt +function pubSufTest() { + // For this function-scope and this function-scope ONLY: + // Any copyright is dedicated to the Public Domain. + // http://creativecommons.org/publicdomain/zero/1.0/ + + // NULL input. + checkPublicSuffix(null, null); + // Mixed case. + checkPublicSuffix('COM', null); + checkPublicSuffix('example.COM', 'example.com'); + checkPublicSuffix('WwW.example.COM', 'example.com'); + // Leading dot. + checkPublicSuffix('.com', null); + checkPublicSuffix('.example', null); + checkPublicSuffix('.example.com', null); + checkPublicSuffix('.example.example', null); + // Unlisted TLD. + checkPublicSuffix('example', null); + checkPublicSuffix('example.example', null); + checkPublicSuffix('b.example.example', null); + checkPublicSuffix('a.b.example.example', null); + // Listed, but non-Internet, TLD. + checkPublicSuffix('local', null); + checkPublicSuffix('example.local', null); + checkPublicSuffix('b.example.local', null); + checkPublicSuffix('a.b.example.local', null); + // TLD with only 1 rule. + checkPublicSuffix('biz', null); + checkPublicSuffix('domain.biz', 'domain.biz'); + checkPublicSuffix('b.domain.biz', 'domain.biz'); + checkPublicSuffix('a.b.domain.biz', 'domain.biz'); + // TLD with some 2-level rules. + checkPublicSuffix('com', null); + checkPublicSuffix('example.com', 'example.com'); + checkPublicSuffix('b.example.com', 'example.com'); + checkPublicSuffix('a.b.example.com', 'example.com'); + checkPublicSuffix('uk.com', null); + checkPublicSuffix('example.uk.com', 'example.uk.com'); + checkPublicSuffix('b.example.uk.com', 'example.uk.com'); + checkPublicSuffix('a.b.example.uk.com', 'example.uk.com'); + checkPublicSuffix('test.ac', 'test.ac'); + // TLD with only 1 (wildcard) rule. + checkPublicSuffix('cy', null); + checkPublicSuffix('c.cy', null); + checkPublicSuffix('b.c.cy', 'b.c.cy'); + checkPublicSuffix('a.b.c.cy', 'b.c.cy'); + // More complex TLD. + checkPublicSuffix('jp', null); + checkPublicSuffix('test.jp', 'test.jp'); + checkPublicSuffix('www.test.jp', 'test.jp'); + checkPublicSuffix('ac.jp', null); + checkPublicSuffix('test.ac.jp', 'test.ac.jp'); + checkPublicSuffix('www.test.ac.jp', 'test.ac.jp'); + checkPublicSuffix('kyoto.jp', null); + checkPublicSuffix('c.kyoto.jp', null); + checkPublicSuffix('b.c.kyoto.jp', 'b.c.kyoto.jp'); + checkPublicSuffix('a.b.c.kyoto.jp', 'b.c.kyoto.jp'); + checkPublicSuffix('pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. + checkPublicSuffix('www.pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. + checkPublicSuffix('city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. + checkPublicSuffix('www.city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. + // TLD with a wildcard rule and exceptions. + checkPublicSuffix('om', null); + checkPublicSuffix('test.om', null); + checkPublicSuffix('b.test.om', 'b.test.om'); + checkPublicSuffix('a.b.test.om', 'b.test.om'); + checkPublicSuffix('songfest.om', 'songfest.om'); + checkPublicSuffix('www.songfest.om', 'songfest.om'); + // US K12. + checkPublicSuffix('us', null); + checkPublicSuffix('test.us', 'test.us'); + checkPublicSuffix('www.test.us', 'test.us'); + checkPublicSuffix('ak.us', null); + checkPublicSuffix('test.ak.us', 'test.ak.us'); + checkPublicSuffix('www.test.ak.us', 'test.ak.us'); + checkPublicSuffix('k12.ak.us', null); + checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us'); + checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us'); + + +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js new file mode 100644 index 00000000..1d8615b5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js @@ -0,0 +1,947 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/*jshint regexp:false */ +var net = require('net'); +var urlParse = require('url').parse; +var pubsuffix = require('./pubsuffix'); + +var punycode; +try { + punycode = require('punycode'); +} catch(e) { + console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); +} + +var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; + +// From RFC2616 S2.2: +var TOKEN = /[\x21\x23-\x26\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/; + +// From RFC6265 S4.1.1 +// note that it excludes \x3B ";" +var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/; +var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; + +// The name/key cannot be empty but the value can (S5.2): +var COOKIE_PAIR_STRICT = new RegExp('^('+TOKEN.source+'+)=("?)('+COOKIE_OCTET.source+'*)\\2'); +var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2/; + +// RFC6265 S4.1.1 defines extension-av as 'any CHAR except CTLs or ";"' +// Note ';' is \x3B +var NON_CTL_SEMICOLON = /[\x20-\x3A\x3C-\x7E]+/; +var EXTENSION_AV = NON_CTL_SEMICOLON; +var PATH_VALUE = NON_CTL_SEMICOLON; + +// Used for checking whether or not there is a trailing semi-colon +var TRAILING_SEMICOLON = /;+$/; + +/* RFC6265 S5.1.1.5: + * [fail if] the day-of-month-value is less than 1 or greater than 31 + */ +var DAY_OF_MONTH = /^(0?[1-9]|[12][0-9]|3[01])$/; + +/* RFC6265 S5.1.1.5: + * [fail if] + * * the hour-value is greater than 23, + * * the minute-value is greater than 59, or + * * the second-value is greater than 59. + */ +var TIME = /(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/; +var STRICT_TIME = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/; + +var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/i; +var MONTH_TO_NUM = { + jan:0, feb:1, mar:2, apr:3, may:4, jun:5, jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 +}; +var NUM_TO_MONTH = [ + 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' +]; +var NUM_TO_DAY = [ + 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' +]; + +var YEAR = /^([1-9][0-9]{1,3})$/; // 2 to 4 digits (will check range when parsing) + +var MAX_TIME = 2147483647000; // 31-bit max +var MAX_DATE = new Date(CookieJar.MAX_TIME); // 31-bit max +var MIN_TIME = 0; // 31-bit min +var MIN_DATE = new Date(CookieJar.MIN_TIME); // 31-bit min + + +// RFC6265 S5.1.1 date parser: +function parseDate(str,strict) { + if (!str) return; + var found_time, found_dom, found_month, found_year; + + /* RFC6265 S5.1.1: + * 2. Process each date-token sequentially in the order the date-tokens + * appear in the cookie-date + */ + var tokens = str.split(DATE_DELIM); + if (!tokens) return; + + var date = new Date(); + date.setMilliseconds(0); + + for (var i=0; i= 10 ? d : '0'+d; + var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; + var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; + var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; + return NUM_TO_DAY[date.getUTCDay()] + ', ' + + d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ + h+':'+m+':'+s+' GMT'; +} + +// S5.1.2 Canonicalized Host Names +function canonicalDomain(str) { + if (str == null) return null; + str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . + + // convert to IDN if any non-ASCII characters + if (punycode && /[^\u0001-\u007f]/.test(str)) + str = punycode.toASCII(str); + + return str.toLowerCase(); +} + +// S5.1.3 Domain Matching +function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) return null; + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } + + /* + * "The domain string and the string are identical. (Note that both the + * domain string and the string will have been canonicalized to lower case at + * this point)" + */ + if (str == domStr) return true; + + /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ + + /* "* The string is a host name (i.e., not an IP address)." */ + if (net.isIP(str)) return false; + + /* "* The domain string is a suffix of the string" */ + var idx = str.indexOf(domStr); + if (idx <= 0) return false; // it's a non-match (-1) or prefix (0) + + // e.g "a.b.c".indexOf("b.c") === 2 + // 5 === 3+2 + if (str.length !== domStr.length + idx) // it's not a suffix + return false; + + /* "* The last character of the string that is not included in the domain + * string is a %x2E (".") character." */ + if (str.substr(idx-1,1) !== '.') return false; + return true; +} + + +// RFC6265 S5.1.4 Paths and Path-Match + +/* + * "The user agent MUST use an algorithm equivalent to the following algorithm + * to compute the default-path of a cookie:" + * + * Assumption: the path (and not query part or absolute uri) is passed in. + */ +function defaultPath(path) { + // "2. If the uri-path is empty or if the first character of the uri-path is not + // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. + if (!path || path.substr(0,1) !== "/") return "/"; + + // "3. If the uri-path contains no more than one %x2F ("/") character, output + // %x2F ("/") and skip the remaining step." + if (path === "/") return path; + + var rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) return "/"; + + // "4. Output the characters of the uri-path from the first character up to, + // but not including, the right-most %x2F ("/")." + return path.slice(0, rightSlash); +} + +/* + * "A request-path path-matches a given cookie-path if at least one of the + * following conditions holds:" + */ +function pathMatch(reqPath,cookiePath) { + // "o The cookie-path and the request-path are identical." + if (cookiePath === reqPath) + return true; + + var idx = reqPath.indexOf(cookiePath); + if (idx === 0) { + // "o The cookie-path is a prefix of the request-path, and the last + // character of the cookie-path is %x2F ("/")." + if (cookiePath.substr(-1) === "/") + return true; + + // " o The cookie-path is a prefix of the request-path, and the first + // character of the request-path that is not included in the cookie- path + // is a %x2F ("/") character." + if (reqPath.substr(cookiePath.length,1) === "/") + return true; + } + + return false; +} + +function parse(str, strict) { + str = str.trim(); + + // S4.1.1 Trailing semi-colons are not part of the specification. + // If we are not in strict mode we remove the trailing semi-colons. + var semiColonCheck = TRAILING_SEMICOLON.exec(str); + if (semiColonCheck) { + if (strict) return; + str = str.slice(0, semiColonCheck.index); + } + + // We use a regex to parse the "name-value-pair" part of S5.2 + var firstSemi = str.indexOf(';'); // S5.2 step 1 + var pairRx = strict ? COOKIE_PAIR_STRICT : COOKIE_PAIR; + var result = pairRx.exec(firstSemi === -1 ? str : str.substr(0,firstSemi)); + + // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")" + // constraints as well as trimming any whitespace. + if (!result) return; + + var c = new Cookie(); + c.key = result[1]; // the regexp should trim() already + c.value = result[3]; // [2] is quotes or empty-string + + if (firstSemi === -1) return c; + + // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question)." plus later on in the same section + // "discard the first ";" and trim". + var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); + + // "If the unparsed-attributes string is empty, skip the rest of these + // steps." + if (unparsed.length === 0) return c; + + /* + * S5.2 says that when looping over the items "[p]rocess the attribute-name + * and attribute-value according to the requirements in the following + * subsections" for every item. Plus, for many of the individual attributes + * in S5.3 it says to use the "attribute-value of the last attribute in the + * cookie-attribute-list". Therefore, in this implementation, we overwrite + * the previous value. + */ + var cookie_avs = unparsed.split(/\s*;\s*/); + while (cookie_avs.length) { + var av = cookie_avs.shift(); + + if (strict && !EXTENSION_AV.test(av)) return; + + var av_sep = av.indexOf('='); + var av_key, av_value; + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0,av_sep); + av_value = av.substr(av_sep+1); + } + + av_key = av_key.trim().toLowerCase(); + if (av_value) av_value = av_value.trim(); + + switch(av_key) { + case 'expires': // S5.2.1 + if (!av_value) { if(strict){return}else{break;} } + var exp = parseDate(av_value,strict); + // "If the attribute-value failed to parse as a cookie date, ignore the + // cookie-av." + if (exp == null) { if(strict){return}else{break;} } + c.expires = exp; + // over and underflow not realistically a concern: V8's getTime() seems to + // store something larger than a 32-bit time_t (even with 32-bit node) + break; + + case 'max-age': // S5.2.2 + if (!av_value) { if(strict){return}else{break;} } + // "If the first character of the attribute-value is not a DIGIT or a "-" + // character ...[or]... If the remainder of attribute-value contains a + // non-DIGIT character, ignore the cookie-av." + if (!/^-?[0-9]+$/.test(av_value)) { if(strict){return}else{break;} } + var delta = parseInt(av_value,10); + if (strict && delta <= 0) return; // S4.1.1 + // "If delta-seconds is less than or equal to zero (0), let expiry-time + // be the earliest representable date and time." + c.setMaxAge(delta); + break; + + case 'domain': // S5.2.3 + // "If the attribute-value is empty, the behavior is undefined. However, + // the user agent SHOULD ignore the cookie-av entirely." + if (!av_value) { if(strict){return}else{break;} } + // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E + // (".") character." + var domain = av_value.trim().replace(/^\./,''); + if (!domain) { if(strict){return}else{break;} } // see "is empty" above + // "Convert the cookie-domain to lower case." + c.domain = domain.toLowerCase(); + break; + + case 'path': // S5.2.4 + /* + * "If the attribute-value is empty or if the first character of the + * attribute-value is not %x2F ("/"): + * Let cookie-path be the default-path. + * Otherwise: + * Let cookie-path be the attribute-value." + * + * We'll represent the default-path as null since it depends on the + * context of the parsing. + */ + if (!av_value || av_value.substr(0,1) != "/") { if(strict){return}else{break;} } + c.path = av_value; + break; + + case 'secure': // S5.2.5 + /* + * "If the attribute-name case-insensitively matches the string "Secure", + * the user agent MUST append an attribute to the cookie-attribute-list + * with an attribute-name of Secure and an empty attribute-value." + */ + if (av_value != null) { if(strict){return} } + c.secure = true; + break; + + case 'httponly': // S5.2.6 -- effectively the same as 'secure' + if (av_value != null) { if(strict){return} } + c.httpOnly = true; + break; + + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } + + // ensure a default date for sorting: + c.creation = new Date(); + return c; +} + +function fromJSON(str) { + if (!str) return null; + + var obj; + try { + obj = JSON.parse(str); + } catch (e) { + return null; + } + + var c = new Cookie(); + for (var i=0; i 1) { + var lindex = path.lastIndexOf('/'); + if (lindex === 0) break; + path = path.substr(0,lindex); + permutations.push(path); + } + permutations.push('/'); + return permutations; +} + + +function Cookie (opts) { + if (typeof opts !== "object") return; + Object.keys(opts).forEach(function (key) { + if (Cookie.prototype.hasOwnProperty(key)) { + this[key] = opts[key] || Cookie.prototype[key]; + } + }.bind(this)); +} + +Cookie.parse = parse; +Cookie.fromJSON = fromJSON; + +Cookie.prototype.key = ""; +Cookie.prototype.value = ""; + +// the order in which the RFC has them: +Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity +Cookie.prototype.maxAge = null; // takes precedence over expires for TTL +Cookie.prototype.domain = null; +Cookie.prototype.path = null; +Cookie.prototype.secure = false; +Cookie.prototype.httpOnly = false; +Cookie.prototype.extensions = null; + +// set by the CookieJar: +Cookie.prototype.hostOnly = null; // boolean when set +Cookie.prototype.pathIsDefault = null; // boolean when set +Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse +Cookie.prototype.lastAccessed = null; // Date when set + +var cookieProperties = Object.freeze(Object.keys(Cookie.prototype).map(function(p) { + if (p instanceof Function) return; + return p; +})); +var numCookieProperties = cookieProperties.length; + +Cookie.prototype.inspect = function inspect() { + var now = Date.now(); + return 'Cookie="'+this.toString() + + '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + + '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + + '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + + '"'; +}; + +Cookie.prototype.validate = function validate() { + if (!COOKIE_OCTETS.test(this.value)) + return false; + if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires,true)) + return false; + if (this.maxAge != null && this.maxAge <= 0) + return false; // "Max-Age=" non-zero-digit *DIGIT + if (this.path != null && !PATH_VALUE.test(this.path)) + return false; + + var cdomain = this.cdomain(); + if (cdomain) { + if (cdomain.match(/\.$/)) + return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this + var suffix = pubsuffix.getPublicSuffix(cdomain); + if (suffix == null) // it's a public suffix + return false; + } + return true; +}; + +Cookie.prototype.setExpires = function setExpires(exp) { + if (exp instanceof Date) this.expires = exp; + else this.expires = parseDate(exp) || "Infinity"; +}; + +Cookie.prototype.setMaxAge = function setMaxAge(age) { + if (age === Infinity || age === -Infinity) + this.maxAge = age.toString(); // so JSON.stringify() works + else + this.maxAge = age; +}; + +// gives Cookie header format +Cookie.prototype.cookieString = function cookieString() { + var val = this.value; + if (val == null) val = ''; + if (!val.length || COOKIE_OCTETS.test(val)) + return this.key+'='+val; + else + return this.key+'="'+val+'"'; +}; + +// gives Set-Cookie header format +Cookie.prototype.toString = function toString() { + var str = this.cookieString(); + + if (this.expires != Infinity) { + if (this.expires instanceof Date) + str += '; Expires='+formatDate(this.expires); + else + str += '; Expires='+this.expires; + } + + if (this.maxAge != null && this.maxAge != Infinity) + str += '; Max-Age='+this.maxAge; + + if (this.domain && !this.hostOnly) + str += '; Domain='+this.domain; + if (this.path) + str += '; Path='+this.path; + + if (this.secure) str += '; Secure'; + if (this.httpOnly) str += '; HttpOnly'; + if (this.extensions) { + this.extensions.forEach(function(ext) { + str += '; '+ext; + }); + } + + return str; +}; + +// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere) +// S5.3 says to give the "latest representable date" for which we use Infinity +// For "expired" we use 0 +Cookie.prototype.TTL = function TTL(now) { + /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires + * attribute, the Max-Age attribute has precedence and controls the + * expiration date of the cookie. + * (Concurs with S5.3 step 3) + */ + if (this.maxAge != null) { + return this.maxAge<=0 ? 0 : this.maxAge*1000; + } + + var expires = this.expires; + if (expires != Infinity) { + if (!(expires instanceof Date)) { + expires = parseDate(expires) || Infinity; + } + + if (expires == Infinity) + return Infinity; + + return expires.getTime() - (now || Date.now()); + } + + return Infinity; +}; + +// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere) +Cookie.prototype.expiryTime = function expiryTime(now) { + if (this.maxAge != null) { + var relativeTo = this.creation || now || new Date(); + var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000; + return relativeTo.getTime() + age; + } + + if (this.expires == Infinity) return Infinity; + return this.expires.getTime(); +}; + +// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere), except it returns a Date +Cookie.prototype.expiryDate = function expiryDate(now) { + var millisec = this.expiryTime(now); + if (millisec == Infinity) return new Date(MAX_TIME); + else if (millisec == -Infinity) return new Date(MIN_TIME); + else return new Date(millisec); +}; + +// This replaces the "persistent-flag" parts of S5.3 step 3 +Cookie.prototype.isPersistent = function isPersistent() { + return (this.maxAge != null || this.expires != Infinity); +}; + +// Mostly S5.1.2 and S5.2.3: +Cookie.prototype.cdomain = +Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() { + if (this.domain == null) return null; + return canonicalDomain(this.domain); +}; + + +var memstore; +function CookieJar(store, rejectPublicSuffixes) { + if (rejectPublicSuffixes != null) this.rejectPublicSuffixes = rejectPublicSuffixes; + if (!store) { + memstore = memstore || require('./memstore'); + store = new memstore.MemoryCookieStore(); + } + this.store = store; +} +CookieJar.prototype.store = null; +CookieJar.prototype.rejectPublicSuffixes = true; + +CookieJar.prototype.setCookie = function setCookie(cookie, url, options, cb) { + var err; + var context = (url instanceof Object) ? url : urlParse(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + + var host = canonicalDomain(context.hostname); + + // S5.3 step 1 + if (!(cookie instanceof Cookie)) + cookie = Cookie.parse(cookie, options.strict === true); + if (!cookie) { + err = new Error("Cookie failed to parse"); + return cb(options.ignoreError ? null : err); + } + + // S5.3 step 2 + var now = options.now || new Date(); // will assign later to save effort in the face of errors + + // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie() + + // S5.3 step 4: NOOP; domain is null by default + + // S5.3 step 5: public suffixes + if (this.rejectPublicSuffixes && cookie.domain) { + var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); + if (suffix == null) { // e.g. "com" + err = new Error("Cookie has domain set to a public suffix"); + return cb(options.ignoreError ? null : err); + } + } + + // S5.3 step 6: + if (cookie.domain) { + if (!domainMatch(host, cookie.cdomain(), false)) { + err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host); + return cb(options.ignoreError ? null : err); + } + + if (cookie.hostOnly == null) // don't reset if already set + cookie.hostOnly = false; + + } else { + cookie.hostOnly = true; + cookie.domain = host; + } + + // S5.3 step 7: "Otherwise, set the cookie's path to the default-path of the + // request-uri" + if (!cookie.path) { + cookie.path = defaultPath(context.pathname); + cookie.pathIsDefault = true; + } else { + if (cookie.path.length > 1 && cookie.path.substr(-1) == '/') + cookie.path = cookie.path.slice(0,-1); + } + + // S5.3 step 8: NOOP; secure attribute + // S5.3 step 9: NOOP; httpOnly attribute + + // S5.3 step 10 + if (options.http === false && cookie.httpOnly) { + err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + + var store = this.store; + + if (!store.updateCookie) { + store.updateCookie = function stubUpdateCookie(oldCookie, newCookie, cb) { + this.putCookie(newCookie, cb); + }; + } + + store.findCookie(cookie.domain, cookie.path, cookie.key, function(err,oldCookie) { + if (err) return cb(err); + + var next = function(err) { + if (err) return cb(err); + else cb(null, cookie); + }; + + if (oldCookie) { + // S5.3 step 11 - "If the cookie store contains a cookie with the same name, + // domain, and path as the newly created cookie:" + if (options.http === false && oldCookie.httpOnly) { // step 11.2 + err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + cookie.creation = oldCookie.creation; // step 11.3 + cookie.lastAccessed = now; + // Step 11.4 (delete cookie) is implied by just setting the new one: + store.updateCookie(oldCookie, cookie, next); // step 12 + + } else { + cookie.creation = cookie.lastAccessed = now; + store.putCookie(cookie, next); // step 12 + } + }); +}; + +// RFC6365 S5.4 +CookieJar.prototype.getCookies = function getCookies(url, options, cb) { + var context = (url instanceof Object) ? url : urlParse(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + + var host = canonicalDomain(context.hostname); + var path = context.pathname || '/'; + + var secure = options.secure; + if (secure == null && context.protocol && + (context.protocol == 'https:' || context.protocol == 'wss:')) + { + secure = true; + } + + var http = options.http; + if (http == null) http = true; + + var now = options.now || Date.now(); + var expireCheck = options.expire !== false; + var allPaths = !!options.allPaths; + var store = this.store; + + function matchingCookie(c) { + // "Either: + // The cookie's host-only-flag is true and the canonicalized + // request-host is identical to the cookie's domain. + // Or: + // The cookie's host-only-flag is false and the canonicalized + // request-host domain-matches the cookie's domain." + if (c.hostOnly) { + if (c.domain != host) return false; + } else { + if (!domainMatch(host, c.domain, false)) return false; + } + + // "The request-uri's path path-matches the cookie's path." + if (!allPaths && !pathMatch(path, c.path)) + return false; + + // "If the cookie's secure-only-flag is true, then the request-uri's + // scheme must denote a "secure" protocol" + if (c.secure && !secure) + return false; + + // "If the cookie's http-only-flag is true, then exclude the cookie if the + // cookie-string is being generated for a "non-HTTP" API" + if (c.httpOnly && !http) + return false; + + // deferred from S5.3 + // non-RFC: allow retention of expired cookies by choice + if (expireCheck && c.expiryTime() <= now) { + store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored + return false; + } + + return true; + } + + store.findCookies(host, allPaths ? null : path, function(err,cookies) { + if (err) return cb(err); + + cookies = cookies.filter(matchingCookie); + + // sorting of S5.4 part 2 + if (options.sort !== false) + cookies = cookies.sort(cookieCompare); + + // S5.4 part 3 + var now = new Date(); + cookies.forEach(function(c) { c.lastAccessed = now }); + // TODO persist lastAccessed + + cb(null,cookies); + }); +}; + +CookieJar.prototype.getCookieString = function(/*..., cb*/) { + var args = Array.prototype.slice.call(arguments,0); + var cb = args.pop(); + var next = function(err,cookies) { + if (err) cb(err); + else cb(null, cookies.map(function(c){return c.cookieString()}).join('; ')); + }; + args.push(next); + this.getCookies.apply(this,args); +}; + +CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) { + var args = Array.prototype.slice.call(arguments,0); + var cb = args.pop(); + var next = function(err,cookies) { + if (err) cb(err); + else cb(null, cookies.map(function(c){return c.toString()})); + }; + args.push(next); + this.getCookies.apply(this,args); +}; + + + +module.exports = { + CookieJar: CookieJar, + Cookie: Cookie, + parseDate: parseDate, + formatDate: formatDate, + parse: parse, + fromJSON: fromJSON, + domainMatch: domainMatch, + defaultPath: defaultPath, + pathMatch: pathMatch, + getPublicSuffix: pubsuffix.getPublicSuffix, + cookieCompare: cookieCompare, + permuteDomain: permuteDomain, + permutePath: permutePath, + canonicalDomain: canonicalDomain, +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js new file mode 100644 index 00000000..66abb376 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js @@ -0,0 +1,102 @@ +var tough = require('./cookie'); +var permuteDomain = tough.permuteDomain; +var permutePath = tough.permutePath; +var util = require('util'); + +function MemoryCookieStore() { + this.idx = {}; +} +module.exports.MemoryCookieStore = MemoryCookieStore; +MemoryCookieStore.prototype.idx = null; + +// force a default depth: +MemoryCookieStore.prototype.inspect = function inspect() { + return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; +}; + +MemoryCookieStore.prototype.findCookie = function findCookie(domain, path, key, cb) { + if (!this.idx[domain]) return cb(null,undefined); + if (!this.idx[domain][path]) return cb(null,undefined); + return cb(null,this.idx[domain][path][key]||null); +}; + +MemoryCookieStore.prototype.findCookies = function findCookies(domain, path, cb) { + var results = []; + if (!domain) return cb(null,[]); + + var pathMatcher; + if (!path) { + // null or '/' means "all paths" + pathMatcher = function matchAll(domainIndex) { + for (var curPath in domainIndex) { + var pathIndex = domainIndex[curPath]; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }; + + } else if (path === '/') { + pathMatcher = function matchSlash(domainIndex) { + var pathIndex = domainIndex['/']; + if (!pathIndex) return; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + }; + + } else { + var paths = permutePath(path) || [path]; + pathMatcher = function matchRFC(domainIndex) { + paths.forEach(function(curPath) { + var pathIndex = domainIndex[curPath]; + if (!pathIndex) return; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + }); + }; + } + + var domains = permuteDomain(domain) || [domain]; + var idx = this.idx; + domains.forEach(function(curDomain) { + var domainIndex = idx[curDomain]; + if (!domainIndex) return; + pathMatcher(domainIndex); + }); + + cb(null,results); +}; + +MemoryCookieStore.prototype.putCookie = function putCookie(cookie, cb) { + if (!this.idx[cookie.domain]) this.idx[cookie.domain] = {}; + if (!this.idx[cookie.domain][cookie.path]) this.idx[cookie.domain][cookie.path] = {}; + this.idx[cookie.domain][cookie.path][cookie.key] = cookie; + cb(null); +}; + +MemoryCookieStore.prototype.updateCookie = function updateCookie(oldCookie, newCookie, cb) { + // updateCookie() may avoid updating cookies that are identical. For example, + // lastAccessed may not be important to some stores and an equality + // comparison could exclude that field. + this.putCookie(newCookie,cb); +}; + +MemoryCookieStore.prototype.removeCookie = function removeCookie(domain, path, key, cb) { + if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { + delete this.idx[domain][path][key]; + } + cb(null); +}; + +MemoryCookieStore.prototype.removeCookies = function removeCookies(domain, path, cb) { + if (!this.idx[domain]) { + if (path) { + delete this.idx[domain][path]; + } else { + delete this.idx[domain]; + } + } + return cb(null); +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js new file mode 100644 index 00000000..a7031473 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js @@ -0,0 +1,69 @@ +/**************************************************** + * AUTOMATICALLY GENERATED by generate-pubsuffix.js * + * DO NOT EDIT! * + ****************************************************/ + +module.exports.getPublicSuffix = function getPublicSuffix(domain) { + /* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + if (!domain) return null; + if (domain.match(/^\./)) return null; + + domain = domain.toLowerCase(); + var parts = domain.split('.').reverse(); + + var suffix = ''; + var suffixLen = 0; + for (var i=0; i suffixLen) { + return parts.slice(0,suffixLen+1).reverse().join('.'); + } + + return null; +}; + +// The following generated structure is used under the MPL version 1.1 +// See public-suffix.txt for more information + +var index = module.exports.index = Object.freeze( +{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"*.ar":true,"congresodelalengua3.ar":false,"educ.ar":false,"gobiernoelectronico.ar":false,"mecon.ar":false,"nacion.ar":false,"nic.ar":false,"promocion.ar":false,"retina.ar":false,"uba.ar":false,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"csiro.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"act.gov.au":true,"nt.gov.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"can.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mus.br":true,"net.br":true,"nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"gov.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cx":true,"gov.cx":true,"*.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"*.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"org.gg":true,"net.gg":true,"sch.gg":true,"gov.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"gm":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"*.gt":true,"www.gt":false,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"co.id":true,"go.id":true,"mil.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"*.il":true,"im":true,"co.im":true,"ltd.co.im":true,"plc.co.im":true,"net.im":true,"gov.im":true,"org.im":true,"nic.im":true,"ac.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"agrigento.it":true,"ag.it":true,"alessandria.it":true,"al.it":true,"ancona.it":true,"an.it":true,"aosta.it":true,"aoste.it":true,"ao.it":true,"arezzo.it":true,"ar.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"ap.it":true,"asti.it":true,"at.it":true,"avellino.it":true,"av.it":true,"bari.it":true,"ba.it":true,"andria-barletta-trani.it":true,"andriabarlettatrani.it":true,"trani-barletta-andria.it":true,"tranibarlettaandria.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"andria-trani-barletta.it":true,"andriatranibarletta.it":true,"trani-andria-barletta.it":true,"traniandriabarletta.it":true,"bt.it":true,"belluno.it":true,"bl.it":true,"benevento.it":true,"bn.it":true,"bergamo.it":true,"bg.it":true,"biella.it":true,"bi.it":true,"bologna.it":true,"bo.it":true,"bolzano.it":true,"bozen.it":true,"balsan.it":true,"alto-adige.it":true,"altoadige.it":true,"suedtirol.it":true,"bz.it":true,"brescia.it":true,"bs.it":true,"brindisi.it":true,"br.it":true,"cagliari.it":true,"ca.it":true,"caltanissetta.it":true,"cl.it":true,"campobasso.it":true,"cb.it":true,"carboniaiglesias.it":true,"carbonia-iglesias.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"ci.it":true,"caserta.it":true,"ce.it":true,"catania.it":true,"ct.it":true,"catanzaro.it":true,"cz.it":true,"chieti.it":true,"ch.it":true,"como.it":true,"co.it":true,"cosenza.it":true,"cs.it":true,"cremona.it":true,"cr.it":true,"crotone.it":true,"kr.it":true,"cuneo.it":true,"cn.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"ogliastra.it":true,"og.it":true,"enna.it":true,"en.it":true,"ferrara.it":true,"fe.it":true,"fermo.it":true,"fm.it":true,"firenze.it":true,"florence.it":true,"fi.it":true,"foggia.it":true,"fg.it":true,"forli-cesena.it":true,"forlicesena.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"fc.it":true,"frosinone.it":true,"fr.it":true,"genova.it":true,"genoa.it":true,"ge.it":true,"gorizia.it":true,"go.it":true,"grosseto.it":true,"gr.it":true,"imperia.it":true,"im.it":true,"isernia.it":true,"is.it":true,"laquila.it":true,"aquila.it":true,"aq.it":true,"la-spezia.it":true,"laspezia.it":true,"sp.it":true,"latina.it":true,"lt.it":true,"lecce.it":true,"le.it":true,"lecco.it":true,"lc.it":true,"livorno.it":true,"li.it":true,"lodi.it":true,"lo.it":true,"lucca.it":true,"lu.it":true,"macerata.it":true,"mc.it":true,"mantova.it":true,"mn.it":true,"massa-carrara.it":true,"massacarrara.it":true,"carrara-massa.it":true,"carraramassa.it":true,"ms.it":true,"matera.it":true,"mt.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"vs.it":true,"messina.it":true,"me.it":true,"milano.it":true,"milan.it":true,"mi.it":true,"modena.it":true,"mo.it":true,"monza.it":true,"monza-brianza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"monza-e-della-brianza.it":true,"mb.it":true,"napoli.it":true,"naples.it":true,"na.it":true,"novara.it":true,"no.it":true,"nuoro.it":true,"nu.it":true,"oristano.it":true,"or.it":true,"padova.it":true,"padua.it":true,"pd.it":true,"palermo.it":true,"pa.it":true,"parma.it":true,"pr.it":true,"pavia.it":true,"pv.it":true,"perugia.it":true,"pg.it":true,"pescara.it":true,"pe.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"pu.it":true,"piacenza.it":true,"pc.it":true,"pisa.it":true,"pi.it":true,"pistoia.it":true,"pt.it":true,"pordenone.it":true,"pn.it":true,"potenza.it":true,"pz.it":true,"prato.it":true,"po.it":true,"ragusa.it":true,"rg.it":true,"ravenna.it":true,"ra.it":true,"reggio-calabria.it":true,"reggiocalabria.it":true,"rc.it":true,"reggio-emilia.it":true,"reggioemilia.it":true,"re.it":true,"rieti.it":true,"ri.it":true,"rimini.it":true,"rn.it":true,"roma.it":true,"rome.it":true,"rm.it":true,"rovigo.it":true,"ro.it":true,"salerno.it":true,"sa.it":true,"sassari.it":true,"ss.it":true,"savona.it":true,"sv.it":true,"siena.it":true,"si.it":true,"siracusa.it":true,"sr.it":true,"sondrio.it":true,"so.it":true,"taranto.it":true,"ta.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"ot.it":true,"teramo.it":true,"te.it":true,"terni.it":true,"tr.it":true,"torino.it":true,"turin.it":true,"to.it":true,"trapani.it":true,"tp.it":true,"trento.it":true,"trentino.it":true,"tn.it":true,"treviso.it":true,"tv.it":true,"trieste.it":true,"ts.it":true,"udine.it":true,"ud.it":true,"varese.it":true,"va.it":true,"venezia.it":true,"venice.it":true,"ve.it":true,"verbania.it":true,"vb.it":true,"vercelli.it":true,"vc.it":true,"verona.it":true,"vr.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vv.it":true,"vicenza.it":true,"vi.it":true,"viterbo.it":true,"vt.it":true,"je":true,"co.je":true,"org.je":true,"net.je":true,"sch.je":true,"gov.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"*.aichi.jp":true,"*.akita.jp":true,"*.aomori.jp":true,"*.chiba.jp":true,"*.ehime.jp":true,"*.fukui.jp":true,"*.fukuoka.jp":true,"*.fukushima.jp":true,"*.gifu.jp":true,"*.gunma.jp":true,"*.hiroshima.jp":true,"*.hokkaido.jp":true,"*.hyogo.jp":true,"*.ibaraki.jp":true,"*.ishikawa.jp":true,"*.iwate.jp":true,"*.kagawa.jp":true,"*.kagoshima.jp":true,"*.kanagawa.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.kochi.jp":true,"*.kumamoto.jp":true,"*.kyoto.jp":true,"*.mie.jp":true,"*.miyagi.jp":true,"*.miyazaki.jp":true,"*.nagano.jp":true,"*.nagasaki.jp":true,"*.nagoya.jp":true,"*.nara.jp":true,"*.niigata.jp":true,"*.oita.jp":true,"*.okayama.jp":true,"*.okinawa.jp":true,"*.osaka.jp":true,"*.saga.jp":true,"*.saitama.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.shiga.jp":true,"*.shimane.jp":true,"*.shizuoka.jp":true,"*.tochigi.jp":true,"*.tokushima.jp":true,"*.tokyo.jp":true,"*.tottori.jp":true,"*.toyama.jp":true,"*.wakayama.jp":true,"*.yamagata.jp":true,"*.yamaguchi.jp":true,"*.yamanashi.jp":true,"*.yokohama.jp":true,"metro.tokyo.jp":false,"pref.aichi.jp":false,"pref.akita.jp":false,"pref.aomori.jp":false,"pref.chiba.jp":false,"pref.ehime.jp":false,"pref.fukui.jp":false,"pref.fukuoka.jp":false,"pref.fukushima.jp":false,"pref.gifu.jp":false,"pref.gunma.jp":false,"pref.hiroshima.jp":false,"pref.hokkaido.jp":false,"pref.hyogo.jp":false,"pref.ibaraki.jp":false,"pref.ishikawa.jp":false,"pref.iwate.jp":false,"pref.kagawa.jp":false,"pref.kagoshima.jp":false,"pref.kanagawa.jp":false,"pref.kochi.jp":false,"pref.kumamoto.jp":false,"pref.kyoto.jp":false,"pref.mie.jp":false,"pref.miyagi.jp":false,"pref.miyazaki.jp":false,"pref.nagano.jp":false,"pref.nagasaki.jp":false,"pref.nara.jp":false,"pref.niigata.jp":false,"pref.oita.jp":false,"pref.okayama.jp":false,"pref.okinawa.jp":false,"pref.osaka.jp":false,"pref.saga.jp":false,"pref.saitama.jp":false,"pref.shiga.jp":false,"pref.shimane.jp":false,"pref.shizuoka.jp":false,"pref.tochigi.jp":false,"pref.tokushima.jp":false,"pref.tottori.jp":false,"pref.toyama.jp":false,"pref.wakayama.jp":false,"pref.yamagata.jp":false,"pref.yamaguchi.jp":false,"pref.yamanashi.jp":false,"city.chiba.jp":false,"city.fukuoka.jp":false,"city.hiroshima.jp":false,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.kyoto.jp":false,"city.nagoya.jp":false,"city.niigata.jp":false,"city.okayama.jp":false,"city.osaka.jp":false,"city.saitama.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.shizuoka.jp":false,"city.yokohama.jp":false,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"*.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ac.ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"net.ng":true,"org.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"*.nz":true,"*.om":true,"mediaphone.om":false,"nawrastelecom.om":false,"nawras.om":false,"omanmobile.om":false,"omanpost.om":false,"omantel.om":false,"rakpetroleum.om":false,"siemens.om":false,"songfest.om":false,"statecouncil.om":false,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"com.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"net.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"org.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"6bone.pl":true,"art.pl":true,"mbone.pl":true,"gov.pl":true,"uw.gov.pl":true,"um.gov.pl":true,"ug.gov.pl":true,"upow.gov.pl":true,"starostwo.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"po.gov.pl":true,"pa.gov.pl":true,"ngo.pl":true,"irc.pl":true,"usenet.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"siedlce.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"*.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"mosreg.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"pskov.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"sshn.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"si":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"*.sv":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"*.tr":true,"nic.tr":false,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"ac.tz":true,"co.tz":true,"go.tz":true,"mil.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"chernigov.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"ks.ua":true,"kv.ua":true,"lg.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lviv.ua":true,"mk.ua":true,"nikolaev.ua":true,"od.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rovno.ua":true,"rv.ua":true,"sebastopol.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vn.ua":true,"zaporizhzhe.ua":true,"zp.ua":true,"zhitomir.ua":true,"zt.ua":true,"co.ua":true,"pp.ua":true,"ug":true,"co.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"or.ug":true,"*.uk":true,"*.sch.uk":true,"bl.uk":false,"british-library.uk":false,"icnet.uk":false,"jet.uk":false,"mod.uk":false,"nel.uk":false,"nhs.uk":false,"nic.uk":false,"nls.uk":false,"national-library-scotland.uk":false,"parliament.uk":false,"police.uk":false,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.nd.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.sd.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wv.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wv.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"*.uy":true,"uz":true,"com.uz":true,"co.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"*.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--54b7fta0cc":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--mgb9awbf":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"*.za":true,"*.zm":true,"*.zw":true,"biz.at":true,"info.at":true,"priv.at":true,"co.ca":true,"ar.com":true,"br.com":true,"cn.com":true,"de.com":true,"eu.com":true,"gb.com":true,"gr.com":true,"hu.com":true,"jpn.com":true,"kr.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"uk.com":true,"us.com":true,"uy.com":true,"za.com":true,"gb.net":true,"jp.net":true,"se.net":true,"uk.net":true,"ae.org":true,"us.org":true,"com.de":true,"operaunite.com":true,"appspot.com":true,"iki.fi":true,"c.la":true,"za.net":true,"za.org":true,"co.nl":true,"co.no":true,"co.pl":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true}); + +// END of automatically generated file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt new file mode 100644 index 00000000..11dddd00 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt @@ -0,0 +1,278 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt new file mode 100644 index 00000000..97067e54 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json new file mode 100644 index 00000000..69e12ae2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json @@ -0,0 +1,77 @@ +{ + "name": "punycode", + "version": "1.2.3", + "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", + "homepage": "http://mths.be/punycode", + "main": "punycode.js", + "keywords": [ + "punycode", + "unicode", + "idn", + "idna", + "dns", + "url", + "domain" + ], + "licenses": [ + { + "type": "MIT", + "url": "http://mths.be/mit" + }, + { + "type": "GPL", + "url": "http://mths.be/gpl" + } + ], + "author": { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "http://mathiasbynens.be/" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "http://mathiasbynens.be/" + }, + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + } + ], + "bugs": { + "url": "https://github.com/bestiejs/punycode.js/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/bestiejs/punycode.js.git" + }, + "engines": [ + "node", + "rhino" + ], + "directories": { + "doc": "docs", + "test": "tests" + }, + "scripts": { + "test": "node tests/tests.js" + }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-uglify": "~0.2.2", + "grunt-shell": "~0.2.2", + "istanbul": "~0.1.37", + "qunit-clib": "~1.3.0", + "qunitjs": "~1.11.0", + "requirejs": "~2.1.6" + }, + "readme": "ERROR: No README data found!", + "_id": "punycode@1.2.3", + "dist": { + "shasum": "b4e304471082d783c73b3bafabf2fd9b6a486266" + }, + "_from": "punycode@>=0.2.0", + "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js new file mode 100644 index 00000000..41803ba4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js @@ -0,0 +1,508 @@ +/*! http://mths.be/punycode v1.2.3 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports; + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + while (length--) { + array[length] = fn(array[length]); + } + return array; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings. + * @private + * @param {String} domain The domain name. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + return map(string.split(regexSeparators), fn).join('.'); + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * http://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + length, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols to a Punycode string of ASCII-only + * symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name to Unicode. Only the + * Punycoded parts of the domain name will be converted, i.e. it doesn't + * matter if you call it on a string that has already been converted to + * Unicode. + * @memberOf punycode + * @param {String} domain The Punycode domain name to convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(domain) { + return mapDomain(domain, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name to Punycode. Only the + * non-ASCII parts of the domain name will be converted, i.e. it doesn't + * matter if you call it with a domain that's already in ASCII. + * @memberOf punycode + * @param {String} domain The domain name to convert, as a Unicode string. + * @returns {String} The Punycode representation of the given domain name. + */ + function toASCII(domain) { + return mapDomain(domain, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.2.3', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return punycode; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js new file mode 100644 index 00000000..ac5d914a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js @@ -0,0 +1,2 @@ +/*! http://mths.be/punycode v1.2.3 by @mathias */ +(function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(55296|1023&o>>>10),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*y>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?C:s>=m+y?y:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?C:p>=l+y?y:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,C=1,y=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-C,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.3",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g})(this); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt new file mode 100644 index 00000000..a7501f98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright 2011-2013 John-David Dalton + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md new file mode 100644 index 00000000..fbddce91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md @@ -0,0 +1,35 @@ +# Docdown v1.0.0 + +A simple JSDoc to Markdown documentation generator. + +## Documentation + +The documentation for Docdown can be viewed here: [/doc/README.md](https://github.com/jdalton/docdown/blob/master/doc/README.md#readme) + +For a list of upcoming features, check out our [roadmap](https://github.com/jdalton/docdown/wiki/Roadmap). + +## Installation and usage + +Usage example: + +```php +require("docdown.php"); + +// generate Markdown +$markdown = docdown(array( + "path" => $filepath, + "url" => "https://github.com/username/project/blob/master/my.js" +)); +``` + +## Author + +| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | +|---| +| [John-David Dalton](http://allyoucanleet.com/) | + +## Contributors + +| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md new file mode 100644 index 00000000..459d36ab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md @@ -0,0 +1,69 @@ +# Docdown v1.0.0 + + + + + + +##
`docdown` +* [`docdown`](#docdown$optionsarray) + + + + + + + + + + + + +## `docdown` + + + +### `docdown([$options=array()])` +# [Ⓢ](https://github.com/jdalton/docdown/blob/master/docdown.php#L34 "View in source") [Ⓣ][1] + +Generates Markdown from JSDoc entries in a given file. + +#### Arguments +1. `[$options=array()]` *(Array)*: The options array. + +#### Returns +*(String)*: The generated Markdown. + +#### Example +```php +// specify a file path +$markdown = docdown(array( + // path to js file + 'path' => $filepath, + // url used to reference line numbers in code + 'url' => 'https://github.com/username/project/blob/master/my.js' +)); + +// or pass raw js +$markdown = docdown(array( + // raw JavaScript source + 'source' => $rawJS, + // documentation title + 'title' => 'My API Documentation', + // url used to reference line numbers in code + 'url' => 'https://github.com/username/project/blob/master/my.js' +)); +``` + +* * * + + + + + + + + + + + [1]: #docdown "Jump back to the TOC." \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php new file mode 100644 index 00000000..eca8d145 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php @@ -0,0 +1,35 @@ + '../' . $file, + 'title' => 'Docdown v1.0.0', + 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php' + )); + + // save to a .md file + file_put_contents($output . '.md', $markdown); + + // print + header('Content-Type: text/plain;charset=utf-8'); + echo $markdown . PHP_EOL; + +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php new file mode 100644 index 00000000..4a786d75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php @@ -0,0 +1,38 @@ + + * Available under MIT license + */ +require(dirname(__FILE__) . '/src/DocDown/Generator.php'); + +/** + * Generates Markdown from JSDoc entries in a given file. + * + * @param {Array} [$options=array()] The options array. + * @returns {String} The generated Markdown. + * @example + * + * // specify a file path + * $markdown = docdown(array( + * // path to js file + * 'path' => $filepath, + * // url used to reference line numbers in code + * 'url' => 'https://github.com/username/project/blob/master/my.js' + * )); + * + * // or pass raw js + * $markdown = docdown(array( + * // raw JavaScript source + * 'source' => $rawJS, + * // documentation title + * 'title' => 'My API Documentation', + * // url used to reference line numbers in code + * 'url' => 'https://github.com/username/project/blob/master/my.js' + * )); + */ +function docdown( $options = array() ) { + $gen = new Generator($options); + return $gen->generate(); +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php new file mode 100644 index 00000000..0a7c552e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php @@ -0,0 +1,226 @@ +owner = $owner; + $this->_name = $name; + $this->_call = $owner->getCall(); + $this->_category = $owner->getCategory(); + $this->_desc = $owner->getDesc(); + $this->_example = $owner->getExample(); + $this->_isCtor = $owner->isCtor(); + $this->_isLicense = $owner->isLicense(); + $this->_isPlugin = $owner->isPlugin(); + $this->_isPrivate = $owner->isPrivate(); + $this->_isStatic = $owner->isStatic(); + $this->_lineNumber = $owner->getLineNumber(); + $this->_members = $owner->getMembers(); + $this->_params = $owner->getParams(); + $this->_returns = $owner->getReturns(); + $this->_type = $owner->getType(); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the entry's `alias` objects. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `alias` objects. + */ + public function getAliases( $index = null ) { + $result = array(); + return $index !== null + ? @$result[$index] + : $result; + } + + /** + * Extracts the function call from the owner entry. + * + * @memberOf Alias + * @returns {String} The function call. + */ + public function getCall() { + return $this->_call; + } + + /** + * Extracts the owner entry's `category` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `category` data. + */ + public function getCategory() { + return $this->_category; + } + + /** + * Extracts the owner entry's description. + * + * @memberOf Alias + * @returns {String} The owner entry's description. + */ + public function getDesc() { + return $this->_desc; + } + + /** + * Extracts the owner entry's `example` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `example` data. + */ + public function getExample() { + return $this->_example; + } + + /** + * Checks if the entry is an alias. + * + * @memberOf Alias + * @returns {Boolean} Returns `true`. + */ + public function isAlias() { + return true; + } + + /** + * Checks if the owner entry is a constructor. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if a constructor, else `false`. + */ + public function isCtor() { + return $this->_isCtor; + } + + /** + * Checks if the owner entry is a license. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if a license, else `false`. + */ + public function isLicense() { + return $this->_isLicense; + } + + /** + * Checks if the owner entry *is* assigned to a prototype. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. + */ + public function isPlugin() { + return $this->_isPlugin; + } + + /** + * Checks if the owner entry is private. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if private, else `false`. + */ + public function isPrivate() { + return $this->_isPrivate; + } + + /** + * Checks if the owner entry is *not* assigned to a prototype. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. + */ + public function isStatic() { + return $this->_isStatic; + } + + /** + * Resolves the owner entry's line number. + * + * @memberOf Alias + * @returns {Number} The owner entry's line number. + */ + public function getLineNumber() { + return $this->_lineNumber; + } + + /** + * Extracts the owner entry's `member` data. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The owner entry's `member` data. + */ + public function getMembers( $index = null ) { + return $index !== null + ? @$this->_members[$index] + : $this->_members; + } + + /** + * Extracts the owner entry's `name` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `name` data. + */ + public function getName() { + return $this->_name; + } + + /** + * Extracts the owner entry's `param` data. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array} The owner entry's `param` data. + */ + public function getParams( $index = null ) { + return $index !== null + ? @$this->_params[$index] + : $this->_params; + } + + /** + * Extracts the owner entry's `returns` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `returns` data. + */ + public function getReturns() { + return $this->_returns; + } + + /** + * Extracts the owner entry's `type` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `type` data. + */ + public function getType() { + return $this->_type; + } +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php new file mode 100644 index 00000000..a973d9a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php @@ -0,0 +1,442 @@ +entry = $entry; + $this->lang = $lang; + $this->source = str_replace(PHP_EOL, "\n", $source); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the documentation entries from source code. + * + * @static + * @memberOf Entry + * @param {String} $source The source code. + * @returns {Array} The array of entries. + */ + public static function getEntries( $source ) { + preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result); + return array_pop($result); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if the entry is a function reference. + * + * @private + * @memberOf Entry + * @returns {Boolean} Returns `true` if the entry is a function reference, else `false`. + */ + private function isFunction() { + if (!isset($this->_isFunction)) { + $this->_isFunction = !!( + $this->isCtor() || + count($this->getParams()) || + count($this->getReturns()) || + preg_match('/\*[\t ]*@function\b/', $this->entry) + ); + } + return $this->_isFunction; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the entry's `alias` objects. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `alias` objects. + */ + public function getAliases( $index = null ) { + if (!isset($this->_aliases)) { + preg_match('#\*[\t ]*@alias\s+(.+)#', $this->entry, $result); + + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + $result = preg_split('/,\s*/', $result); + natsort($result); + + foreach ($result as $resultIndex => $value) { + $result[$resultIndex] = new Alias($value, $this); + } + } + $this->_aliases = $result; + } + return $index !== null + ? @$this->_aliases[$index] + : $this->_aliases; + } + + /** + * Extracts the function call from the entry. + * + * @memberOf Entry + * @returns {String} The function call. + */ + public function getCall() { + if (isset($this->_call)) { + return $this->_call; + } + + preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result); + if ($result = array_pop($result)) { + $result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'"))); + } + // resolve name + // avoid $this->getName() because it calls $this->getCall() + preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $name); + if (count($name)) { + $name = trim($name[1]); + } else { + $name = $result; + } + // compile function call syntax + if ($this->isFunction()) { + // compose parts + $result = array($result); + $params = $this->getParams(); + foreach ($params as $param) { + $result[] = $param[1]; + } + // format + $result = $name .'('. implode(array_slice($result, 1), ', ') .')'; + $result = str_replace(', [', ' [, ', str_replace('], [', ', ', $result)); + } + + $this->_call = $result ? $result : $name; + return $this->_call; + } + + /** + * Extracts the entry's `category` data. + * + * @memberOf Entry + * @returns {String} The entry's `category` data. + */ + public function getCategory() { + if (isset($this->_category)) { + return $this->_category; + } + + preg_match('#\*[\t ]*@category\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = $this->getType() == 'Function' ? 'Methods' : 'Properties'; + } + $this->_category = $result; + return $result; + } + + /** + * Extracts the entry's description. + * + * @memberOf Entry + * @returns {String} The entry's description. + */ + public function getDesc() { + if (isset($this->_desc)) { + return $this->_desc; + } + + preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $type = $this->getType(); + $result = preg_replace('/:\n[\t ]*\*[\t ]*/', ":
\n", $result[1]); + $result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result); + $result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result); + $result = trim($result); + $result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; + } + $this->_desc = $result; + return $result; + } + + /** + * Extracts the entry's `example` data. + * + * @memberOf Entry + * @returns {String} The entry's `example` data. + */ + public function getExample() { + if (isset($this->_example)) { + return $this->_example; + } + + preg_match('#\*[\t ]*@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', "\n", $result[1])); + $result = '```' . $this->lang . "\n" . $result . "\n```"; + } + $this->_example = $result; + return $result; + } + + /** + * Checks if the entry is an alias. + * + * @memberOf Entry + * @returns {Boolean} Returns `false`. + */ + public function isAlias() { + return false; + } + + /** + * Checks if the entry is a constructor. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if a constructor, else `false`. + */ + public function isCtor() { + if (!isset($this->_isCtor)) { + $this->_isCtor = !!preg_match('/\*[\t ]*@constructor\b/', $this->entry); + } + return $this->_isCtor; + } + + /** + * Checks if the entry is a license. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if a license, else `false`. + */ + public function isLicense() { + if (!isset($this->_isLicense)) { + $this->_isLicense = !!preg_match('/\*[\t ]*@license\b/', $this->entry); + } + return $this->_isLicense; + } + + /** + * Checks if the entry *is* assigned to a prototype. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. + */ + public function isPlugin() { + if (!isset($this->_isPlugin)) { + $this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic(); + } + return $this->_isPlugin; + } + + /** + * Checks if the entry is private. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if private, else `false`. + */ + public function isPrivate() { + if (!isset($this->_isPrivate)) { + $this->_isPrivate = $this->isLicense() || !!preg_match('/\*[\t ]*@private\b/', $this->entry) || !preg_match('/\*[\t ]*@[a-z]+\b/', $this->entry); + } + return $this->_isPrivate; + } + + /** + * Checks if the entry is *not* assigned to a prototype. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. + */ + public function isStatic() { + if (isset($this->_isStatic)) { + return $this->_isStatic; + } + + $public = !$this->isPrivate(); + $result = $public && !!preg_match('/\*[\t ]*@static\b/', $this->entry); + + // set in cases where it isn't explicitly stated + if ($public && !$result) { + if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) { + foreach (Entry::getEntries($this->source) as $entry) { + $entry = new Entry($entry, $this->source); + if ($entry->getName() == $parent) { + $result = !$entry->isCtor(); + break; + } + } + } else { + $result = true; + } + } + $this->_isStatic = $result; + return $result; + } + + /** + * Resolves the entry's line number. + * + * @memberOf Entry + * @returns {Number} The entry's line number. + */ + public function getLineNumber() { + if (!isset($this->_lineNumber)) { + preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines); + $this->_lineNumber = count(array_pop($lines)) + 1; + } + return $this->_lineNumber; + } + + /** + * Extracts the entry's `member` data. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `member` data. + */ + public function getMembers( $index = null ) { + if (!isset($this->_members)) { + preg_match('#\*[\t ]*@member(?:Of)?\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + $result = preg_split('/,\s*/', $result); + natsort($result); + } + $this->_members = $result; + } + return $index !== null + ? @$this->_members[$index] + : $this->_members; + } + + /** + * Extracts the entry's `name` data. + * + * @memberOf Entry + * @returns {String} The entry's `name` data. + */ + public function getName() { + if (isset($this->_name)) { + return $this->_name; + } + + preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = array_shift(explode('(', $this->getCall())); + } + $this->_name = $result; + return $result; + } + + /** + * Extracts the entry's `param` data. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array} The entry's `param` data. + */ + public function getParams( $index = null ) { + if (!isset($this->_params)) { + preg_match_all('#\*[\t ]*@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result); + if (count($result = array_filter(array_slice($result, 1)))) { + // repurpose array + foreach ($result as $param) { + foreach ($param as $key => $value) { + if (!is_array($result[0][$key])) { + $result[0][$key] = array(); + } + $result[0][$key][] = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]*/', ' ', $value)); + } + } + $result = $result[0]; + } + $this->_params = $result; + } + return $index !== null + ? @$this->_params[$index] + : $this->_params; + } + + /** + * Extracts the entry's `returns` data. + * + * @memberOf Entry + * @returns {String} The entry's `returns` data. + */ + public function getReturns() { + if (isset($this->_returns)) { + return $this->_returns; + } + + preg_match('#\*[\t ]*@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $result = array_map('trim', array_slice($result, 1)); + $result[0] = str_replace('|', ', ', $result[0]); + $result[1] = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]); + } + $this->_returns = $result; + return $result; + } + + /** + * Extracts the entry's `type` data. + * + * @memberOf Entry + * @returns {String} The entry's `type` data. + */ + public function getType() { + if (isset($this->_type)) { + return $this->_type; + } + + preg_match('#\*[\t ]*@type\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = $this->isFunction() ? 'Function' : 'Unknown'; + } + $this->_type = $result; + return $result; + } +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php new file mode 100644 index 00000000..5dc2583f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php @@ -0,0 +1,563 @@ +\n"; + + /** + * An array of JSDoc entries. + * + * @memberOf Generator + * @type Array + */ + public $entries = array(); + + /** + * The HTML for the open tag. + * + * @static + * @memberOf Generator + * @type String + */ + public $openTag = "\n\n"; + + /** + * An options array used to configure the generator. + * + * @memberOf Generator + * @type Array + */ + public $options = array(); + + /** + * The file's source code. + * + * @memberOf Generator + * @type String + */ + public $source = ''; + + /*--------------------------------------------------------------------------*/ + + /** + * The Generator constructor. + * + * @constructor + * @param {String} $source The source code to parse. + * @param {Array} $options The options array. + */ + public function __construct( $source, $options = array() ) { + // juggle arguments + if (is_array($source)) { + $options = $source; + } else { + $options['source'] = $source; + } + if (isset($options['source']) && realpath($options['source'])) { + $options['path'] = $options['source']; + } + if (isset($options['path'])) { + preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext); + $options['source'] = file_get_contents($options['path']); + $ext = array_pop($ext); + + if (!isset($options['lang']) && $ext) { + $options['lang'] = $ext; + } + if (!isset($options['title'])) { + $options['title'] = ucfirst(basename($options['path'])) . ' API documentation'; + } + } + if (!isset($options['lang'])) { + $options['lang'] = 'js'; + } + if (!isset($options['toc'])) { + $options['toc'] = 'properties'; + } + + $this->options = $options; + $this->source = str_replace(PHP_EOL, "\n", $options['source']); + $this->entries = Entry::getEntries($this->source); + + foreach ($this->entries as $index => $value) { + $this->entries[$index] = new Entry($value, $this->source, $options['lang']); + } + } + + /*--------------------------------------------------------------------------*/ + + /** + * Performs common string formatting operations. + * + * @private + * @static + * @memberOf Generator + * @param {String} $string The string to format. + * @returns {String} The formatted string. + */ + private static function format( $string ) { + $counter = 0; + + // tokenize inline code snippets + preg_match_all('/`[^`]+`/', $string, $tokenized); + $tokenized = $tokenized[0]; + foreach ($tokenized as $snippet) { + $string = str_replace($snippet, '__token' . ($counter++) .'__', $string); + } + + // italicize parentheses + $string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string); + + // mark numbers as inline code + $string = preg_replace('/[\t ](-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string); + + // detokenize inline code snippets + $counter = 0; + foreach ($tokenized as $snippet) { + $string = str_replace('__token' . ($counter++) . '__', $snippet, $string); + } + + return trim($string); + } + + /** + * Modify a string by replacing named tokens with matching assoc. array values. + * + * @private + * @static + * @memberOf Generator + * @param {String} $string The string to modify. + * @param {Array|Object} $object The template object. + * @returns {String} The modified string. + */ + private static function interpolate( $string, $object ) { + preg_match_all('/#\{([^}]+)\}/', $string, $tokens); + $tokens = array_unique(array_pop($tokens)); + + foreach ($tokens as $token) { + $pattern = '/#\{' . $token . '\}/'; + $replacement = ''; + + if (is_object($object)) { + preg_match('/\(([^)]+?)\)$/', $token, $args); + $args = preg_split('/,\s*/', array_pop($args)); + $method = 'get' . ucfirst(str_replace('/\([^)]+?\)$/', '', $token)); + + if (method_exists($object, $method)) { + $replacement = (string) call_user_func_array(array($object, $method), $args); + } else if (isset($object->{$token})) { + $replacement = (string) $object->{$token}; + } + } else if (isset($object[$token])) { + $replacement = (string) $object[$token]; + } + $string = preg_replace($pattern, trim($replacement), $string); + } + return Generator::format($string); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Adds the given `$entries` to the `$result` array. + * + * @private + * @memberOf Generator + * @param {Array} $result The result array to modify. + * @param {Array} $entries The entries to add to the `$result`. + */ + private function addEntries( &$result, $entries ) { + foreach ($entries as $entry) { + // skip aliases + if ($entry->isAlias()) { + continue; + } + // name and description + array_push( + $result, + $this->openTag, + Generator::interpolate("### `#{member}#{separator}#{call}`\n# [Ⓢ](#{href} \"View in source\") [Ⓣ][1]\n\n#{desc}", $entry) + ); + + // @alias + if (count($aliases = $entry->getAliases())) { + array_push($result, '', '#### Aliases'); + foreach ($aliases as $index => $alias) { + $aliases[$index] = $alias->getName(); + } + $result[] = '*' . implode(', ', $aliases) . '*'; + } + // @param + if (count($params = $entry->getParams())) { + array_push($result, '', '#### Arguments'); + foreach ($params as $index => $param) { + $result[] = Generator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array( + 'desc' => $param[2], + 'name' => $param[1], + 'num' => $index + 1, + 'type' => $param[0] + )); + } + } + // @returns + if (count($returns = $entry->getReturns())) { + array_push( + $result, '', + '#### Returns', + Generator::interpolate('(#{type}): #{desc}', array('desc' => $returns[1], 'type' => $returns[0])) + ); + } + // @example + if ($example = $entry->getExample()) { + array_push($result, '', '#### Example', $example); + } + array_push($result, "\n* * *", $this->closeTag); + } + } + + /** + * Resolves the entry's hash used to navigate the documentation. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @param {String} $member The name of the member. + * @returns {String} The url hash. + */ + private function getHash( $entry, $member = '' ) { + $entry = is_numeric($entry) ? $this->entries[$entry] : $entry; + $member = !$member ? $entry->getMembers(0) : $member; + $result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall(); + $result = preg_replace('/\(\[|\[\]/', '', $result); + $result = preg_replace('/[ =|\'"{}.()\]]/', '', $result); + $result = preg_replace('/[[#,]/', '-', $result); + return strtolower($result); + } + + /** + * Resolves the entry's url for the specific line number. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @returns {String} The url. + */ + private function getLineUrl( $entry ) { + $entry = is_numeric($entry) ? $this->entries($entry) : $entry; + return $this->options['url'] . '#L' . $entry->getLineNumber(); + } + + /** + * Extracts the character used to separate the entry's name from its member. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @returns {String} The separator. + */ + private function getSeparator( $entry ) { + $entry = is_numeric($entry) ? $this->entries($entry) : $entry; + return $entry->isPlugin() ? '.prototype.' : '.'; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Generates Markdown from JSDoc entries. + * + * @memberOf Generator + * @returns {String} The rendered Markdown. + */ + public function generate() { + $api = array(); + $byCategory = $this->options['toc'] == 'categories'; + $categories = array(); + $closeTag = $this->closeTag; + $compiling = false; + $openTag = $this->openTag; + $result = array('# ' . $this->options['title']); + $toc = 'toc'; + + // initialize $api array + foreach ($this->entries as $entry) { + // skip invalid or private entries + $name = $entry->getName(); + if (!$name || $entry->isPrivate()) { + continue; + } + + $members = $entry->getMembers(); + $members = count($members) ? $members : array(''); + + foreach ($members as $member) { + // create api category arrays + if ($member && !isset($api[$member])) { + // create temporary entry to be replaced later + $api[$member] = new stdClass; + $api[$member]->static = array(); + $api[$member]->plugin = array(); + } + + // append entry to api member + if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' && + !preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) { + + // assign the real entry, replacing the temporary entry if it exist + $member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name; + $entry->static = @$api[$member] ? $api[$member]->static : array(); + $entry->plugin = @$api[$member] ? $api[$member]->plugin : array(); + + $api[$member] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->static[] = $alias; + } + } + else if ($entry->isStatic()) { + $api[$member]->static[] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->static[] = $alias; + } + } + else if (!$entry->isCtor()) { + $api[$member]->plugin[] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->plugin[] = $alias; + } + } + } + } + + // add properties to each entry + foreach ($api as $entry) { + $entry->hash = $this->getHash($entry); + $entry->href = $this->getLineUrl($entry); + + $member = $entry->getMembers(0); + $member = ($member ? $member . ($entry->isPlugin() ? '.prototype.' : '.') : '') . $entry->getName(); + $entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member); + + // add properties to static and plugin sub-entries + foreach (array('static', 'plugin') as $kind) { + foreach ($entry->{$kind} as $subentry) { + $subentry->hash = $this->getHash($subentry); + $subentry->href = $this->getLineUrl($subentry); + $subentry->member = $member; + $subentry->separator = $this->getSeparator($subentry); + } + } + } + + /*------------------------------------------------------------------------*/ + + // custom sort for root level entries + // TODO: see how well it handles deeper namespace traversal + function sortCompare($a, $b) { + $score = array( 'a' => 0, 'b' => 0); + foreach (array( 'a' => $a, 'b' => $b) as $key => $value) { + // capitalized properties are last + if (preg_match('/[#.][A-Z]/', $value)) { + $score[$key] = 0; + } + // lowercase prototype properties are next to last + else if (preg_match('/#[a-z]/', $value)) { + $score[$key] = 1; + } + // lowercase static properties next to first + else if (preg_match('/\.[a-z]/', $value)) { + $score[$key] = 2; + } + // root properties are first + else if (preg_match('/^[^#.]+$/', $value)) { + $score[$key] = 3; + } + } + $score = $score['b'] - $score['a']; + return $score ? $score : strcasecmp($a, $b); + } + + uksort($api, 'sortCompare'); + + // sort static and plugin sub-entries + foreach ($api as $entry) { + foreach (array('static', 'plugin') as $kind) { + $sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() ); + foreach ($entry->{$kind} as $subentry) { + $name = $subentry->getName(); + // functions w/o ALL-CAPs names are last + $sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name); + // ALL-CAPs properties first + $sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name); + // lowercase alphanumeric sort + $sortBy['c'][] = strtolower($name); + } + array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind}); + } + } + + /*------------------------------------------------------------------------*/ + + // add categories + foreach ($api as $entry) { + $categories[$entry->getCategory()][] = $entry; + foreach (array('static', 'plugin') as $kind) { + foreach ($entry->{$kind} as $subentry) { + $categories[$subentry->getCategory()][] = $subentry; + } + } + } + + // sort categories + ksort($categories); + + foreach(array('Methods', 'Properties') as $category) { + if (isset($categories[$category])) { + $entries = $categories[$category]; + unset($categories[$category]); + $categories[$category] = $entries; + } + } + + /*------------------------------------------------------------------------*/ + + // compile TOC + $result[] = $openTag; + + // compile TOC by categories + if ($byCategory) { + foreach ($categories as $category => $entries) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + // assign TOC hash + if (count($result) == 2) { + $toc = $category; + } + // add category + array_push( + $result, + $openTag, '## ' . (count($result) == 2 ? '' : '') . '`' . $category . '`' + ); + // add entries + foreach ($entries as $entry) { + $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry); + } + } + } + // compile TOC by namespace + else { + foreach ($api as $entry) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + $member = $entry->member . $entry->getName(); + + // assign TOC hash + if (count($result) == 2) { + $toc = $member; + } + // add root entry + array_push( + $result, + $openTag, '## ' . (count($result) == 2 ? '' : '') . '`' . $member . '`', + Generator::interpolate('* [`' . $member . '`](##{hash})', $entry) + ); + + // add static and plugin sub-entries + foreach (array('static', 'plugin') as $kind) { + if ($kind == 'plugin' && count($entry->plugin)) { + array_push( + $result, + $closeTag, + $openTag, + '## `' . $member . ($entry->isCtor() ? '.prototype`' : '`') + ); + } + foreach ($entry->{$kind} as $subentry) { + $subentry->member = $member; + $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry); + } + } + } + } + + array_push($result, $closeTag, $closeTag); + + /*------------------------------------------------------------------------*/ + + // compile content + $compiling = false; + $result[] = $openTag; + + if ($byCategory) { + foreach ($categories as $category => $entries) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + if ($category != 'Methods' && $category != 'Properties') { + $category = '“' . $category . '” Methods'; + } + array_push($result, $openTag, '## `' . $category . '`'); + $this->addEntries($result, $entries); + } + } + else { + foreach ($api as $entry) { + // skip aliases + if ($entry->isAlias()) { + continue; + } + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + // add root entry name + $member = $entry->member . $entry->getName(); + array_push($result, $openTag, '## `' . $member . '`'); + + foreach (array($entry, 'static', 'plugin') as $kind) { + $subentries = is_string($kind) ? $entry->{$kind} : array($kind); + + // add sub-entry name + if ($kind != 'static' && $entry->getType() != 'Object' && + count($subentries) && $subentries[0] != $kind) { + if ($kind == 'plugin') { + $result[] = $closeTag; + } + array_push( + $result, + $openTag, + '## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`') + ); + } + $this->addEntries($result, $subentries); + } + } + } + + // close tags add TOC link reference + array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."'); + + // cleanup whitespace + return trim(preg_replace('/[\t ]+\n/', "\n", join($result, "\n"))); + } +} +?> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json new file mode 100644 index 00000000..167c7c6a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json @@ -0,0 +1,50 @@ +{ + "author": { + "name": "Jeremy Stashewsky", + "email": "jeremy@goinstant.com", + "url": "https://github.com/stash" + }, + "name": "tough-cookie", + "description": "RFC6265 Cookies and Cookie Jar for node.js", + "keywords": [ + "HTTP", + "cookie", + "cookies", + "set-cookie", + "cookiejar", + "jar", + "RFC6265", + "RFC2965" + ], + "version": "0.9.15", + "homepage": "https://github.com/goinstant/node-cookie", + "repository": { + "type": "git", + "url": "git://github.com/goinstant/node-cookie.git" + }, + "bugs": { + "url": "https://github.com/goinstant/node-cookie/issues" + }, + "main": "./lib/cookie", + "scripts": { + "test": "vows test.js" + }, + "engines": { + "node": ">=0.4.12" + }, + "dependencies": { + "punycode": ">=0.2.0" + }, + "devDependencies": { + "vows": ">=0.6.0", + "async": ">=0.1.12" + }, + "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n", + "readmeFilename": "README.md", + "_id": "tough-cookie@0.9.15", + "dist": { + "shasum": "0fbda7fb5b5bca17e4f97909a0818dc8c2c12588" + }, + "_from": "tough-cookie@~0.9.15", + "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt new file mode 100644 index 00000000..2c201312 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt @@ -0,0 +1,5229 @@ +// ***** BEGIN LICENSE BLOCK ***** +// Version: MPL 1.1/GPL 2.0/LGPL 2.1 +// +// The contents of this file are subject to the Mozilla Public License Version +// 1.1 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the +// License. +// +// The Original Code is the Public Suffix List. +// +// The Initial Developer of the Original Code is +// Jo Hermans . +// Portions created by the Initial Developer are Copyright (C) 2007 +// the Initial Developer. All Rights Reserved. +// +// Contributor(s): +// Ruben Arakelyan +// Gervase Markham +// Pamela Greene +// David Triendl +// Jothan Frakes +// The kind representatives of many TLD registries +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** + +// ===BEGIN ICANN DOMAINS=== + +// ac : http://en.wikipedia.org/wiki/.ac +ac +com.ac +edu.ac +gov.ac +net.ac +mil.ac +org.ac + +// ad : http://en.wikipedia.org/wiki/.ad +ad +nom.ad + +// ae : http://en.wikipedia.org/wiki/.ae +// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php +ae +co.ae +net.ae +org.ae +sch.ae +ac.ae +gov.ae +mil.ae + +// aero : see http://www.information.aero/index.php?id=66 +aero +accident-investigation.aero +accident-prevention.aero +aerobatic.aero +aeroclub.aero +aerodrome.aero +agents.aero +aircraft.aero +airline.aero +airport.aero +air-surveillance.aero +airtraffic.aero +air-traffic-control.aero +ambulance.aero +amusement.aero +association.aero +author.aero +ballooning.aero +broker.aero +caa.aero +cargo.aero +catering.aero +certification.aero +championship.aero +charter.aero +civilaviation.aero +club.aero +conference.aero +consultant.aero +consulting.aero +control.aero +council.aero +crew.aero +design.aero +dgca.aero +educator.aero +emergency.aero +engine.aero +engineer.aero +entertainment.aero +equipment.aero +exchange.aero +express.aero +federation.aero +flight.aero +freight.aero +fuel.aero +gliding.aero +government.aero +groundhandling.aero +group.aero +hanggliding.aero +homebuilt.aero +insurance.aero +journal.aero +journalist.aero +leasing.aero +logistics.aero +magazine.aero +maintenance.aero +marketplace.aero +media.aero +microlight.aero +modelling.aero +navigation.aero +parachuting.aero +paragliding.aero +passenger-association.aero +pilot.aero +press.aero +production.aero +recreation.aero +repbody.aero +res.aero +research.aero +rotorcraft.aero +safety.aero +scientist.aero +services.aero +show.aero +skydiving.aero +software.aero +student.aero +taxi.aero +trader.aero +trading.aero +trainer.aero +union.aero +workinggroup.aero +works.aero + +// af : http://www.nic.af/help.jsp +af +gov.af +com.af +org.af +net.af +edu.af + +// ag : http://www.nic.ag/prices.htm +ag +com.ag +org.ag +net.ag +co.ag +nom.ag + +// ai : http://nic.com.ai/ +ai +off.ai +com.ai +net.ai +org.ai + +// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 +al +com.al +edu.al +gov.al +mil.al +net.al +org.al + +// am : http://en.wikipedia.org/wiki/.am +am + +// an : http://www.una.an/an_domreg/default.asp +an +com.an +net.an +org.an +edu.an + +// ao : http://en.wikipedia.org/wiki/.ao +// http://www.dns.ao/REGISTR.DOC +ao +ed.ao +gv.ao +og.ao +co.ao +pb.ao +it.ao + +// aq : http://en.wikipedia.org/wiki/.aq +aq + +// ar : http://en.wikipedia.org/wiki/.ar +*.ar +!congresodelalengua3.ar +!educ.ar +!gobiernoelectronico.ar +!mecon.ar +!nacion.ar +!nic.ar +!promocion.ar +!retina.ar +!uba.ar + +// arpa : http://en.wikipedia.org/wiki/.arpa +// Confirmed by registry 2008-06-18 +e164.arpa +in-addr.arpa +ip6.arpa +iris.arpa +uri.arpa +urn.arpa + +// as : http://en.wikipedia.org/wiki/.as +as +gov.as + +// asia : http://en.wikipedia.org/wiki/.asia +asia + +// at : http://en.wikipedia.org/wiki/.at +// Confirmed by registry 2008-06-17 +at +ac.at +co.at +gv.at +or.at + +// au : http://en.wikipedia.org/wiki/.au +// http://www.auda.org.au/ +// 2LDs +com.au +net.au +org.au +edu.au +gov.au +csiro.au +asn.au +id.au +// Historic 2LDs (closed to new registration, but sites still exist) +info.au +conf.au +oz.au +// CGDNs - http://www.cgdn.org.au/ +act.au +nsw.au +nt.au +qld.au +sa.au +tas.au +vic.au +wa.au +// 3LDs +act.edu.au +nsw.edu.au +nt.edu.au +qld.edu.au +sa.edu.au +tas.edu.au +vic.edu.au +wa.edu.au +act.gov.au +// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04 +// nsw.gov.au +nt.gov.au +qld.gov.au +sa.gov.au +tas.gov.au +vic.gov.au +wa.gov.au + +// aw : http://en.wikipedia.org/wiki/.aw +aw +com.aw + +// ax : http://en.wikipedia.org/wiki/.ax +ax + +// az : http://en.wikipedia.org/wiki/.az +az +com.az +net.az +int.az +gov.az +org.az +edu.az +info.az +pp.az +mil.az +name.az +pro.az +biz.az + +// ba : http://en.wikipedia.org/wiki/.ba +ba +org.ba +net.ba +edu.ba +gov.ba +mil.ba +unsa.ba +unbi.ba +co.ba +com.ba +rs.ba + +// bb : http://en.wikipedia.org/wiki/.bb +bb +biz.bb +com.bb +edu.bb +gov.bb +info.bb +net.bb +org.bb +store.bb + +// bd : http://en.wikipedia.org/wiki/.bd +*.bd + +// be : http://en.wikipedia.org/wiki/.be +// Confirmed by registry 2008-06-08 +be +ac.be + +// bf : http://en.wikipedia.org/wiki/.bf +bf +gov.bf + +// bg : http://en.wikipedia.org/wiki/.bg +// https://www.register.bg/user/static/rules/en/index.html +bg +a.bg +b.bg +c.bg +d.bg +e.bg +f.bg +g.bg +h.bg +i.bg +j.bg +k.bg +l.bg +m.bg +n.bg +o.bg +p.bg +q.bg +r.bg +s.bg +t.bg +u.bg +v.bg +w.bg +x.bg +y.bg +z.bg +0.bg +1.bg +2.bg +3.bg +4.bg +5.bg +6.bg +7.bg +8.bg +9.bg + +// bh : http://en.wikipedia.org/wiki/.bh +bh +com.bh +edu.bh +net.bh +org.bh +gov.bh + +// bi : http://en.wikipedia.org/wiki/.bi +// http://whois.nic.bi/ +bi +co.bi +com.bi +edu.bi +or.bi +org.bi + +// biz : http://en.wikipedia.org/wiki/.biz +biz + +// bj : http://en.wikipedia.org/wiki/.bj +bj +asso.bj +barreau.bj +gouv.bj + +// bm : http://www.bermudanic.bm/dnr-text.txt +bm +com.bm +edu.bm +gov.bm +net.bm +org.bm + +// bn : http://en.wikipedia.org/wiki/.bn +*.bn + +// bo : http://www.nic.bo/ +bo +com.bo +edu.bo +gov.bo +gob.bo +int.bo +org.bo +net.bo +mil.bo +tv.bo + +// br : http://registro.br/dominio/dpn.html +// Updated by registry 2011-03-01 +br +adm.br +adv.br +agr.br +am.br +arq.br +art.br +ato.br +b.br +bio.br +blog.br +bmd.br +can.br +cim.br +cng.br +cnt.br +com.br +coop.br +ecn.br +edu.br +emp.br +eng.br +esp.br +etc.br +eti.br +far.br +flog.br +fm.br +fnd.br +fot.br +fst.br +g12.br +ggf.br +gov.br +imb.br +ind.br +inf.br +jor.br +jus.br +lel.br +mat.br +med.br +mil.br +mus.br +net.br +nom.br +not.br +ntr.br +odo.br +org.br +ppg.br +pro.br +psc.br +psi.br +qsl.br +radio.br +rec.br +slg.br +srv.br +taxi.br +teo.br +tmp.br +trd.br +tur.br +tv.br +vet.br +vlog.br +wiki.br +zlg.br + +// bs : http://www.nic.bs/rules.html +bs +com.bs +net.bs +org.bs +edu.bs +gov.bs + +// bt : http://en.wikipedia.org/wiki/.bt +bt +com.bt +edu.bt +gov.bt +net.bt +org.bt + +// bv : No registrations at this time. +// Submitted by registry 2006-06-16 + +// bw : http://en.wikipedia.org/wiki/.bw +// http://www.gobin.info/domainname/bw.doc +// list of other 2nd level tlds ? +bw +co.bw +org.bw + +// by : http://en.wikipedia.org/wiki/.by +// http://tld.by/rules_2006_en.html +// list of other 2nd level tlds ? +by +gov.by +mil.by +// Official information does not indicate that com.by is a reserved +// second-level domain, but it's being used as one (see www.google.com.by and +// www.yahoo.com.by, for example), so we list it here for safety's sake. +com.by + +// http://hoster.by/ +of.by + +// bz : http://en.wikipedia.org/wiki/.bz +// http://www.belizenic.bz/ +bz +com.bz +net.bz +org.bz +edu.bz +gov.bz + +// ca : http://en.wikipedia.org/wiki/.ca +ca +// ca geographical names +ab.ca +bc.ca +mb.ca +nb.ca +nf.ca +nl.ca +ns.ca +nt.ca +nu.ca +on.ca +pe.ca +qc.ca +sk.ca +yk.ca +// gc.ca: http://en.wikipedia.org/wiki/.gc.ca +// see also: http://registry.gc.ca/en/SubdomainFAQ +gc.ca + +// cat : http://en.wikipedia.org/wiki/.cat +cat + +// cc : http://en.wikipedia.org/wiki/.cc +cc + +// cd : http://en.wikipedia.org/wiki/.cd +// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 +cd +gov.cd + +// cf : http://en.wikipedia.org/wiki/.cf +cf + +// cg : http://en.wikipedia.org/wiki/.cg +cg + +// ch : http://en.wikipedia.org/wiki/.ch +ch + +// ci : http://en.wikipedia.org/wiki/.ci +// http://www.nic.ci/index.php?page=charte +ci +org.ci +or.ci +com.ci +co.ci +edu.ci +ed.ci +ac.ci +net.ci +go.ci +asso.ci +aéroport.ci +int.ci +presse.ci +md.ci +gouv.ci + +// ck : http://en.wikipedia.org/wiki/.ck +*.ck +!www.ck + +// cl : http://en.wikipedia.org/wiki/.cl +cl +gov.cl +gob.cl +co.cl +mil.cl + +// cm : http://en.wikipedia.org/wiki/.cm +cm +gov.cm + +// cn : http://en.wikipedia.org/wiki/.cn +// Submitted by registry 2008-06-11 +cn +ac.cn +com.cn +edu.cn +gov.cn +net.cn +org.cn +mil.cn +公司.cn +网络.cn +網絡.cn +// cn geographic names +ah.cn +bj.cn +cq.cn +fj.cn +gd.cn +gs.cn +gz.cn +gx.cn +ha.cn +hb.cn +he.cn +hi.cn +hl.cn +hn.cn +jl.cn +js.cn +jx.cn +ln.cn +nm.cn +nx.cn +qh.cn +sc.cn +sd.cn +sh.cn +sn.cn +sx.cn +tj.cn +xj.cn +xz.cn +yn.cn +zj.cn +hk.cn +mo.cn +tw.cn + +// co : http://en.wikipedia.org/wiki/.co +// Submitted by registry 2008-06-11 +co +arts.co +com.co +edu.co +firm.co +gov.co +info.co +int.co +mil.co +net.co +nom.co +org.co +rec.co +web.co + +// com : http://en.wikipedia.org/wiki/.com +com + +// coop : http://en.wikipedia.org/wiki/.coop +coop + +// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do +cr +ac.cr +co.cr +ed.cr +fi.cr +go.cr +or.cr +sa.cr + +// cu : http://en.wikipedia.org/wiki/.cu +cu +com.cu +edu.cu +org.cu +net.cu +gov.cu +inf.cu + +// cv : http://en.wikipedia.org/wiki/.cv +cv + +// cx : http://en.wikipedia.org/wiki/.cx +// list of other 2nd level tlds ? +cx +gov.cx + +// cy : http://en.wikipedia.org/wiki/.cy +*.cy + +// cz : http://en.wikipedia.org/wiki/.cz +cz + +// de : http://en.wikipedia.org/wiki/.de +// Confirmed by registry (with technical +// reservations) 2008-07-01 +de + +// dj : http://en.wikipedia.org/wiki/.dj +dj + +// dk : http://en.wikipedia.org/wiki/.dk +// Confirmed by registry 2008-06-17 +dk + +// dm : http://en.wikipedia.org/wiki/.dm +dm +com.dm +net.dm +org.dm +edu.dm +gov.dm + +// do : http://en.wikipedia.org/wiki/.do +do +art.do +com.do +edu.do +gob.do +gov.do +mil.do +net.do +org.do +sld.do +web.do + +// dz : http://en.wikipedia.org/wiki/.dz +dz +com.dz +org.dz +net.dz +gov.dz +edu.dz +asso.dz +pol.dz +art.dz + +// ec : http://www.nic.ec/reg/paso1.asp +// Submitted by registry 2008-07-04 +ec +com.ec +info.ec +net.ec +fin.ec +k12.ec +med.ec +pro.ec +org.ec +edu.ec +gov.ec +gob.ec +mil.ec + +// edu : http://en.wikipedia.org/wiki/.edu +edu + +// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B +ee +edu.ee +gov.ee +riik.ee +lib.ee +med.ee +com.ee +pri.ee +aip.ee +org.ee +fie.ee + +// eg : http://en.wikipedia.org/wiki/.eg +eg +com.eg +edu.eg +eun.eg +gov.eg +mil.eg +name.eg +net.eg +org.eg +sci.eg + +// er : http://en.wikipedia.org/wiki/.er +*.er + +// es : https://www.nic.es/site_ingles/ingles/dominios/index.html +es +com.es +nom.es +org.es +gob.es +edu.es + +// et : http://en.wikipedia.org/wiki/.et +*.et + +// eu : http://en.wikipedia.org/wiki/.eu +eu + +// fi : http://en.wikipedia.org/wiki/.fi +fi +// aland.fi : http://en.wikipedia.org/wiki/.ax +// This domain is being phased out in favor of .ax. As there are still many +// domains under aland.fi, we still keep it on the list until aland.fi is +// completely removed. +// TODO: Check for updates (expected to be phased out around Q1/2009) +aland.fi + +// fj : http://en.wikipedia.org/wiki/.fj +*.fj + +// fk : http://en.wikipedia.org/wiki/.fk +*.fk + +// fm : http://en.wikipedia.org/wiki/.fm +fm + +// fo : http://en.wikipedia.org/wiki/.fo +fo + +// fr : http://www.afnic.fr/ +// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs +fr +com.fr +asso.fr +nom.fr +prd.fr +presse.fr +tm.fr +// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels +aeroport.fr +assedic.fr +avocat.fr +avoues.fr +cci.fr +chambagri.fr +chirurgiens-dentistes.fr +experts-comptables.fr +geometre-expert.fr +gouv.fr +greta.fr +huissier-justice.fr +medecin.fr +notaires.fr +pharmacien.fr +port.fr +veterinaire.fr + +// ga : http://en.wikipedia.org/wiki/.ga +ga + +// gb : This registry is effectively dormant +// Submitted by registry 2008-06-12 + +// gd : http://en.wikipedia.org/wiki/.gd +gd + +// ge : http://www.nic.net.ge/policy_en.pdf +ge +com.ge +edu.ge +gov.ge +org.ge +mil.ge +net.ge +pvt.ge + +// gf : http://en.wikipedia.org/wiki/.gf +gf + +// gg : http://www.channelisles.net/applic/avextn.shtml +gg +co.gg +org.gg +net.gg +sch.gg +gov.gg + +// gh : http://en.wikipedia.org/wiki/.gh +// see also: http://www.nic.gh/reg_now.php +// Although domains directly at second level are not possible at the moment, +// they have been possible for some time and may come back. +gh +com.gh +edu.gh +gov.gh +org.gh +mil.gh + +// gi : http://www.nic.gi/rules.html +gi +com.gi +ltd.gi +gov.gi +mod.gi +edu.gi +org.gi + +// gl : http://en.wikipedia.org/wiki/.gl +// http://nic.gl +gl + +// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm +gm + +// gn : http://psg.com/dns/gn/gn.txt +// Submitted by registry 2008-06-17 +ac.gn +com.gn +edu.gn +gov.gn +org.gn +net.gn + +// gov : http://en.wikipedia.org/wiki/.gov +gov + +// gp : http://www.nic.gp/index.php?lang=en +gp +com.gp +net.gp +mobi.gp +edu.gp +org.gp +asso.gp + +// gq : http://en.wikipedia.org/wiki/.gq +gq + +// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html +// Submitted by registry 2008-06-09 +gr +com.gr +edu.gr +net.gr +org.gr +gov.gr + +// gs : http://en.wikipedia.org/wiki/.gs +gs + +// gt : http://www.gt/politicas.html +*.gt +!www.gt + +// gu : http://gadao.gov.gu/registration.txt +*.gu + +// gw : http://en.wikipedia.org/wiki/.gw +gw + +// gy : http://en.wikipedia.org/wiki/.gy +// http://registry.gy/ +gy +co.gy +com.gy +net.gy + +// hk : https://www.hkdnr.hk +// Submitted by registry 2008-06-11 +hk +com.hk +edu.hk +gov.hk +idv.hk +net.hk +org.hk +公司.hk +教育.hk +敎育.hk +政府.hk +個人.hk +个人.hk +箇人.hk +網络.hk +网络.hk +组織.hk +網絡.hk +网絡.hk +组织.hk +組織.hk +組织.hk + +// hm : http://en.wikipedia.org/wiki/.hm +hm + +// hn : http://www.nic.hn/politicas/ps02,,05.html +hn +com.hn +edu.hn +org.hn +net.hn +mil.hn +gob.hn + +// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf +hr +iz.hr +from.hr +name.hr +com.hr + +// ht : http://www.nic.ht/info/charte.cfm +ht +com.ht +shop.ht +firm.ht +info.ht +adult.ht +net.ht +pro.ht +org.ht +med.ht +art.ht +coop.ht +pol.ht +asso.ht +edu.ht +rel.ht +gouv.ht +perso.ht + +// hu : http://www.domain.hu/domain/English/sld.html +// Confirmed by registry 2008-06-12 +hu +co.hu +info.hu +org.hu +priv.hu +sport.hu +tm.hu +2000.hu +agrar.hu +bolt.hu +casino.hu +city.hu +erotica.hu +erotika.hu +film.hu +forum.hu +games.hu +hotel.hu +ingatlan.hu +jogasz.hu +konyvelo.hu +lakas.hu +media.hu +news.hu +reklam.hu +sex.hu +shop.hu +suli.hu +szex.hu +tozsde.hu +utazas.hu +video.hu + +// id : http://en.wikipedia.org/wiki/.id +// see also: https://register.pandi.or.id/ +id +ac.id +co.id +go.id +mil.id +net.id +or.id +sch.id +web.id + +// ie : http://en.wikipedia.org/wiki/.ie +ie +gov.ie + +// il : http://en.wikipedia.org/wiki/.il +*.il + +// im : https://www.nic.im/pdfs/imfaqs.pdf +im +co.im +ltd.co.im +plc.co.im +net.im +gov.im +org.im +nic.im +ac.im + +// in : http://en.wikipedia.org/wiki/.in +// see also: http://www.inregistry.in/policies/ +// Please note, that nic.in is not an offical eTLD, but used by most +// government institutions. +in +co.in +firm.in +net.in +org.in +gen.in +ind.in +nic.in +ac.in +edu.in +res.in +gov.in +mil.in + +// info : http://en.wikipedia.org/wiki/.info +info + +// int : http://en.wikipedia.org/wiki/.int +// Confirmed by registry 2008-06-18 +int +eu.int + +// io : http://www.nic.io/rules.html +// list of other 2nd level tlds ? +io +com.io + +// iq : http://www.cmc.iq/english/iq/iqregister1.htm +iq +gov.iq +edu.iq +mil.iq +com.iq +org.iq +net.iq + +// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules +// Also see http://www.nic.ir/Internationalized_Domain_Names +// Two .ir entries added at request of , 2010-04-16 +ir +ac.ir +co.ir +gov.ir +id.ir +net.ir +org.ir +sch.ir +// xn--mgba3a4f16a.ir (.ir, Persian YEH) +ایران.ir +// xn--mgba3a4fra.ir (.ir, Arabic YEH) +ايران.ir + +// is : http://www.isnic.is/domain/rules.php +// Confirmed by registry 2008-12-06 +is +net.is +com.is +edu.is +gov.is +org.is +int.is + +// it : http://en.wikipedia.org/wiki/.it +it +gov.it +edu.it +// list of reserved geo-names : +// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf +// (There is also a list of reserved geo-names corresponding to Italian +// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is +// not included here.) +agrigento.it +ag.it +alessandria.it +al.it +ancona.it +an.it +aosta.it +aoste.it +ao.it +arezzo.it +ar.it +ascoli-piceno.it +ascolipiceno.it +ap.it +asti.it +at.it +avellino.it +av.it +bari.it +ba.it +andria-barletta-trani.it +andriabarlettatrani.it +trani-barletta-andria.it +tranibarlettaandria.it +barletta-trani-andria.it +barlettatraniandria.it +andria-trani-barletta.it +andriatranibarletta.it +trani-andria-barletta.it +traniandriabarletta.it +bt.it +belluno.it +bl.it +benevento.it +bn.it +bergamo.it +bg.it +biella.it +bi.it +bologna.it +bo.it +bolzano.it +bozen.it +balsan.it +alto-adige.it +altoadige.it +suedtirol.it +bz.it +brescia.it +bs.it +brindisi.it +br.it +cagliari.it +ca.it +caltanissetta.it +cl.it +campobasso.it +cb.it +carboniaiglesias.it +carbonia-iglesias.it +iglesias-carbonia.it +iglesiascarbonia.it +ci.it +caserta.it +ce.it +catania.it +ct.it +catanzaro.it +cz.it +chieti.it +ch.it +como.it +co.it +cosenza.it +cs.it +cremona.it +cr.it +crotone.it +kr.it +cuneo.it +cn.it +dell-ogliastra.it +dellogliastra.it +ogliastra.it +og.it +enna.it +en.it +ferrara.it +fe.it +fermo.it +fm.it +firenze.it +florence.it +fi.it +foggia.it +fg.it +forli-cesena.it +forlicesena.it +cesena-forli.it +cesenaforli.it +fc.it +frosinone.it +fr.it +genova.it +genoa.it +ge.it +gorizia.it +go.it +grosseto.it +gr.it +imperia.it +im.it +isernia.it +is.it +laquila.it +aquila.it +aq.it +la-spezia.it +laspezia.it +sp.it +latina.it +lt.it +lecce.it +le.it +lecco.it +lc.it +livorno.it +li.it +lodi.it +lo.it +lucca.it +lu.it +macerata.it +mc.it +mantova.it +mn.it +massa-carrara.it +massacarrara.it +carrara-massa.it +carraramassa.it +ms.it +matera.it +mt.it +medio-campidano.it +mediocampidano.it +campidano-medio.it +campidanomedio.it +vs.it +messina.it +me.it +milano.it +milan.it +mi.it +modena.it +mo.it +monza.it +monza-brianza.it +monzabrianza.it +monzaebrianza.it +monzaedellabrianza.it +monza-e-della-brianza.it +mb.it +napoli.it +naples.it +na.it +novara.it +no.it +nuoro.it +nu.it +oristano.it +or.it +padova.it +padua.it +pd.it +palermo.it +pa.it +parma.it +pr.it +pavia.it +pv.it +perugia.it +pg.it +pescara.it +pe.it +pesaro-urbino.it +pesarourbino.it +urbino-pesaro.it +urbinopesaro.it +pu.it +piacenza.it +pc.it +pisa.it +pi.it +pistoia.it +pt.it +pordenone.it +pn.it +potenza.it +pz.it +prato.it +po.it +ragusa.it +rg.it +ravenna.it +ra.it +reggio-calabria.it +reggiocalabria.it +rc.it +reggio-emilia.it +reggioemilia.it +re.it +rieti.it +ri.it +rimini.it +rn.it +roma.it +rome.it +rm.it +rovigo.it +ro.it +salerno.it +sa.it +sassari.it +ss.it +savona.it +sv.it +siena.it +si.it +siracusa.it +sr.it +sondrio.it +so.it +taranto.it +ta.it +tempio-olbia.it +tempioolbia.it +olbia-tempio.it +olbiatempio.it +ot.it +teramo.it +te.it +terni.it +tr.it +torino.it +turin.it +to.it +trapani.it +tp.it +trento.it +trentino.it +tn.it +treviso.it +tv.it +trieste.it +ts.it +udine.it +ud.it +varese.it +va.it +venezia.it +venice.it +ve.it +verbania.it +vb.it +vercelli.it +vc.it +verona.it +vr.it +vibo-valentia.it +vibovalentia.it +vv.it +vicenza.it +vi.it +viterbo.it +vt.it + +// je : http://www.channelisles.net/applic/avextn.shtml +je +co.je +org.je +net.je +sch.je +gov.je + +// jm : http://www.com.jm/register.html +*.jm + +// jo : http://www.dns.jo/Registration_policy.aspx +jo +com.jo +org.jo +net.jo +edu.jo +sch.jo +gov.jo +mil.jo +name.jo + +// jobs : http://en.wikipedia.org/wiki/.jobs +jobs + +// jp : http://en.wikipedia.org/wiki/.jp +// http://jprs.co.jp/en/jpdomain.html +// Submitted by registry 2008-06-11 +// Updated by registry 2008-12-04 +jp +// jp organizational type names +ac.jp +ad.jp +co.jp +ed.jp +go.jp +gr.jp +lg.jp +ne.jp +or.jp +// jp geographic type names +// http://jprs.jp/doc/rule/saisoku-1.html +*.aichi.jp +*.akita.jp +*.aomori.jp +*.chiba.jp +*.ehime.jp +*.fukui.jp +*.fukuoka.jp +*.fukushima.jp +*.gifu.jp +*.gunma.jp +*.hiroshima.jp +*.hokkaido.jp +*.hyogo.jp +*.ibaraki.jp +*.ishikawa.jp +*.iwate.jp +*.kagawa.jp +*.kagoshima.jp +*.kanagawa.jp +*.kawasaki.jp +*.kitakyushu.jp +*.kobe.jp +*.kochi.jp +*.kumamoto.jp +*.kyoto.jp +*.mie.jp +*.miyagi.jp +*.miyazaki.jp +*.nagano.jp +*.nagasaki.jp +*.nagoya.jp +*.nara.jp +*.niigata.jp +*.oita.jp +*.okayama.jp +*.okinawa.jp +*.osaka.jp +*.saga.jp +*.saitama.jp +*.sapporo.jp +*.sendai.jp +*.shiga.jp +*.shimane.jp +*.shizuoka.jp +*.tochigi.jp +*.tokushima.jp +*.tokyo.jp +*.tottori.jp +*.toyama.jp +*.wakayama.jp +*.yamagata.jp +*.yamaguchi.jp +*.yamanashi.jp +*.yokohama.jp +!metro.tokyo.jp +!pref.aichi.jp +!pref.akita.jp +!pref.aomori.jp +!pref.chiba.jp +!pref.ehime.jp +!pref.fukui.jp +!pref.fukuoka.jp +!pref.fukushima.jp +!pref.gifu.jp +!pref.gunma.jp +!pref.hiroshima.jp +!pref.hokkaido.jp +!pref.hyogo.jp +!pref.ibaraki.jp +!pref.ishikawa.jp +!pref.iwate.jp +!pref.kagawa.jp +!pref.kagoshima.jp +!pref.kanagawa.jp +!pref.kochi.jp +!pref.kumamoto.jp +!pref.kyoto.jp +!pref.mie.jp +!pref.miyagi.jp +!pref.miyazaki.jp +!pref.nagano.jp +!pref.nagasaki.jp +!pref.nara.jp +!pref.niigata.jp +!pref.oita.jp +!pref.okayama.jp +!pref.okinawa.jp +!pref.osaka.jp +!pref.saga.jp +!pref.saitama.jp +!pref.shiga.jp +!pref.shimane.jp +!pref.shizuoka.jp +!pref.tochigi.jp +!pref.tokushima.jp +!pref.tottori.jp +!pref.toyama.jp +!pref.wakayama.jp +!pref.yamagata.jp +!pref.yamaguchi.jp +!pref.yamanashi.jp +!city.chiba.jp +!city.fukuoka.jp +!city.hiroshima.jp +!city.kawasaki.jp +!city.kitakyushu.jp +!city.kobe.jp +!city.kyoto.jp +!city.nagoya.jp +!city.niigata.jp +!city.okayama.jp +!city.osaka.jp +!city.saitama.jp +!city.sapporo.jp +!city.sendai.jp +!city.shizuoka.jp +!city.yokohama.jp + +// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 +*.ke + +// kg : http://www.domain.kg/dmn_n.html +kg +org.kg +net.kg +com.kg +edu.kg +gov.kg +mil.kg + +// kh : http://www.mptc.gov.kh/dns_registration.htm +*.kh + +// ki : http://www.ki/dns/index.html +ki +edu.ki +biz.ki +net.ki +org.ki +gov.ki +info.ki +com.ki + +// km : http://en.wikipedia.org/wiki/.km +// http://www.domaine.km/documents/charte.doc +km +org.km +nom.km +gov.km +prd.km +tm.km +edu.km +mil.km +ass.km +com.km +// These are only mentioned as proposed suggestions at domaine.km, but +// http://en.wikipedia.org/wiki/.km says they're available for registration: +coop.km +asso.km +presse.km +medecin.km +notaires.km +pharmaciens.km +veterinaire.km +gouv.km + +// kn : http://en.wikipedia.org/wiki/.kn +// http://www.dot.kn/domainRules.html +kn +net.kn +org.kn +edu.kn +gov.kn + +// kp : http://www.kcce.kp/en_index.php +com.kp +edu.kp +gov.kp +org.kp +rep.kp +tra.kp + +// kr : http://en.wikipedia.org/wiki/.kr +// see also: http://domain.nida.or.kr/eng/registration.jsp +kr +ac.kr +co.kr +es.kr +go.kr +hs.kr +kg.kr +mil.kr +ms.kr +ne.kr +or.kr +pe.kr +re.kr +sc.kr +// kr geographical names +busan.kr +chungbuk.kr +chungnam.kr +daegu.kr +daejeon.kr +gangwon.kr +gwangju.kr +gyeongbuk.kr +gyeonggi.kr +gyeongnam.kr +incheon.kr +jeju.kr +jeonbuk.kr +jeonnam.kr +seoul.kr +ulsan.kr + +// kw : http://en.wikipedia.org/wiki/.kw +*.kw + +// ky : http://www.icta.ky/da_ky_reg_dom.php +// Confirmed by registry 2008-06-17 +ky +edu.ky +gov.ky +com.ky +org.ky +net.ky + +// kz : http://en.wikipedia.org/wiki/.kz +// see also: http://www.nic.kz/rules/index.jsp +kz +org.kz +edu.kz +net.kz +gov.kz +mil.kz +com.kz + +// la : http://en.wikipedia.org/wiki/.la +// Submitted by registry 2008-06-10 +la +int.la +net.la +info.la +edu.la +gov.la +per.la +com.la +org.la + +// lb : http://en.wikipedia.org/wiki/.lb +// Submitted by registry 2008-06-17 +com.lb +edu.lb +gov.lb +net.lb +org.lb + +// lc : http://en.wikipedia.org/wiki/.lc +// see also: http://www.nic.lc/rules.htm +lc +com.lc +net.lc +co.lc +org.lc +edu.lc +gov.lc + +// li : http://en.wikipedia.org/wiki/.li +li + +// lk : http://www.nic.lk/seclevpr.html +lk +gov.lk +sch.lk +net.lk +int.lk +com.lk +org.lk +edu.lk +ngo.lk +soc.lk +web.lk +ltd.lk +assn.lk +grp.lk +hotel.lk + +// lr : http://psg.com/dns/lr/lr.txt +// Submitted by registry 2008-06-17 +com.lr +edu.lr +gov.lr +org.lr +net.lr + +// ls : http://en.wikipedia.org/wiki/.ls +ls +co.ls +org.ls + +// lt : http://en.wikipedia.org/wiki/.lt +lt +// gov.lt : http://www.gov.lt/index_en.php +gov.lt + +// lu : http://www.dns.lu/en/ +lu + +// lv : http://www.nic.lv/DNS/En/generic.php +lv +com.lv +edu.lv +gov.lv +org.lv +mil.lv +id.lv +net.lv +asn.lv +conf.lv + +// ly : http://www.nic.ly/regulations.php +ly +com.ly +net.ly +gov.ly +plc.ly +edu.ly +sch.ly +med.ly +org.ly +id.ly + +// ma : http://en.wikipedia.org/wiki/.ma +// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf +ma +co.ma +net.ma +gov.ma +org.ma +ac.ma +press.ma + +// mc : http://www.nic.mc/ +mc +tm.mc +asso.mc + +// md : http://en.wikipedia.org/wiki/.md +md + +// me : http://en.wikipedia.org/wiki/.me +me +co.me +net.me +org.me +edu.me +ac.me +gov.me +its.me +priv.me + +// mg : http://www.nic.mg/tarif.htm +mg +org.mg +nom.mg +gov.mg +prd.mg +tm.mg +edu.mg +mil.mg +com.mg + +// mh : http://en.wikipedia.org/wiki/.mh +mh + +// mil : http://en.wikipedia.org/wiki/.mil +mil + +// mk : http://en.wikipedia.org/wiki/.mk +// see also: http://dns.marnet.net.mk/postapka.php +mk +com.mk +org.mk +net.mk +edu.mk +gov.mk +inf.mk +name.mk + +// ml : http://www.gobin.info/domainname/ml-template.doc +// see also: http://en.wikipedia.org/wiki/.ml +ml +com.ml +edu.ml +gouv.ml +gov.ml +net.ml +org.ml +presse.ml + +// mm : http://en.wikipedia.org/wiki/.mm +*.mm + +// mn : http://en.wikipedia.org/wiki/.mn +mn +gov.mn +edu.mn +org.mn + +// mo : http://www.monic.net.mo/ +mo +com.mo +net.mo +org.mo +edu.mo +gov.mo + +// mobi : http://en.wikipedia.org/wiki/.mobi +mobi + +// mp : http://www.dot.mp/ +// Confirmed by registry 2008-06-17 +mp + +// mq : http://en.wikipedia.org/wiki/.mq +mq + +// mr : http://en.wikipedia.org/wiki/.mr +mr +gov.mr + +// ms : http://en.wikipedia.org/wiki/.ms +ms + +// mt : https://www.nic.org.mt/dotmt/ +*.mt + +// mu : http://en.wikipedia.org/wiki/.mu +mu +com.mu +net.mu +org.mu +gov.mu +ac.mu +co.mu +or.mu + +// museum : http://about.museum/naming/ +// http://index.museum/ +museum +academy.museum +agriculture.museum +air.museum +airguard.museum +alabama.museum +alaska.museum +amber.museum +ambulance.museum +american.museum +americana.museum +americanantiques.museum +americanart.museum +amsterdam.museum +and.museum +annefrank.museum +anthro.museum +anthropology.museum +antiques.museum +aquarium.museum +arboretum.museum +archaeological.museum +archaeology.museum +architecture.museum +art.museum +artanddesign.museum +artcenter.museum +artdeco.museum +arteducation.museum +artgallery.museum +arts.museum +artsandcrafts.museum +asmatart.museum +assassination.museum +assisi.museum +association.museum +astronomy.museum +atlanta.museum +austin.museum +australia.museum +automotive.museum +aviation.museum +axis.museum +badajoz.museum +baghdad.museum +bahn.museum +bale.museum +baltimore.museum +barcelona.museum +baseball.museum +basel.museum +baths.museum +bauern.museum +beauxarts.museum +beeldengeluid.museum +bellevue.museum +bergbau.museum +berkeley.museum +berlin.museum +bern.museum +bible.museum +bilbao.museum +bill.museum +birdart.museum +birthplace.museum +bonn.museum +boston.museum +botanical.museum +botanicalgarden.museum +botanicgarden.museum +botany.museum +brandywinevalley.museum +brasil.museum +bristol.museum +british.museum +britishcolumbia.museum +broadcast.museum +brunel.museum +brussel.museum +brussels.museum +bruxelles.museum +building.museum +burghof.museum +bus.museum +bushey.museum +cadaques.museum +california.museum +cambridge.museum +can.museum +canada.museum +capebreton.museum +carrier.museum +cartoonart.museum +casadelamoneda.museum +castle.museum +castres.museum +celtic.museum +center.museum +chattanooga.museum +cheltenham.museum +chesapeakebay.museum +chicago.museum +children.museum +childrens.museum +childrensgarden.museum +chiropractic.museum +chocolate.museum +christiansburg.museum +cincinnati.museum +cinema.museum +circus.museum +civilisation.museum +civilization.museum +civilwar.museum +clinton.museum +clock.museum +coal.museum +coastaldefence.museum +cody.museum +coldwar.museum +collection.museum +colonialwilliamsburg.museum +coloradoplateau.museum +columbia.museum +columbus.museum +communication.museum +communications.museum +community.museum +computer.museum +computerhistory.museum +comunicações.museum +contemporary.museum +contemporaryart.museum +convent.museum +copenhagen.museum +corporation.museum +correios-e-telecomunicações.museum +corvette.museum +costume.museum +countryestate.museum +county.museum +crafts.museum +cranbrook.museum +creation.museum +cultural.museum +culturalcenter.museum +culture.museum +cyber.museum +cymru.museum +dali.museum +dallas.museum +database.museum +ddr.museum +decorativearts.museum +delaware.museum +delmenhorst.museum +denmark.museum +depot.museum +design.museum +detroit.museum +dinosaur.museum +discovery.museum +dolls.museum +donostia.museum +durham.museum +eastafrica.museum +eastcoast.museum +education.museum +educational.museum +egyptian.museum +eisenbahn.museum +elburg.museum +elvendrell.museum +embroidery.museum +encyclopedic.museum +england.museum +entomology.museum +environment.museum +environmentalconservation.museum +epilepsy.museum +essex.museum +estate.museum +ethnology.museum +exeter.museum +exhibition.museum +family.museum +farm.museum +farmequipment.museum +farmers.museum +farmstead.museum +field.museum +figueres.museum +filatelia.museum +film.museum +fineart.museum +finearts.museum +finland.museum +flanders.museum +florida.museum +force.museum +fortmissoula.museum +fortworth.museum +foundation.museum +francaise.museum +frankfurt.museum +franziskaner.museum +freemasonry.museum +freiburg.museum +fribourg.museum +frog.museum +fundacio.museum +furniture.museum +gallery.museum +garden.museum +gateway.museum +geelvinck.museum +gemological.museum +geology.museum +georgia.museum +giessen.museum +glas.museum +glass.museum +gorge.museum +grandrapids.museum +graz.museum +guernsey.museum +halloffame.museum +hamburg.museum +handson.museum +harvestcelebration.museum +hawaii.museum +health.museum +heimatunduhren.museum +hellas.museum +helsinki.museum +hembygdsforbund.museum +heritage.museum +histoire.museum +historical.museum +historicalsociety.museum +historichouses.museum +historisch.museum +historisches.museum +history.museum +historyofscience.museum +horology.museum +house.museum +humanities.museum +illustration.museum +imageandsound.museum +indian.museum +indiana.museum +indianapolis.museum +indianmarket.museum +intelligence.museum +interactive.museum +iraq.museum +iron.museum +isleofman.museum +jamison.museum +jefferson.museum +jerusalem.museum +jewelry.museum +jewish.museum +jewishart.museum +jfk.museum +journalism.museum +judaica.museum +judygarland.museum +juedisches.museum +juif.museum +karate.museum +karikatur.museum +kids.museum +koebenhavn.museum +koeln.museum +kunst.museum +kunstsammlung.museum +kunstunddesign.museum +labor.museum +labour.museum +lajolla.museum +lancashire.museum +landes.museum +lans.museum +läns.museum +larsson.museum +lewismiller.museum +lincoln.museum +linz.museum +living.museum +livinghistory.museum +localhistory.museum +london.museum +losangeles.museum +louvre.museum +loyalist.museum +lucerne.museum +luxembourg.museum +luzern.museum +mad.museum +madrid.museum +mallorca.museum +manchester.museum +mansion.museum +mansions.museum +manx.museum +marburg.museum +maritime.museum +maritimo.museum +maryland.museum +marylhurst.museum +media.museum +medical.museum +medizinhistorisches.museum +meeres.museum +memorial.museum +mesaverde.museum +michigan.museum +midatlantic.museum +military.museum +mill.museum +miners.museum +mining.museum +minnesota.museum +missile.museum +missoula.museum +modern.museum +moma.museum +money.museum +monmouth.museum +monticello.museum +montreal.museum +moscow.museum +motorcycle.museum +muenchen.museum +muenster.museum +mulhouse.museum +muncie.museum +museet.museum +museumcenter.museum +museumvereniging.museum +music.museum +national.museum +nationalfirearms.museum +nationalheritage.museum +nativeamerican.museum +naturalhistory.museum +naturalhistorymuseum.museum +naturalsciences.museum +nature.museum +naturhistorisches.museum +natuurwetenschappen.museum +naumburg.museum +naval.museum +nebraska.museum +neues.museum +newhampshire.museum +newjersey.museum +newmexico.museum +newport.museum +newspaper.museum +newyork.museum +niepce.museum +norfolk.museum +north.museum +nrw.museum +nuernberg.museum +nuremberg.museum +nyc.museum +nyny.museum +oceanographic.museum +oceanographique.museum +omaha.museum +online.museum +ontario.museum +openair.museum +oregon.museum +oregontrail.museum +otago.museum +oxford.museum +pacific.museum +paderborn.museum +palace.museum +paleo.museum +palmsprings.museum +panama.museum +paris.museum +pasadena.museum +pharmacy.museum +philadelphia.museum +philadelphiaarea.museum +philately.museum +phoenix.museum +photography.museum +pilots.museum +pittsburgh.museum +planetarium.museum +plantation.museum +plants.museum +plaza.museum +portal.museum +portland.museum +portlligat.museum +posts-and-telecommunications.museum +preservation.museum +presidio.museum +press.museum +project.museum +public.museum +pubol.museum +quebec.museum +railroad.museum +railway.museum +research.museum +resistance.museum +riodejaneiro.museum +rochester.museum +rockart.museum +roma.museum +russia.museum +saintlouis.museum +salem.museum +salvadordali.museum +salzburg.museum +sandiego.museum +sanfrancisco.museum +santabarbara.museum +santacruz.museum +santafe.museum +saskatchewan.museum +satx.museum +savannahga.museum +schlesisches.museum +schoenbrunn.museum +schokoladen.museum +school.museum +schweiz.museum +science.museum +scienceandhistory.museum +scienceandindustry.museum +sciencecenter.museum +sciencecenters.museum +science-fiction.museum +sciencehistory.museum +sciences.museum +sciencesnaturelles.museum +scotland.museum +seaport.museum +settlement.museum +settlers.museum +shell.museum +sherbrooke.museum +sibenik.museum +silk.museum +ski.museum +skole.museum +society.museum +sologne.museum +soundandvision.museum +southcarolina.museum +southwest.museum +space.museum +spy.museum +square.museum +stadt.museum +stalbans.museum +starnberg.museum +state.museum +stateofdelaware.museum +station.museum +steam.museum +steiermark.museum +stjohn.museum +stockholm.museum +stpetersburg.museum +stuttgart.museum +suisse.museum +surgeonshall.museum +surrey.museum +svizzera.museum +sweden.museum +sydney.museum +tank.museum +tcm.museum +technology.museum +telekommunikation.museum +television.museum +texas.museum +textile.museum +theater.museum +time.museum +timekeeping.museum +topology.museum +torino.museum +touch.museum +town.museum +transport.museum +tree.museum +trolley.museum +trust.museum +trustee.museum +uhren.museum +ulm.museum +undersea.museum +university.museum +usa.museum +usantiques.museum +usarts.museum +uscountryestate.museum +usculture.museum +usdecorativearts.museum +usgarden.museum +ushistory.museum +ushuaia.museum +uslivinghistory.museum +utah.museum +uvic.museum +valley.museum +vantaa.museum +versailles.museum +viking.museum +village.museum +virginia.museum +virtual.museum +virtuel.museum +vlaanderen.museum +volkenkunde.museum +wales.museum +wallonie.museum +war.museum +washingtondc.museum +watchandclock.museum +watch-and-clock.museum +western.museum +westfalen.museum +whaling.museum +wildlife.museum +williamsburg.museum +windmill.museum +workshop.museum +york.museum +yorkshire.museum +yosemite.museum +youth.museum +zoological.museum +zoology.museum +ירושלים.museum +иком.museum + +// mv : http://en.wikipedia.org/wiki/.mv +// "mv" included because, contra Wikipedia, google.mv exists. +mv +aero.mv +biz.mv +com.mv +coop.mv +edu.mv +gov.mv +info.mv +int.mv +mil.mv +museum.mv +name.mv +net.mv +org.mv +pro.mv + +// mw : http://www.registrar.mw/ +mw +ac.mw +biz.mw +co.mw +com.mw +coop.mw +edu.mw +gov.mw +int.mw +museum.mw +net.mw +org.mw + +// mx : http://www.nic.mx/ +// Submitted by registry 2008-06-19 +mx +com.mx +org.mx +gob.mx +edu.mx +net.mx + +// my : http://www.mynic.net.my/ +my +com.my +net.my +org.my +gov.my +edu.my +mil.my +name.my + +// mz : http://www.gobin.info/domainname/mz-template.doc +*.mz + +// na : http://www.na-nic.com.na/ +// http://www.info.na/domain/ +na +info.na +pro.na +name.na +school.na +or.na +dr.na +us.na +mx.na +ca.na +in.na +cc.na +tv.na +ws.na +mobi.na +co.na +com.na +org.na + +// name : has 2nd-level tlds, but there's no list of them +name + +// nc : http://www.cctld.nc/ +nc +asso.nc + +// ne : http://en.wikipedia.org/wiki/.ne +ne + +// net : http://en.wikipedia.org/wiki/.net +net + +// nf : http://en.wikipedia.org/wiki/.nf +nf +com.nf +net.nf +per.nf +rec.nf +web.nf +arts.nf +firm.nf +info.nf +other.nf +store.nf + +// ng : http://psg.com/dns/ng/ +// Submitted by registry 2008-06-17 +ac.ng +com.ng +edu.ng +gov.ng +net.ng +org.ng + +// ni : http://www.nic.ni/dominios.htm +*.ni + +// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html +// Confirmed by registry (with technical +// reservations) 2008-06-08 +nl + +// BV.nl will be a registry for dutch BV's (besloten vennootschap) +bv.nl + +// no : http://www.norid.no/regelverk/index.en.html +// The Norwegian registry has declined to notify us of updates. The web pages +// referenced below are the official source of the data. There is also an +// announce mailing list: +// https://postlister.uninett.no/sympa/info/norid-diskusjon +no +// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html +fhs.no +vgs.no +fylkesbibl.no +folkebibl.no +museum.no +idrett.no +priv.no +// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html +mil.no +stat.no +dep.no +kommune.no +herad.no +// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html +// counties +aa.no +ah.no +bu.no +fm.no +hl.no +hm.no +jan-mayen.no +mr.no +nl.no +nt.no +of.no +ol.no +oslo.no +rl.no +sf.no +st.no +svalbard.no +tm.no +tr.no +va.no +vf.no +// primary and lower secondary schools per county +gs.aa.no +gs.ah.no +gs.bu.no +gs.fm.no +gs.hl.no +gs.hm.no +gs.jan-mayen.no +gs.mr.no +gs.nl.no +gs.nt.no +gs.of.no +gs.ol.no +gs.oslo.no +gs.rl.no +gs.sf.no +gs.st.no +gs.svalbard.no +gs.tm.no +gs.tr.no +gs.va.no +gs.vf.no +// cities +akrehamn.no +åkrehamn.no +algard.no +ålgård.no +arna.no +brumunddal.no +bryne.no +bronnoysund.no +brønnøysund.no +drobak.no +drøbak.no +egersund.no +fetsund.no +floro.no +florø.no +fredrikstad.no +hokksund.no +honefoss.no +hønefoss.no +jessheim.no +jorpeland.no +jørpeland.no +kirkenes.no +kopervik.no +krokstadelva.no +langevag.no +langevåg.no +leirvik.no +mjondalen.no +mjøndalen.no +mo-i-rana.no +mosjoen.no +mosjøen.no +nesoddtangen.no +orkanger.no +osoyro.no +osøyro.no +raholt.no +råholt.no +sandnessjoen.no +sandnessjøen.no +skedsmokorset.no +slattum.no +spjelkavik.no +stathelle.no +stavern.no +stjordalshalsen.no +stjørdalshalsen.no +tananger.no +tranby.no +vossevangen.no +// communities +afjord.no +åfjord.no +agdenes.no +al.no +ål.no +alesund.no +ålesund.no +alstahaug.no +alta.no +áltá.no +alaheadju.no +álaheadju.no +alvdal.no +amli.no +åmli.no +amot.no +åmot.no +andebu.no +andoy.no +andøy.no +andasuolo.no +ardal.no +årdal.no +aremark.no +arendal.no +ås.no +aseral.no +åseral.no +asker.no +askim.no +askvoll.no +askoy.no +askøy.no +asnes.no +åsnes.no +audnedaln.no +aukra.no +aure.no +aurland.no +aurskog-holand.no +aurskog-høland.no +austevoll.no +austrheim.no +averoy.no +averøy.no +balestrand.no +ballangen.no +balat.no +bálát.no +balsfjord.no +bahccavuotna.no +báhccavuotna.no +bamble.no +bardu.no +beardu.no +beiarn.no +bajddar.no +bájddar.no +baidar.no +báidár.no +berg.no +bergen.no +berlevag.no +berlevåg.no +bearalvahki.no +bearalváhki.no +bindal.no +birkenes.no +bjarkoy.no +bjarkøy.no +bjerkreim.no +bjugn.no +bodo.no +bodø.no +badaddja.no +bådåddjå.no +budejju.no +bokn.no +bremanger.no +bronnoy.no +brønnøy.no +bygland.no +bykle.no +barum.no +bærum.no +bo.telemark.no +bø.telemark.no +bo.nordland.no +bø.nordland.no +bievat.no +bievát.no +bomlo.no +bømlo.no +batsfjord.no +båtsfjord.no +bahcavuotna.no +báhcavuotna.no +dovre.no +drammen.no +drangedal.no +dyroy.no +dyrøy.no +donna.no +dønna.no +eid.no +eidfjord.no +eidsberg.no +eidskog.no +eidsvoll.no +eigersund.no +elverum.no +enebakk.no +engerdal.no +etne.no +etnedal.no +evenes.no +evenassi.no +evenášši.no +evje-og-hornnes.no +farsund.no +fauske.no +fuossko.no +fuoisku.no +fedje.no +fet.no +finnoy.no +finnøy.no +fitjar.no +fjaler.no +fjell.no +flakstad.no +flatanger.no +flekkefjord.no +flesberg.no +flora.no +fla.no +flå.no +folldal.no +forsand.no +fosnes.no +frei.no +frogn.no +froland.no +frosta.no +frana.no +fræna.no +froya.no +frøya.no +fusa.no +fyresdal.no +forde.no +førde.no +gamvik.no +gangaviika.no +gáŋgaviika.no +gaular.no +gausdal.no +gildeskal.no +gildeskål.no +giske.no +gjemnes.no +gjerdrum.no +gjerstad.no +gjesdal.no +gjovik.no +gjøvik.no +gloppen.no +gol.no +gran.no +grane.no +granvin.no +gratangen.no +grimstad.no +grong.no +kraanghke.no +kråanghke.no +grue.no +gulen.no +hadsel.no +halden.no +halsa.no +hamar.no +hamaroy.no +habmer.no +hábmer.no +hapmir.no +hápmir.no +hammerfest.no +hammarfeasta.no +hámmárfeasta.no +haram.no +hareid.no +harstad.no +hasvik.no +aknoluokta.no +ákŋoluokta.no +hattfjelldal.no +aarborte.no +haugesund.no +hemne.no +hemnes.no +hemsedal.no +heroy.more-og-romsdal.no +herøy.møre-og-romsdal.no +heroy.nordland.no +herøy.nordland.no +hitra.no +hjartdal.no +hjelmeland.no +hobol.no +hobøl.no +hof.no +hol.no +hole.no +holmestrand.no +holtalen.no +holtålen.no +hornindal.no +horten.no +hurdal.no +hurum.no +hvaler.no +hyllestad.no +hagebostad.no +hægebostad.no +hoyanger.no +høyanger.no +hoylandet.no +høylandet.no +ha.no +hå.no +ibestad.no +inderoy.no +inderøy.no +iveland.no +jevnaker.no +jondal.no +jolster.no +jølster.no +karasjok.no +karasjohka.no +kárášjohka.no +karlsoy.no +galsa.no +gálsá.no +karmoy.no +karmøy.no +kautokeino.no +guovdageaidnu.no +klepp.no +klabu.no +klæbu.no +kongsberg.no +kongsvinger.no +kragero.no +kragerø.no +kristiansand.no +kristiansund.no +krodsherad.no +krødsherad.no +kvalsund.no +rahkkeravju.no +ráhkkerávju.no +kvam.no +kvinesdal.no +kvinnherad.no +kviteseid.no +kvitsoy.no +kvitsøy.no +kvafjord.no +kvæfjord.no +giehtavuoatna.no +kvanangen.no +kvænangen.no +navuotna.no +návuotna.no +kafjord.no +kåfjord.no +gaivuotna.no +gáivuotna.no +larvik.no +lavangen.no +lavagis.no +loabat.no +loabát.no +lebesby.no +davvesiida.no +leikanger.no +leirfjord.no +leka.no +leksvik.no +lenvik.no +leangaviika.no +leaŋgaviika.no +lesja.no +levanger.no +lier.no +lierne.no +lillehammer.no +lillesand.no +lindesnes.no +lindas.no +lindås.no +lom.no +loppa.no +lahppi.no +láhppi.no +lund.no +lunner.no +luroy.no +lurøy.no +luster.no +lyngdal.no +lyngen.no +ivgu.no +lardal.no +lerdal.no +lærdal.no +lodingen.no +lødingen.no +lorenskog.no +lørenskog.no +loten.no +løten.no +malvik.no +masoy.no +måsøy.no +muosat.no +muosát.no +mandal.no +marker.no +marnardal.no +masfjorden.no +meland.no +meldal.no +melhus.no +meloy.no +meløy.no +meraker.no +meråker.no +moareke.no +moåreke.no +midsund.no +midtre-gauldal.no +modalen.no +modum.no +molde.no +moskenes.no +moss.no +mosvik.no +malselv.no +målselv.no +malatvuopmi.no +málatvuopmi.no +namdalseid.no +aejrie.no +namsos.no +namsskogan.no +naamesjevuemie.no +nååmesjevuemie.no +laakesvuemie.no +nannestad.no +narvik.no +narviika.no +naustdal.no +nedre-eiker.no +nes.akershus.no +nes.buskerud.no +nesna.no +nesodden.no +nesseby.no +unjarga.no +unjárga.no +nesset.no +nissedal.no +nittedal.no +nord-aurdal.no +nord-fron.no +nord-odal.no +norddal.no +nordkapp.no +davvenjarga.no +davvenjárga.no +nordre-land.no +nordreisa.no +raisa.no +ráisa.no +nore-og-uvdal.no +notodden.no +naroy.no +nærøy.no +notteroy.no +nøtterøy.no +odda.no +oksnes.no +øksnes.no +oppdal.no +oppegard.no +oppegård.no +orkdal.no +orland.no +ørland.no +orskog.no +ørskog.no +orsta.no +ørsta.no +os.hedmark.no +os.hordaland.no +osen.no +osteroy.no +osterøy.no +ostre-toten.no +østre-toten.no +overhalla.no +ovre-eiker.no +øvre-eiker.no +oyer.no +øyer.no +oygarden.no +øygarden.no +oystre-slidre.no +øystre-slidre.no +porsanger.no +porsangu.no +porsáŋgu.no +porsgrunn.no +radoy.no +radøy.no +rakkestad.no +rana.no +ruovat.no +randaberg.no +rauma.no +rendalen.no +rennebu.no +rennesoy.no +rennesøy.no +rindal.no +ringebu.no +ringerike.no +ringsaker.no +rissa.no +risor.no +risør.no +roan.no +rollag.no +rygge.no +ralingen.no +rælingen.no +rodoy.no +rødøy.no +romskog.no +rømskog.no +roros.no +røros.no +rost.no +røst.no +royken.no +røyken.no +royrvik.no +røyrvik.no +rade.no +råde.no +salangen.no +siellak.no +saltdal.no +salat.no +sálát.no +sálat.no +samnanger.no +sande.more-og-romsdal.no +sande.møre-og-romsdal.no +sande.vestfold.no +sandefjord.no +sandnes.no +sandoy.no +sandøy.no +sarpsborg.no +sauda.no +sauherad.no +sel.no +selbu.no +selje.no +seljord.no +sigdal.no +siljan.no +sirdal.no +skaun.no +skedsmo.no +ski.no +skien.no +skiptvet.no +skjervoy.no +skjervøy.no +skierva.no +skiervá.no +skjak.no +skjåk.no +skodje.no +skanland.no +skånland.no +skanit.no +skánit.no +smola.no +smøla.no +snillfjord.no +snasa.no +snåsa.no +snoasa.no +snaase.no +snåase.no +sogndal.no +sokndal.no +sola.no +solund.no +songdalen.no +sortland.no +spydeberg.no +stange.no +stavanger.no +steigen.no +steinkjer.no +stjordal.no +stjørdal.no +stokke.no +stor-elvdal.no +stord.no +stordal.no +storfjord.no +omasvuotna.no +strand.no +stranda.no +stryn.no +sula.no +suldal.no +sund.no +sunndal.no +surnadal.no +sveio.no +svelvik.no +sykkylven.no +sogne.no +søgne.no +somna.no +sømna.no +sondre-land.no +søndre-land.no +sor-aurdal.no +sør-aurdal.no +sor-fron.no +sør-fron.no +sor-odal.no +sør-odal.no +sor-varanger.no +sør-varanger.no +matta-varjjat.no +mátta-várjjat.no +sorfold.no +sørfold.no +sorreisa.no +sørreisa.no +sorum.no +sørum.no +tana.no +deatnu.no +time.no +tingvoll.no +tinn.no +tjeldsund.no +dielddanuorri.no +tjome.no +tjøme.no +tokke.no +tolga.no +torsken.no +tranoy.no +tranøy.no +tromso.no +tromsø.no +tromsa.no +romsa.no +trondheim.no +troandin.no +trysil.no +trana.no +træna.no +trogstad.no +trøgstad.no +tvedestrand.no +tydal.no +tynset.no +tysfjord.no +divtasvuodna.no +divttasvuotna.no +tysnes.no +tysvar.no +tysvær.no +tonsberg.no +tønsberg.no +ullensaker.no +ullensvang.no +ulvik.no +utsira.no +vadso.no +vadsø.no +cahcesuolo.no +čáhcesuolo.no +vaksdal.no +valle.no +vang.no +vanylven.no +vardo.no +vardø.no +varggat.no +várggát.no +vefsn.no +vaapste.no +vega.no +vegarshei.no +vegårshei.no +vennesla.no +verdal.no +verran.no +vestby.no +vestnes.no +vestre-slidre.no +vestre-toten.no +vestvagoy.no +vestvågøy.no +vevelstad.no +vik.no +vikna.no +vindafjord.no +volda.no +voss.no +varoy.no +værøy.no +vagan.no +vågan.no +voagat.no +vagsoy.no +vågsøy.no +vaga.no +vågå.no +valer.ostfold.no +våler.østfold.no +valer.hedmark.no +våler.hedmark.no + +// np : http://www.mos.com.np/register.html +*.np + +// nr : http://cenpac.net.nr/dns/index.html +// Confirmed by registry 2008-06-17 +nr +biz.nr +info.nr +gov.nr +edu.nr +org.nr +net.nr +com.nr + +// nu : http://en.wikipedia.org/wiki/.nu +nu + +// nz : http://en.wikipedia.org/wiki/.nz +*.nz + +// om : http://en.wikipedia.org/wiki/.om +*.om +!mediaphone.om +!nawrastelecom.om +!nawras.om +!omanmobile.om +!omanpost.om +!omantel.om +!rakpetroleum.om +!siemens.om +!songfest.om +!statecouncil.om + +// org : http://en.wikipedia.org/wiki/.org +org + +// pa : http://www.nic.pa/ +// Some additional second level "domains" resolve directly as hostnames, such as +// pannet.pa, so we add a rule for "pa". +pa +ac.pa +gob.pa +com.pa +org.pa +sld.pa +edu.pa +net.pa +ing.pa +abo.pa +med.pa +nom.pa + +// pe : https://www.nic.pe/InformeFinalComision.pdf +pe +edu.pe +gob.pe +nom.pe +mil.pe +org.pe +com.pe +net.pe + +// pf : http://www.gobin.info/domainname/formulaire-pf.pdf +pf +com.pf +org.pf +edu.pf + +// pg : http://en.wikipedia.org/wiki/.pg +*.pg + +// ph : http://www.domains.ph/FAQ2.asp +// Submitted by registry 2008-06-13 +ph +com.ph +net.ph +org.ph +gov.ph +edu.ph +ngo.ph +mil.ph +i.ph + +// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK +pk +com.pk +net.pk +edu.pk +org.pk +fam.pk +biz.pk +web.pk +gov.pk +gob.pk +gok.pk +gon.pk +gop.pk +gos.pk +info.pk + +// pl : http://www.dns.pl/english/ +pl +// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html +aid.pl +agro.pl +atm.pl +auto.pl +biz.pl +com.pl +edu.pl +gmina.pl +gsm.pl +info.pl +mail.pl +miasta.pl +media.pl +mil.pl +net.pl +nieruchomosci.pl +nom.pl +org.pl +pc.pl +powiat.pl +priv.pl +realestate.pl +rel.pl +sex.pl +shop.pl +sklep.pl +sos.pl +szkola.pl +targi.pl +tm.pl +tourism.pl +travel.pl +turystyka.pl +// ICM functional domains (icm.edu.pl) +6bone.pl +art.pl +mbone.pl +// Government domains (administred by ippt.gov.pl) +gov.pl +uw.gov.pl +um.gov.pl +ug.gov.pl +upow.gov.pl +starostwo.gov.pl +so.gov.pl +sr.gov.pl +po.gov.pl +pa.gov.pl +// other functional domains +ngo.pl +irc.pl +usenet.pl +// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html +augustow.pl +babia-gora.pl +bedzin.pl +beskidy.pl +bialowieza.pl +bialystok.pl +bielawa.pl +bieszczady.pl +boleslawiec.pl +bydgoszcz.pl +bytom.pl +cieszyn.pl +czeladz.pl +czest.pl +dlugoleka.pl +elblag.pl +elk.pl +glogow.pl +gniezno.pl +gorlice.pl +grajewo.pl +ilawa.pl +jaworzno.pl +jelenia-gora.pl +jgora.pl +kalisz.pl +kazimierz-dolny.pl +karpacz.pl +kartuzy.pl +kaszuby.pl +katowice.pl +kepno.pl +ketrzyn.pl +klodzko.pl +kobierzyce.pl +kolobrzeg.pl +konin.pl +konskowola.pl +kutno.pl +lapy.pl +lebork.pl +legnica.pl +lezajsk.pl +limanowa.pl +lomza.pl +lowicz.pl +lubin.pl +lukow.pl +malbork.pl +malopolska.pl +mazowsze.pl +mazury.pl +mielec.pl +mielno.pl +mragowo.pl +naklo.pl +nowaruda.pl +nysa.pl +olawa.pl +olecko.pl +olkusz.pl +olsztyn.pl +opoczno.pl +opole.pl +ostroda.pl +ostroleka.pl +ostrowiec.pl +ostrowwlkp.pl +pila.pl +pisz.pl +podhale.pl +podlasie.pl +polkowice.pl +pomorze.pl +pomorskie.pl +prochowice.pl +pruszkow.pl +przeworsk.pl +pulawy.pl +radom.pl +rawa-maz.pl +rybnik.pl +rzeszow.pl +sanok.pl +sejny.pl +siedlce.pl +slask.pl +slupsk.pl +sosnowiec.pl +stalowa-wola.pl +skoczow.pl +starachowice.pl +stargard.pl +suwalki.pl +swidnica.pl +swiebodzin.pl +swinoujscie.pl +szczecin.pl +szczytno.pl +tarnobrzeg.pl +tgory.pl +turek.pl +tychy.pl +ustka.pl +walbrzych.pl +warmia.pl +warszawa.pl +waw.pl +wegrow.pl +wielun.pl +wlocl.pl +wloclawek.pl +wodzislaw.pl +wolomin.pl +wroclaw.pl +zachpomor.pl +zagan.pl +zarow.pl +zgora.pl +zgorzelec.pl +// TASK geographical domains (www.task.gda.pl/uslugi/dns) +gda.pl +gdansk.pl +gdynia.pl +med.pl +sopot.pl +// other geographical domains +gliwice.pl +krakow.pl +poznan.pl +wroc.pl +zakopane.pl + +// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +pm + +// pn : http://www.government.pn/PnRegistry/policies.htm +pn +gov.pn +co.pn +org.pn +edu.pn +net.pn + +// pr : http://www.nic.pr/index.asp?f=1 +pr +com.pr +net.pr +org.pr +gov.pr +edu.pr +isla.pr +pro.pr +biz.pr +info.pr +name.pr +// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr +est.pr +prof.pr +ac.pr + +// pro : http://www.nic.pro/support_faq.htm +pro +aca.pro +bar.pro +cpa.pro +jur.pro +law.pro +med.pro +eng.pro + +// ps : http://en.wikipedia.org/wiki/.ps +// http://www.nic.ps/registration/policy.html#reg +ps +edu.ps +gov.ps +sec.ps +plo.ps +com.ps +org.ps +net.ps + +// pt : http://online.dns.pt/dns/start_dns +pt +net.pt +gov.pt +org.pt +edu.pt +int.pt +publ.pt +com.pt +nome.pt + +// pw : http://en.wikipedia.org/wiki/.pw +pw +co.pw +ne.pw +or.pw +ed.pw +go.pw +belau.pw + +// py : http://www.nic.py/faq_a.html#faq_b +*.py + +// qa : http://domains.qa/en/ +qa +com.qa +edu.qa +gov.qa +mil.qa +name.qa +net.qa +org.qa +sch.qa + +// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs +re +com.re +asso.re +nom.re + +// ro : http://www.rotld.ro/ +ro +com.ro +org.ro +tm.ro +nt.ro +nom.ro +info.ro +rec.ro +arts.ro +firm.ro +store.ro +www.ro + +// rs : http://en.wikipedia.org/wiki/.rs +rs +co.rs +org.rs +edu.rs +ac.rs +gov.rs +in.rs + +// ru : http://www.cctld.ru/ru/docs/aktiv_8.php +// Industry domains +ru +ac.ru +com.ru +edu.ru +int.ru +net.ru +org.ru +pp.ru +// Geographical domains +adygeya.ru +altai.ru +amur.ru +arkhangelsk.ru +astrakhan.ru +bashkiria.ru +belgorod.ru +bir.ru +bryansk.ru +buryatia.ru +cbg.ru +chel.ru +chelyabinsk.ru +chita.ru +chukotka.ru +chuvashia.ru +dagestan.ru +dudinka.ru +e-burg.ru +grozny.ru +irkutsk.ru +ivanovo.ru +izhevsk.ru +jar.ru +joshkar-ola.ru +kalmykia.ru +kaluga.ru +kamchatka.ru +karelia.ru +kazan.ru +kchr.ru +kemerovo.ru +khabarovsk.ru +khakassia.ru +khv.ru +kirov.ru +koenig.ru +komi.ru +kostroma.ru +krasnoyarsk.ru +kuban.ru +kurgan.ru +kursk.ru +lipetsk.ru +magadan.ru +mari.ru +mari-el.ru +marine.ru +mordovia.ru +mosreg.ru +msk.ru +murmansk.ru +nalchik.ru +nnov.ru +nov.ru +novosibirsk.ru +nsk.ru +omsk.ru +orenburg.ru +oryol.ru +palana.ru +penza.ru +perm.ru +pskov.ru +ptz.ru +rnd.ru +ryazan.ru +sakhalin.ru +samara.ru +saratov.ru +simbirsk.ru +smolensk.ru +spb.ru +stavropol.ru +stv.ru +surgut.ru +tambov.ru +tatarstan.ru +tom.ru +tomsk.ru +tsaritsyn.ru +tsk.ru +tula.ru +tuva.ru +tver.ru +tyumen.ru +udm.ru +udmurtia.ru +ulan-ude.ru +vladikavkaz.ru +vladimir.ru +vladivostok.ru +volgograd.ru +vologda.ru +voronezh.ru +vrn.ru +vyatka.ru +yakutia.ru +yamal.ru +yaroslavl.ru +yekaterinburg.ru +yuzhno-sakhalinsk.ru +// More geographical domains +amursk.ru +baikal.ru +cmw.ru +fareast.ru +jamal.ru +kms.ru +k-uralsk.ru +kustanai.ru +kuzbass.ru +magnitka.ru +mytis.ru +nakhodka.ru +nkz.ru +norilsk.ru +oskol.ru +pyatigorsk.ru +rubtsovsk.ru +snz.ru +syzran.ru +vdonsk.ru +zgrad.ru +// State domains +gov.ru +mil.ru +// Technical domains +test.ru + +// rw : http://www.nic.rw/cgi-bin/policy.pl +rw +gov.rw +net.rw +edu.rw +ac.rw +com.rw +co.rw +int.rw +mil.rw +gouv.rw + +// sa : http://www.nic.net.sa/ +sa +com.sa +net.sa +org.sa +gov.sa +med.sa +pub.sa +edu.sa +sch.sa + +// sb : http://www.sbnic.net.sb/ +// Submitted by registry 2008-06-08 +sb +com.sb +edu.sb +gov.sb +net.sb +org.sb + +// sc : http://www.nic.sc/ +sc +com.sc +gov.sc +net.sc +org.sc +edu.sc + +// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm +// Submitted by registry 2008-06-17 +sd +com.sd +net.sd +org.sd +edu.sd +med.sd +gov.sd +info.sd + +// se : http://en.wikipedia.org/wiki/.se +// Submitted by registry 2008-06-24 +se +a.se +ac.se +b.se +bd.se +brand.se +c.se +d.se +e.se +f.se +fh.se +fhsk.se +fhv.se +g.se +h.se +i.se +k.se +komforb.se +kommunalforbund.se +komvux.se +l.se +lanbib.se +m.se +n.se +naturbruksgymn.se +o.se +org.se +p.se +parti.se +pp.se +press.se +r.se +s.se +sshn.se +t.se +tm.se +u.se +w.se +x.se +y.se +z.se + +// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html +sg +com.sg +net.sg +org.sg +gov.sg +edu.sg +per.sg + +// sh : http://www.nic.sh/rules.html +// list of 2nd level domains ? +sh + +// si : http://en.wikipedia.org/wiki/.si +si + +// sj : No registrations at this time. +// Submitted by registry 2008-06-16 + +// sk : http://en.wikipedia.org/wiki/.sk +// list of 2nd level domains ? +sk + +// sl : http://www.nic.sl +// Submitted by registry 2008-06-12 +sl +com.sl +net.sl +edu.sl +gov.sl +org.sl + +// sm : http://en.wikipedia.org/wiki/.sm +sm + +// sn : http://en.wikipedia.org/wiki/.sn +sn +art.sn +com.sn +edu.sn +gouv.sn +org.sn +perso.sn +univ.sn + +// so : http://www.soregistry.com/ +so +com.so +net.so +org.so + +// sr : http://en.wikipedia.org/wiki/.sr +sr + +// st : http://www.nic.st/html/policyrules/ +st +co.st +com.st +consulado.st +edu.st +embaixada.st +gov.st +mil.st +net.st +org.st +principe.st +saotome.st +store.st + +// su : http://en.wikipedia.org/wiki/.su +su + +// sv : http://www.svnet.org.sv/svpolicy.html +*.sv + +// sy : http://en.wikipedia.org/wiki/.sy +// see also: http://www.gobin.info/domainname/sy.doc +sy +edu.sy +gov.sy +net.sy +mil.sy +com.sy +org.sy + +// sz : http://en.wikipedia.org/wiki/.sz +// http://www.sispa.org.sz/ +sz +co.sz +ac.sz +org.sz + +// tc : http://en.wikipedia.org/wiki/.tc +tc + +// td : http://en.wikipedia.org/wiki/.td +td + +// tel: http://en.wikipedia.org/wiki/.tel +// http://www.telnic.org/ +tel + +// tf : http://en.wikipedia.org/wiki/.tf +tf + +// tg : http://en.wikipedia.org/wiki/.tg +// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains, +// although this contradicts wikipedia. +tg + +// th : http://en.wikipedia.org/wiki/.th +// Submitted by registry 2008-06-17 +th +ac.th +co.th +go.th +in.th +mi.th +net.th +or.th + +// tj : http://www.nic.tj/policy.htm +tj +ac.tj +biz.tj +co.tj +com.tj +edu.tj +go.tj +gov.tj +int.tj +mil.tj +name.tj +net.tj +nic.tj +org.tj +test.tj +web.tj + +// tk : http://en.wikipedia.org/wiki/.tk +tk + +// tl : http://en.wikipedia.org/wiki/.tl +tl +gov.tl + +// tm : http://www.nic.tm/rules.html +// list of 2nd level tlds ? +tm + +// tn : http://en.wikipedia.org/wiki/.tn +// http://whois.ati.tn/ +tn +com.tn +ens.tn +fin.tn +gov.tn +ind.tn +intl.tn +nat.tn +net.tn +org.tn +info.tn +perso.tn +tourism.tn +edunet.tn +rnrt.tn +rns.tn +rnu.tn +mincom.tn +agrinet.tn +defense.tn +turen.tn + +// to : http://en.wikipedia.org/wiki/.to +// Submitted by registry 2008-06-17 +to +com.to +gov.to +net.to +org.to +edu.to +mil.to + +// tr : http://en.wikipedia.org/wiki/.tr +*.tr +!nic.tr +// Used by government in the TRNC +// http://en.wikipedia.org/wiki/.nc.tr +gov.nc.tr + +// travel : http://en.wikipedia.org/wiki/.travel +travel + +// tt : http://www.nic.tt/ +tt +co.tt +com.tt +org.tt +net.tt +biz.tt +info.tt +pro.tt +int.tt +coop.tt +jobs.tt +mobi.tt +travel.tt +museum.tt +aero.tt +name.tt +gov.tt +edu.tt + +// tv : http://en.wikipedia.org/wiki/.tv +// Not listing any 2LDs as reserved since none seem to exist in practice, +// Wikipedia notwithstanding. +tv + +// tw : http://en.wikipedia.org/wiki/.tw +tw +edu.tw +gov.tw +mil.tw +com.tw +net.tw +org.tw +idv.tw +game.tw +ebiz.tw +club.tw +網路.tw +組織.tw +商業.tw + +// tz : http://en.wikipedia.org/wiki/.tz +// Submitted by registry 2008-06-17 +// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25 +ac.tz +co.tz +go.tz +mil.tz +ne.tz +or.tz +sc.tz + +// ua : http://www.nic.net.ua/ +ua +com.ua +edu.ua +gov.ua +in.ua +net.ua +org.ua +// ua geo-names +cherkassy.ua +chernigov.ua +chernovtsy.ua +ck.ua +cn.ua +crimea.ua +cv.ua +dn.ua +dnepropetrovsk.ua +donetsk.ua +dp.ua +if.ua +ivano-frankivsk.ua +kh.ua +kharkov.ua +kherson.ua +khmelnitskiy.ua +kiev.ua +kirovograd.ua +km.ua +kr.ua +ks.ua +kv.ua +lg.ua +lugansk.ua +lutsk.ua +lviv.ua +mk.ua +nikolaev.ua +od.ua +odessa.ua +pl.ua +poltava.ua +rovno.ua +rv.ua +sebastopol.ua +sumy.ua +te.ua +ternopil.ua +uzhgorod.ua +vinnica.ua +vn.ua +zaporizhzhe.ua +zp.ua +zhitomir.ua +zt.ua + +// Private registries in .ua +co.ua +pp.ua + +// ug : http://www.registry.co.ug/ +ug +co.ug +ac.ug +sc.ug +go.ug +ne.ug +or.ug + +// uk : http://en.wikipedia.org/wiki/.uk +*.uk +*.sch.uk +!bl.uk +!british-library.uk +!icnet.uk +!jet.uk +!mod.uk +!nel.uk +!nhs.uk +!nic.uk +!nls.uk +!national-library-scotland.uk +!parliament.uk +!police.uk + +// us : http://en.wikipedia.org/wiki/.us +us +dni.us +fed.us +isa.us +kids.us +nsn.us +// us geographic names +ak.us +al.us +ar.us +as.us +az.us +ca.us +co.us +ct.us +dc.us +de.us +fl.us +ga.us +gu.us +hi.us +ia.us +id.us +il.us +in.us +ks.us +ky.us +la.us +ma.us +md.us +me.us +mi.us +mn.us +mo.us +ms.us +mt.us +nc.us +nd.us +ne.us +nh.us +nj.us +nm.us +nv.us +ny.us +oh.us +ok.us +or.us +pa.us +pr.us +ri.us +sc.us +sd.us +tn.us +tx.us +ut.us +vi.us +vt.us +va.us +wa.us +wi.us +wv.us +wy.us +// The registrar notes several more specific domains available in each state, +// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat +// haphazard; in some states these domains resolve as addresses, while in others +// only subdomains are available, or even nothing at all. We include the +// most common ones where it's clear that different sites are different +// entities. +k12.ak.us +k12.al.us +k12.ar.us +k12.as.us +k12.az.us +k12.ca.us +k12.co.us +k12.ct.us +k12.dc.us +k12.de.us +k12.fl.us +k12.ga.us +k12.gu.us +// k12.hi.us Hawaii has a state-wide DOE login: bug 614565 +k12.ia.us +k12.id.us +k12.il.us +k12.in.us +k12.ks.us +k12.ky.us +k12.la.us +k12.ma.us +k12.md.us +k12.me.us +k12.mi.us +k12.mn.us +k12.mo.us +k12.ms.us +k12.mt.us +k12.nc.us +k12.nd.us +k12.ne.us +k12.nh.us +k12.nj.us +k12.nm.us +k12.nv.us +k12.ny.us +k12.oh.us +k12.ok.us +k12.or.us +k12.pa.us +k12.pr.us +k12.ri.us +k12.sc.us +k12.sd.us +k12.tn.us +k12.tx.us +k12.ut.us +k12.vi.us +k12.vt.us +k12.va.us +k12.wa.us +k12.wi.us +k12.wv.us +k12.wy.us + +cc.ak.us +cc.al.us +cc.ar.us +cc.as.us +cc.az.us +cc.ca.us +cc.co.us +cc.ct.us +cc.dc.us +cc.de.us +cc.fl.us +cc.ga.us +cc.gu.us +cc.hi.us +cc.ia.us +cc.id.us +cc.il.us +cc.in.us +cc.ks.us +cc.ky.us +cc.la.us +cc.ma.us +cc.md.us +cc.me.us +cc.mi.us +cc.mn.us +cc.mo.us +cc.ms.us +cc.mt.us +cc.nc.us +cc.nd.us +cc.ne.us +cc.nh.us +cc.nj.us +cc.nm.us +cc.nv.us +cc.ny.us +cc.oh.us +cc.ok.us +cc.or.us +cc.pa.us +cc.pr.us +cc.ri.us +cc.sc.us +cc.sd.us +cc.tn.us +cc.tx.us +cc.ut.us +cc.vi.us +cc.vt.us +cc.va.us +cc.wa.us +cc.wi.us +cc.wv.us +cc.wy.us + +lib.ak.us +lib.al.us +lib.ar.us +lib.as.us +lib.az.us +lib.ca.us +lib.co.us +lib.ct.us +lib.dc.us +lib.de.us +lib.fl.us +lib.ga.us +lib.gu.us +lib.hi.us +lib.ia.us +lib.id.us +lib.il.us +lib.in.us +lib.ks.us +lib.ky.us +lib.la.us +lib.ma.us +lib.md.us +lib.me.us +lib.mi.us +lib.mn.us +lib.mo.us +lib.ms.us +lib.mt.us +lib.nc.us +lib.nd.us +lib.ne.us +lib.nh.us +lib.nj.us +lib.nm.us +lib.nv.us +lib.ny.us +lib.oh.us +lib.ok.us +lib.or.us +lib.pa.us +lib.pr.us +lib.ri.us +lib.sc.us +lib.sd.us +lib.tn.us +lib.tx.us +lib.ut.us +lib.vi.us +lib.vt.us +lib.va.us +lib.wa.us +lib.wi.us +lib.wv.us +lib.wy.us + +// k12.ma.us contains school districts in Massachusetts. The 4LDs are +// managed indepedently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated dorectly to the +// 5LD operators. +pvt.k12.ma.us +chtr.k12.ma.us +paroch.k12.ma.us + +// uy : http://www.antel.com.uy/ +*.uy + +// uz : http://www.reg.uz/registerr.html +// are there other 2nd level tlds ? +uz +com.uz +co.uz + +// va : http://en.wikipedia.org/wiki/.va +va + +// vc : http://en.wikipedia.org/wiki/.vc +// Submitted by registry 2008-06-13 +vc +com.vc +net.vc +org.vc +gov.vc +mil.vc +edu.vc + +// ve : http://registro.nic.ve/nicve/registro/index.html +*.ve + +// vg : http://en.wikipedia.org/wiki/.vg +vg + +// vi : http://www.nic.vi/newdomainform.htm +// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other +// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they +// are available for registration (which they do not seem to be). +vi +co.vi +com.vi +k12.vi +net.vi +org.vi + +// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp +vn +com.vn +net.vn +org.vn +edu.vn +gov.vn +int.vn +ac.vn +biz.vn +info.vn +name.vn +pro.vn +health.vn + +// vu : http://en.wikipedia.org/wiki/.vu +// list of 2nd level tlds ? +vu + +// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +wf + +// ws : http://en.wikipedia.org/wiki/.ws +// http://samoanic.ws/index.dhtml +ws +com.ws +net.ws +org.ws +gov.ws +edu.ws + +// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +yt + +// IDN ccTLDs +// Please sort by ISO 3166 ccTLD, then punicode string +// when submitting patches and follow this format: +// ("" ) : +// [optional sponsoring org] +// + +// xn--mgbaam7a8h ("Emerat" Arabic) : AE +//http://nic.ae/english/arabicdomain/rules.jsp +امارات + +// xn--54b7fta0cc ("Bangla" Bangla) : BD +বাংলা + +// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +中国 + +// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +中國 + +// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ +الجزائر + +// xn--wgbh1c ("Egypt" Arabic .masr) : EG +// http://www.dotmasr.eg/ +مصر + +// xn--node ("ge" Georgian (Mkhedruli)) : GE +გე + +// xn--j6w193g ("Hong Kong" Chinese-Han) : HK +// https://www2.hkirc.hk/register/rules.jsp +香港 + +// xn--h2brj9c ("Bharat" Devanagari) : IN +// India +भारत + +// xn--mgbbh1a71e ("Bharat" Arabic) : IN +// India +بھارت + +// xn--fpcrj9c3d ("Bharat" Telugu) : IN +// India +భారత్ + +// xn--gecrj9c ("Bharat" Gujarati) : IN +// India +ભારત + +// xn--s9brj9c ("Bharat" Gurmukhi) : IN +// India +ਭਾਰਤ + +// xn--45brj9c ("Bharat" Bengali) : IN +// India +ভারত + +// xn--xkc2dl3a5ee0h ("India" Tamil) : IN +// India +இந்தியா + +// xn--mgba3a4f16a ("Iran" Persian) : IR +ایران + +// xn--mgba3a4fra ("Iran" Arabic) : IR +ايران + +//xn--mgbayh7gpa ("al-Ordon" Arabic) JO +//National Information Technology Center (NITC) +//Royal Scientific Society, Al-Jubeiha +الاردن + +// xn--3e0b707e ("Republic of Korea" Hangul) : KR +한국 + +// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK +// http://nic.lk +ලංකා + +// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK +// http://nic.lk +இலங்கை + +// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA +المغرب + +// xn--mgb9awbf ("Oman" Arabic) : OM +عمان + +// xn--ygbi2ammx ("Falasteen" Arabic) : PS +// The Palestinian National Internet Naming Authority (PNINA) +// http://www.pnina.ps +فلسطين + +// xn--90a3ac ("srb" Cyrillic) : RS +срб + +// xn--p1ai ("rf" Russian-Cyrillic) : RU +// http://www.cctld.ru/en/docs/rulesrf.php +рф + +// xn--wgbl6a ("Qatar" Arabic) : QA +// http://www.ict.gov.qa/ +قطر + +// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA +// http://www.nic.net.sa/ +السعودية + +// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA +السعودیة + +// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA +السعودیۃ + +// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA +السعوديه + +// xn--ogbpf8fl ("Syria" Arabic) : SY +سورية + +// xn--mgbtf8fl ("Syria" Arabic) variant : SY +سوريا + +// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG +新加坡 + +// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG +சிங்கப்பூர் + +// xn--o3cw4h ("Thai" Thai) : TH +// http://www.thnic.co.th +ไทย + +// xn--pgbs0dh ("Tunis") : TN +// http://nic.tn +تونس + +// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台灣 + +// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台湾 + +// xn--nnx388a ("Taiwan") variant : TW +臺灣 + +// xn--j1amh ("ukr" Cyrillic) : UA +укр + +// xn--mgb2ddes ("AlYemen" Arabic) : YE +اليمن + +// xxx : http://icmregistry.com +xxx + +// ye : http://www.y.net.ye/services/domain_name.htm +*.ye + +// za : http://www.zadna.org.za/slds.html +*.za + +// zm : http://en.wikipedia.org/wiki/.zm +*.zm + +// zw : http://en.wikipedia.org/wiki/.zw +*.zw + +// ===END ICANN DOMAINS=== +// ===BEGIN PRIVATE DOMAINS=== + +// info.at : http://www.info.at/ +biz.at +info.at + +// priv.at : http://www.nic.priv.at/ +// Submitted by registry 2008-06-09 +priv.at + +// co.ca : http://registry.co.ca +co.ca + +// CentralNic : http://www.centralnic.com/names/domains +// Confirmed by registry 2008-06-09 +ar.com +br.com +cn.com +de.com +eu.com +gb.com +gr.com +hu.com +jpn.com +kr.com +no.com +qc.com +ru.com +sa.com +se.com +uk.com +us.com +uy.com +za.com +gb.net +jp.net +se.net +uk.net +ae.org +us.org +com.de + +// Opera Software, A.S.A. +// Requested by Yngve Pettersen 2009-11-26 +operaunite.com + +// Google, Inc. +// Requested by Eduardo Vela 2010-09-06 +appspot.com + +// iki.fi : Submitted by Hannu Aronsson 2009-11-05 +iki.fi + +// c.la : http://www.c.la/ +c.la + +// ZaNiC : http://www.za.net/ +// Confirmed by registry 2009-10-03 +za.net +za.org + +// CoDNS B.V. +// Added 2010-05-23. +co.nl +co.no + +// Mainseek Sp. z o.o. : http://www.co.pl/ +co.pl + +// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ +dyndns-at-home.com +dyndns-at-work.com +dyndns-blog.com +dyndns-free.com +dyndns-home.com +dyndns-ip.com +dyndns-mail.com +dyndns-office.com +dyndns-pics.com +dyndns-remote.com +dyndns-server.com +dyndns-web.com +dyndns-wiki.com +dyndns-work.com +dyndns.biz +dyndns.info +dyndns.org +dyndns.tv +at-band-camp.net +ath.cx +barrel-of-knowledge.info +barrell-of-knowledge.info +better-than.tv +blogdns.com +blogdns.net +blogdns.org +blogsite.org +boldlygoingnowhere.org +broke-it.net +buyshouses.net +cechire.com +dnsalias.com +dnsalias.net +dnsalias.org +dnsdojo.com +dnsdojo.net +dnsdojo.org +does-it.net +doesntexist.com +doesntexist.org +dontexist.com +dontexist.net +dontexist.org +doomdns.com +doomdns.org +dvrdns.org +dyn-o-saur.com +dynalias.com +dynalias.net +dynalias.org +dynathome.net +dyndns.ws +endofinternet.net +endofinternet.org +endoftheinternet.org +est-a-la-maison.com +est-a-la-masion.com +est-le-patron.com +est-mon-blogueur.com +for-better.biz +for-more.biz +for-our.info +for-some.biz +for-the.biz +forgot.her.name +forgot.his.name +from-ak.com +from-al.com +from-ar.com +from-az.net +from-ca.com +from-co.net +from-ct.com +from-dc.com +from-de.com +from-fl.com +from-ga.com +from-hi.com +from-ia.com +from-id.com +from-il.com +from-in.com +from-ks.com +from-ky.com +from-la.net +from-ma.com +from-md.com +from-me.org +from-mi.com +from-mn.com +from-mo.com +from-ms.com +from-mt.com +from-nc.com +from-nd.com +from-ne.com +from-nh.com +from-nj.com +from-nm.com +from-nv.com +from-ny.net +from-oh.com +from-ok.com +from-or.com +from-pa.com +from-pr.com +from-ri.com +from-sc.com +from-sd.com +from-tn.com +from-tx.com +from-ut.com +from-va.com +from-vt.com +from-wa.com +from-wi.com +from-wv.com +from-wy.com +ftpaccess.cc +fuettertdasnetz.de +game-host.org +game-server.cc +getmyip.com +gets-it.net +go.dyndns.org +gotdns.com +gotdns.org +groks-the.info +groks-this.info +ham-radio-op.net +here-for-more.info +hobby-site.com +hobby-site.org +home.dyndns.org +homedns.org +homeftp.net +homeftp.org +homeip.net +homelinux.com +homelinux.net +homelinux.org +homeunix.com +homeunix.net +homeunix.org +iamallama.com +in-the-band.net +is-a-anarchist.com +is-a-blogger.com +is-a-bookkeeper.com +is-a-bruinsfan.org +is-a-bulls-fan.com +is-a-candidate.org +is-a-caterer.com +is-a-celticsfan.org +is-a-chef.com +is-a-chef.net +is-a-chef.org +is-a-conservative.com +is-a-cpa.com +is-a-cubicle-slave.com +is-a-democrat.com +is-a-designer.com +is-a-doctor.com +is-a-financialadvisor.com +is-a-geek.com +is-a-geek.net +is-a-geek.org +is-a-green.com +is-a-guru.com +is-a-hard-worker.com +is-a-hunter.com +is-a-knight.org +is-a-landscaper.com +is-a-lawyer.com +is-a-liberal.com +is-a-libertarian.com +is-a-linux-user.org +is-a-llama.com +is-a-musician.com +is-a-nascarfan.com +is-a-nurse.com +is-a-painter.com +is-a-patsfan.org +is-a-personaltrainer.com +is-a-photographer.com +is-a-player.com +is-a-republican.com +is-a-rockstar.com +is-a-socialist.com +is-a-soxfan.org +is-a-student.com +is-a-teacher.com +is-a-techie.com +is-a-therapist.com +is-an-accountant.com +is-an-actor.com +is-an-actress.com +is-an-anarchist.com +is-an-artist.com +is-an-engineer.com +is-an-entertainer.com +is-by.us +is-certified.com +is-found.org +is-gone.com +is-into-anime.com +is-into-cars.com +is-into-cartoons.com +is-into-games.com +is-leet.com +is-lost.org +is-not-certified.com +is-saved.org +is-slick.com +is-uberleet.com +is-very-bad.org +is-very-evil.org +is-very-good.org +is-very-nice.org +is-very-sweet.org +is-with-theband.com +isa-geek.com +isa-geek.net +isa-geek.org +isa-hockeynut.com +issmarterthanyou.com +isteingeek.de +istmein.de +kicks-ass.net +kicks-ass.org +knowsitall.info +land-4-sale.us +lebtimnetz.de +leitungsen.de +likes-pie.com +likescandy.com +merseine.nu +mine.nu +misconfused.org +mypets.ws +myphotos.cc +neat-url.com +office-on-the.net +on-the-web.tv +podzone.net +podzone.org +readmyblog.org +saves-the-whales.com +scrapper-site.net +scrapping.cc +selfip.biz +selfip.com +selfip.info +selfip.net +selfip.org +sells-for-less.com +sells-for-u.com +sells-it.net +sellsyourhome.org +servebbs.com +servebbs.net +servebbs.org +serveftp.net +serveftp.org +servegame.org +shacknet.nu +simple-url.com +space-to-rent.com +stuff-4-sale.org +stuff-4-sale.us +teaches-yoga.com +thruhere.net +traeumtgerade.de +webhop.biz +webhop.info +webhop.net +webhop.org +worse-than.tv +writesthisblog.com + +// ===END PRIVATE DOMAINS=== diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js new file mode 100644 index 00000000..3cce815e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js @@ -0,0 +1,1340 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +var vows = require('vows'); +var assert = require('assert'); +var async = require('async'); + +// NOTE use require("tough-cookie") in your own code: +var tough = require('./lib/cookie'); +var Cookie = tough.Cookie; +var CookieJar = tough.CookieJar; + + +function dateVows(table) { + var theVows = { }; + var keys = Object.keys(table).forEach(function(date) { + var expect = table[date]; + theVows[date] = function() { + var got = tough.parseDate(date) ? 'valid' : 'invalid'; + assert.equal(got, expect ? 'valid' : 'invalid'); + }; + }); + return { "date parsing": theVows }; +} + +function matchVows(func,table) { + var theVows = {}; + table.forEach(function(item) { + var str = item[0]; + var dom = item[1]; + var expect = item[2]; + var label = str+(expect?" matches ":" doesn't match ")+dom; + theVows[label] = function() { + assert.equal(func(str,dom),expect); + }; + }); + return theVows; +} + +function defaultPathVows(table) { + var theVows = {}; + table.forEach(function(item) { + var str = item[0]; + var expect = item[1]; + var label = str+" gives "+expect; + theVows[label] = function() { + assert.equal(tough.defaultPath(str),expect); + }; + }); + return theVows; +} + +var atNow = Date.now(); +function at(offset) { return {now: new Date(atNow+offset)} } + +vows.describe('Cookie Jar') +.addBatch({ + "all defined": function() { + assert.ok(Cookie); + assert.ok(CookieJar); + }, +}) +.addBatch( + dateVows({ + "Wed, 09 Jun 2021 10:18:14 GMT": true, + "Wed, 09 Jun 2021 22:18:14 GMT": true, + "Tue, 18 Oct 2011 07:42:42.123 GMT": true, + "18 Oct 2011 07:42:42 GMT": true, + "8 Oct 2011 7:42:42 GMT": true, + "8 Oct 2011 7:2:42 GMT": false, + "Oct 18 2011 07:42:42 GMT": true, + "Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)": true, + "09 Jun 2021 10:18:14 GMT": true, + "99 Jix 3038 48:86:72 ZMT": false, + '01 Jan 1970 00:00:00 GMT': true, + '01 Jan 1600 00:00:00 GMT': false, // before 1601 + '01 Jan 1601 00:00:00 GMT': true, + '10 Feb 81 13:00:00 GMT': true, // implicit year + 'Thu, 01 Jan 1970 00:00:010 GMT': true, // strange time, non-strict OK + 'Thu, 17-Apr-2014 02:12:29 GMT': true, // dashes + 'Thu, 17-Apr-2014 02:12:29 UTC': true, // dashes and UTC + }) +) +.addBatch({ + "strict date parse of Thu, 01 Jan 1970 00:00:010 GMT": { + topic: function() { + return tough.parseDate('Thu, 01 Jan 1970 00:00:010 GMT', true) ? true : false; + }, + "invalid": function(date) { + assert.equal(date,false); + }, + } +}) +.addBatch({ + "formatting": { + "a simple cookie": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b'); + }, + }, + "a cookie with spaces in the value": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'beta gamma'; + return c; + }, + "doesn't validate": function(c) { + assert.ok(!c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a="beta gamma"'); + }, + }, + "with an empty value and HttpOnly": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.httpOnly = true; + return c; + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=; HttpOnly'); + } + }, + "with an expiry": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT'); + }, + "to short string": function(c) { + assert.equal(c.cookieString(), 'a=b'); + }, + }, + "with a max-age": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + c.maxAge = 12345; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); // mabe this one *shouldn't*? + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345'); + }, + }, + "with a bunch of things": function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + c.maxAge = 12345; + c.domain = 'example.com'; + c.path = '/foo'; + c.secure = true; + c.httpOnly = true; + c.extensions = ['MyExtension']; + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345; Domain=example.com; Path=/foo; Secure; HttpOnly; MyExtension'); + }, + "a host-only cookie": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.hostOnly = true; + c.domain = 'shouldnt-stringify.example.com'; + c.path = '/should-stringify'; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Path=/should-stringify'); + }, + }, + "minutes are '10'": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.expires = new Date(1284113410000); + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + var str = c.toString(); + assert.notEqual(str, 'a=b; Expires=Fri, 010 Sep 2010 010:010:010 GMT'); + assert.equal(str, 'a=b; Expires=Fri, 10 Sep 2010 10:10:10 GMT'); + }, + } + } +}) +.addBatch({ + "TTL with max-age": function() { + var c = new Cookie(); + c.maxAge = 123; + assert.equal(c.TTL(), 123000); + assert.equal(c.expiryTime(new Date(9000000)), 9123000); + }, + "TTL with zero max-age": function() { + var c = new Cookie(); + c.key = 'a'; c.value = 'b'; + c.maxAge = 0; // should be treated as "earliest representable" + assert.equal(c.TTL(), 0); + assert.equal(c.expiryTime(new Date(9000000)), -Infinity); + assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT + }, + "TTL with negative max-age": function() { + var c = new Cookie(); + c.key = 'a'; c.value = 'b'; + c.maxAge = -1; // should be treated as "earliest representable" + assert.equal(c.TTL(), 0); + assert.equal(c.expiryTime(new Date(9000000)), -Infinity); + assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT + }, + "TTL with max-age and expires": function() { + var c = new Cookie(); + c.maxAge = 123; + c.expires = new Date(Date.now()+9000); + assert.equal(c.TTL(), 123000); + assert.ok(c.isPersistent()); + }, + "TTL with expires": function() { + var c = new Cookie(); + var now = Date.now(); + c.expires = new Date(now+9000); + assert.equal(c.TTL(now), 9000); + assert.equal(c.expiryTime(), c.expires.getTime()); + }, + "TTL with old expires": function() { + var c = new Cookie(); + c.setExpires('17 Oct 2010 00:00:00 GMT'); + assert.ok(c.TTL() < 0); + assert.ok(c.isPersistent()); + }, + "default TTL": { + topic: function() { return new Cookie() }, + "is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) }, + "is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) }, + }, +}).addBatch({ + "Parsing": { + "simple": { + topic: function() { + return Cookie.parse('a=bcd',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'a') }, + "value": function(c) { assert.equal(c.value, 'bcd') }, + "no path": function(c) { assert.equal(c.path, null) }, + "no domain": function(c) { assert.equal(c.domain, null) }, + "no extensions": function(c) { assert.ok(!c.extensions) }, + }, + "with expiry": { + topic: function() { + return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'a') }, + "value": function(c) { assert.equal(c.value, 'bcd') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + }, + "with expiry and path": { + topic: function() { + return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'abc') }, + "value": function(c) { assert.equal(c.value, 'xyzzy!') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + "has path": function(c) { assert.equal(c.path, '/aBc'); }, + "no httponly or secure": function(c) { + assert.ok(!c.httpOnly); + assert.ok(!c.secure); + }, + }, + "with everything": { + topic: function() { + return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz', true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'abc') }, + "value": function(c) { assert.equal(c.value, 'xyzzy!') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + "has path": function(c) { assert.equal(c.path, '/aBc'); }, + "has domain": function(c) { assert.equal(c.domain, 'example.com'); }, + "has httponly": function(c) { assert.equal(c.httpOnly, true); }, + "has secure": function(c) { assert.equal(c.secure, true); }, + "has max-age": function(c) { assert.equal(c.maxAge, 1234); }, + "has extensions": function(c) { + assert.ok(c.extensions); + assert.equal(c.extensions[0], 'Foo=Bar'); + assert.equal(c.extensions[1], 'Baz'); + }, + }, + "invalid expires": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Expires=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Expires=xyzzy"); + assert.ok(c); + assert.equal(c.expires, Infinity); + }, + }, + "zero max-age": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=0", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Max-Age=0"); + assert.ok(c); + assert.equal(c.maxAge, 0); + }, + }, + "negative max-age": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=-1", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Max-Age=-1"); + assert.ok(c); + assert.equal(c.maxAge, -1); + }, + }, + "empty domain": { + "strict": function() { assert.ok(!Cookie.parse("a=b; domain=", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; domain="); + assert.ok(c); + assert.equal(c.domain, null); + }, + }, + "dot domain": { + "strict": function() { assert.ok(!Cookie.parse("a=b; domain=.", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; domain=."); + assert.ok(c); + assert.equal(c.domain, null); + }, + }, + "uppercase domain": { + "strict lowercases": function() { + var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); + assert.ok(c); + assert.equal(c.domain, 'example.com'); + }, + "non-strict lowercases": function() { + var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); + assert.ok(c); + assert.equal(c.domain, 'example.com'); + }, + }, + "trailing dot in domain": { + topic: function() { + return Cookie.parse("a=b; Domain=example.com.", true) || null; + }, + "has the domain": function(c) { assert.equal(c.domain,"example.com.") }, + "but doesn't validate": function(c) { assert.equal(c.validate(),false) }, + }, + "empty path": { + "strict": function() { assert.ok(!Cookie.parse("a=b; path=", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; path="); + assert.ok(c); + assert.equal(c.path, null); + }, + }, + "no-slash path": { + "strict": function() { assert.ok(!Cookie.parse("a=b; path=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; path=xyzzy"); + assert.ok(c); + assert.equal(c.path, null); + }, + }, + "trailing semi-colons after path": { + topic: function () { + return [ + "a=b; path=/;", + "c=d;;;;" + ]; + }, + "strict": function (t) { + assert.ok(!Cookie.parse(t[0], true)); + assert.ok(!Cookie.parse(t[1], true)); + }, + "non-strict": function (t) { + var c1 = Cookie.parse(t[0]); + var c2 = Cookie.parse(t[1]); + assert.ok(c1); + assert.ok(c2); + assert.equal(c1.path, '/'); + } + }, + "secure-with-value": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Secure=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Secure=xyzzy"); + assert.ok(c); + assert.equal(c.secure, true); + }, + }, + "httponly-with-value": { + "strict": function() { assert.ok(!Cookie.parse("a=b; HttpOnly=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; HttpOnly=xyzzy"); + assert.ok(c); + assert.equal(c.httpOnly, true); + }, + }, + "garbage": { + topic: function() { + return Cookie.parse("\x08", true) || null; + }, + "doesn't parse": function(c) { assert.equal(c,null) }, + }, + "public suffix domain": { + topic: function() { + return Cookie.parse("a=b; domain=kyoto.jp", true) || null; + }, + "parses fine": function(c) { + assert.ok(c); + assert.equal(c.domain, 'kyoto.jp'); + }, + "but fails validation": function(c) { + assert.ok(c); + assert.ok(!c.validate()); + }, + }, + "Ironically, Google 'GAPS' cookie has very little whitespace": { + topic: function() { + return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly"); + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'GAPS') }, + "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') }, + "path": function(c) { + assert.notEqual(c.path, '/;Expires'); // BUG + assert.equal(c.path, '/'); + }, + "expires": function(c) { + assert.notEqual(c.expires, Infinity); + assert.equal(c.expires.getTime(), 1397700749000); + }, + "secure": function(c) { assert.ok(c.secure) }, + "httponly": function(c) { assert.ok(c.httpOnly) }, + }, + "lots of equal signs": { + topic: function() { + return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly"); + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'queryPref') }, + "value": function(c) { assert.equal(c.value, 'b=c&d=e') }, + "path": function(c) { + assert.equal(c.path, '/f=g'); + }, + "expires": function(c) { + assert.notEqual(c.expires, Infinity); + assert.equal(c.expires.getTime(), 1397700749000); + }, + "httponly": function(c) { assert.ok(c.httpOnly) }, + } + } +}) +.addBatch({ + "domain normalization": { + "simple": function() { + var c = new Cookie(); + c.domain = "EXAMPLE.com"; + assert.equal(c.canonicalizedDomain(), "example.com"); + }, + "extra dots": function() { + var c = new Cookie(); + c.domain = ".EXAMPLE.com"; + assert.equal(c.cdomain(), "example.com"); + }, + "weird trailing dot": function() { + var c = new Cookie(); + c.domain = "EXAMPLE.ca."; + assert.equal(c.canonicalizedDomain(), "example.ca."); + }, + "weird internal dots": function() { + var c = new Cookie(); + c.domain = "EXAMPLE...ca."; + assert.equal(c.canonicalizedDomain(), "example...ca."); + }, + "IDN": function() { + var c = new Cookie(); + c.domain = "δοκιμή.δοκιμή"; // "test.test" in greek + assert.equal(c.canonicalizedDomain(), "xn--jxalpdlp.xn--jxalpdlp"); + } + } +}) +.addBatch({ + "Domain Match":matchVows(tough.domainMatch, [ + // str, dom, expect + ["example.com", "example.com", true], + ["eXaMpLe.cOm", "ExAmPlE.CoM", true], + ["no.ca", "yes.ca", false], + ["wwwexample.com", "example.com", false], + ["www.example.com", "example.com", true], + ["example.com", "www.example.com", false], + ["www.subdom.example.com", "example.com", true], + ["www.subdom.example.com", "subdom.example.com", true], + ["example.com", "example.com.", false], // RFC6265 S4.1.2.3 + ["192.168.0.1", "168.0.1", false], // S5.1.3 "The string is a host name" + [null, "example.com", null], + ["example.com", null, null], + [null, null, null], + [undefined, undefined, null], + ]) +}) +.addBatch({ + "default-path": defaultPathVows([ + [null,"/"], + ["/","/"], + ["/file","/"], + ["/dir/file","/dir"], + ["noslash","/"], + ]) +}) +.addBatch({ + "Path-Match": matchVows(tough.pathMatch, [ + // request, cookie, match + ["/","/",true], + ["/dir","/",true], + ["/","/dir",false], + ["/dir/","/dir/", true], + ["/dir/file","/dir/",true], + ["/dir/file","/dir",true], + ["/directory","/dir",false], + ]) +}) +.addBatch({ + "Cookie Sorting": { + topic: function() { + var cookies = []; + var now = Date.now(); + cookies.push(Cookie.parse("a=0; Domain=example.com")); + cookies.push(Cookie.parse("b=1; Domain=www.example.com")); + cookies.push(Cookie.parse("c=2; Domain=example.com; Path=/pathA")); + cookies.push(Cookie.parse("d=3; Domain=www.example.com; Path=/pathA")); + cookies.push(Cookie.parse("e=4; Domain=example.com; Path=/pathA/pathB")); + cookies.push(Cookie.parse("f=5; Domain=www.example.com; Path=/pathA/pathB")); + + // force a stable creation time consistent with the order above since + // some may have been created at now + 1ms. + var i = cookies.length; + cookies.forEach(function(cookie) { + cookie.creation = new Date(now - 100*(i--)); + }); + + // weak shuffle: + cookies = cookies.sort(function(){return Math.random()-0.5}); + + cookies = cookies.sort(tough.cookieCompare); + return cookies; + }, + "got": function(cookies) { + assert.lengthOf(cookies, 6); + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['e','f','c','d','a','b']); + }, + } +}) +.addBatch({ + "CookieJar": { + "Setting a basic cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "works": function(c) { assert.instanceOf(c,Cookie) }, // C is for Cookie, good enough for me + "gets timestamped": function(c) { + assert.ok(c.creation); + assert.ok(Date.now() - c.creation.getTime() < 5000); // recently stamped + assert.ok(c.lastAccessed); + assert.equal(c.creation, c.lastAccessed); + assert.equal(c.TTL(), Infinity); + assert.ok(!c.isPersistent()); + }, + }, + "Setting a no-path cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "domain": function(c) { assert.equal(c.domain, 'example.com') }, + "path is /": function(c) { assert.equal(c.path, '/') }, + "path was derived": function(c) { assert.strictEqual(c.pathIsDefault, true) }, + }, + "Setting a cookie already marked as host-only": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + c.hostOnly = true; + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "domain": function(c) { assert.equal(c.domain, 'example.com') }, + "still hostOnly": function(c) { assert.strictEqual(c.hostOnly, true) }, + }, + "Setting a session cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b"); + assert.strictEqual(c.path, null); + cj.setCookie(c, 'http://www.example.com/dir/index.html', this.callback); + }, + "works": function(c) { assert.instanceOf(c,Cookie) }, + "gets the domain": function(c) { assert.equal(c.domain, 'www.example.com') }, + "gets the default path": function(c) { assert.equal(c.path, '/dir') }, + "is 'hostOnly'": function(c) { assert.ok(c.hostOnly) }, + }, + "Setting wrong domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=fooxample.com; Path=/"); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "fails": function(err,c) { + assert.ok(err.message.match(/domain/i)); + assert.ok(!c); + }, + }, + "Setting sub-domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=www.example.com; Path=/"); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "fails": function(err,c) { + assert.ok(err.message.match(/domain/i)); + assert.ok(!c); + }, + }, + "Setting super-domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/"); + cj.setCookie(c, 'http://www.app.example.com/index.html', this.callback); + }, + "success": function(err,c) { + assert.ok(!err); + assert.equal(c.domain, 'example.com'); + }, + }, + "Setting HttpOnly cookie over non-HTTP API": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/; HttpOnly"); + cj.setCookie(c, 'http://example.com/index.html', {http:false}, this.callback); + }, + "fails": function(err,c) { + assert.match(err.message, /HttpOnly/i); + assert.ok(!c); + }, + }, + }, + "Cookie Jar store eight cookies": { + topic: function() { + var cj = new CookieJar(); + var ex = 'http://example.com/index.html'; + var tasks = []; + tasks.push(function(next) { + cj.setCookie('a=1; Domain=example.com; Path=/',ex,at(0),next); + }); + tasks.push(function(next) { + cj.setCookie('b=2; Domain=example.com; Path=/; HttpOnly',ex,at(1000),next); + }); + tasks.push(function(next) { + cj.setCookie('c=3; Domain=example.com; Path=/; Secure',ex,at(2000),next); + }); + tasks.push(function(next) { // path + cj.setCookie('d=4; Domain=example.com; Path=/foo',ex,at(3000),next); + }); + tasks.push(function(next) { // host only + cj.setCookie('e=5',ex,at(4000),next); + }); + tasks.push(function(next) { // other domain + cj.setCookie('f=6; Domain=nodejs.org; Path=/','http://nodejs.org',at(5000),next); + }); + tasks.push(function(next) { // expired + cj.setCookie('g=7; Domain=example.com; Path=/; Expires=Tue, 18 Oct 2011 00:00:00 GMT',ex,at(6000),next); + }); + tasks.push(function(next) { // expired via Max-Age + cj.setCookie('h=8; Domain=example.com; Path=/; Max-Age=1',ex,next); + }); + var cb = this.callback; + async.parallel(tasks, function(err,results){ + setTimeout(function() { + cb(err,cj,results); + }, 2000); // so that 'h=8' expires + }); + }, + "setup ok": function(err,cj,results) { + assert.ok(1); + }, + "then retrieving for http://nodejs.org": { + topic: function(cj,results) { + cj.getCookies('http://nodejs.org',this.callback); + }, + "get a nodejs cookie": function(cookies) { + assert.lengthOf(cookies, 1); + var cookie = cookies[0]; + assert.equal(cookie.domain, 'nodejs.org'); + }, + }, + "then retrieving for https://example.com": { + topic: function(cj,results) { + cj.getCookies('https://example.com',{secure:true},this.callback); + }, + "get a secure example cookie with others": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','c','e']); + }, + }, + "then retrieving for https://example.com (missing options)": { + topic: function(cj,results) { + cj.getCookies('https://example.com',this.callback); + }, + "get a secure example cookie with others": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','c','e']); + }, + }, + "then retrieving for http://example.com": { + topic: function(cj,results) { + cj.getCookies('http://example.com',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','e']); + }, + }, + "then retrieving for http://EXAMPlE.com": { + topic: function(cj,results) { + cj.getCookies('http://EXAMPlE.com',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','e']); + }, + }, + "then retrieving for http://example.com, non-HTTP": { + topic: function(cj,results) { + cj.getCookies('http://example.com',{http:false},this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','e']); + }, + }, + "then retrieving for http://example.com/foo/bar": { + topic: function(cj,results) { + cj.getCookies('http://example.com/foo/bar',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['d','a','b','e']); + }, + }, + "then retrieving for http://example.com as a string": { + topic: function(cj,results) { + cj.getCookieString('http://example.com',this.callback); + }, + "get a single string": function(cookieHeader) { + assert.equal(cookieHeader, "a=1; b=2; e=5"); + }, + }, + "then retrieving for http://example.com as a set-cookie header": { + topic: function(cj,results) { + cj.getSetCookieStrings('http://example.com',this.callback); + }, + "get a single string": function(cookieHeaders) { + assert.lengthOf(cookieHeaders, 3); + assert.equal(cookieHeaders[0], "a=1; Domain=example.com; Path=/"); + assert.equal(cookieHeaders[1], "b=2; Domain=example.com; Path=/; HttpOnly"); + assert.equal(cookieHeaders[2], "e=5; Path=/"); + }, + }, + "then retrieving for http://www.example.com/": { + topic: function(cj,results) { + cj.getCookies('http://www.example.com/foo/bar',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['d','a','b']); // note lack of 'e' + }, + }, + }, + "Repeated names": { + topic: function() { + var cb = this.callback; + var cj = new CookieJar(); + var ex = 'http://www.example.com/'; + var sc = cj.setCookie; + var tasks = []; + var now = Date.now(); + tasks.push(sc.bind(cj,'aaaa=xxxx',ex,at(0))); + tasks.push(sc.bind(cj,'aaaa=1111; Domain=www.example.com',ex,at(1000))); + tasks.push(sc.bind(cj,'aaaa=2222; Domain=example.com',ex,at(2000))); + tasks.push(sc.bind(cj,'aaaa=3333; Domain=www.example.com; Path=/pathA',ex,at(3000))); + async.series(tasks,function(err,results) { + results = results.filter(function(e) {return e !== undefined}); + cb(err,{cj:cj, cookies:results, now:now}); + }); + }, + "all got set": function(err,t) { + assert.lengthOf(t.cookies,4); + }, + "then getting 'em back": { + topic: function(t) { + var cj = t.cj; + cj.getCookies('http://www.example.com/pathA',this.callback); + }, + "there's just three": function (err,cookies) { + var vals = cookies.map(function(c) {return c.value}); + // may break with sorting; sorting should put 3333 first due to longest path: + assert.deepEqual(vals, ['3333','1111','2222']); + } + }, + }, + "CookieJar setCookie errors": { + "public-suffix domain": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('i=9; Domain=kyoto.jp; Path=/','kyoto.jp',this.callback); + }, + "errors": function(err,cookie) { + assert.ok(err); + assert.ok(!cookie); + assert.match(err.message, /public suffix/i); + }, + }, + "wrong domain": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('j=10; Domain=google.com; Path=/','google.ca',this.callback); + }, + "errors": function(err,cookie) { + assert.ok(err); + assert.ok(!cookie); + assert.match(err.message, /not in this host's domain/i); + }, + }, + "old cookie is HttpOnly": { + topic: function() { + var cb = this.callback; + var next = function (err,c) { + return cb(err,cj); + }; + var cj = new CookieJar(); + cj.setCookie('k=11; Domain=example.ca; Path=/; HttpOnly','http://example.ca',{http:true},next); + }, + "initial cookie is set": function(err,cj) { + assert.ok(!err); + }, + "but when trying to overwrite": { + topic: function(cj) { + var cb = this.callback; + cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},function(err,c) {cb(null,err)}); + }, + "it's an error": function(err) { + assert.ok(err); + }, + "then, checking the original": { + topic: function(ignored,cj) { + assert.ok(cj instanceof CookieJar); + cj.getCookies('http://example.ca',{http:true},this.callback); + }, + "cookie has original value": function(err,cookies) { + assert.equal(err,null); + assert.lengthOf(cookies, 1); + assert.equal(cookies[0].value,11); + }, + }, + }, + }, + }, +}) +.addBatch({ + "JSON": { + "serialization": { + topic: function() { + var c = Cookie.parse('alpha=beta; Domain=example.com; Path=/foo; Expires=Tue, 19 Jan 2038 03:14:07 GMT; HttpOnly'); + return JSON.stringify(c); + }, + "gives a string": function(str) { + assert.equal(typeof str, "string"); + }, + "date is in ISO format": function(str) { + assert.match(str, /"expires":"2038-01-19T03:14:07\.000Z"/, 'expires is in ISO format'); + }, + }, + "deserialization": { + topic: function() { + var json = '{"key":"alpha","value":"beta","domain":"example.com","path":"/foo","expires":"2038-01-19T03:14:07.000Z","httpOnly":true,"lastAccessed":2000000000123}'; + return Cookie.fromJSON(json); + }, + "works": function(c) { + assert.ok(c); + }, + "key": function(c) { assert.equal(c.key, "alpha") }, + "value": function(c) { assert.equal(c.value, "beta") }, + "domain": function(c) { assert.equal(c.domain, "example.com") }, + "path": function(c) { assert.equal(c.path, "/foo") }, + "httpOnly": function(c) { assert.strictEqual(c.httpOnly, true) }, + "secure": function(c) { assert.strictEqual(c.secure, false) }, + "hostOnly": function(c) { assert.strictEqual(c.hostOnly, null) }, + "expires is a date object": function(c) { + assert.equal(c.expires.getTime(), 2147483647000); + }, + "lastAccessed is a date object": function(c) { + assert.equal(c.lastAccessed.getTime(), 2000000000123); + }, + "creation defaulted": function(c) { + assert.ok(c.creation.getTime()); + } + }, + "null deserialization": { + topic: function() { + return Cookie.fromJSON(null); + }, + "is null": function(cookie) { + assert.equal(cookie,null); + }, + }, + }, + "expiry deserialization": { + "Infinity": { + topic: Cookie.fromJSON.bind(null, '{"expires":"Infinity"}'), + "is infinite": function(c) { + assert.strictEqual(c.expires, "Infinity"); + assert.equal(c.expires, Infinity); + }, + }, + }, + "maxAge serialization": { + topic: function() { + return function(toSet) { + var c = new Cookie(); + c.key = 'foo'; c.value = 'bar'; + c.setMaxAge(toSet); + return JSON.stringify(c); + }; + }, + "zero": { + topic: function(f) { return f(0) }, + "looks good": function(str) { + assert.match(str, /"maxAge":0/); + }, + }, + "Infinity": { + topic: function(f) { return f(Infinity) }, + "looks good": function(str) { + assert.match(str, /"maxAge":"Infinity"/); + }, + }, + "-Infinity": { + topic: function(f) { return f(-Infinity) }, + "looks good": function(str) { + assert.match(str, /"maxAge":"-Infinity"/); + }, + }, + "null": { + topic: function(f) { return f(null) }, + "looks good": function(str) { + assert.match(str, /"maxAge":null/); + }, + }, + }, + "maxAge deserialization": { + "number": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":123}'), + "is the number": function(c) { + assert.strictEqual(c.maxAge, 123); + }, + }, + "null": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":null}'), + "is null": function(c) { + assert.strictEqual(c.maxAge, null); + }, + }, + "less than zero": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":-123}'), + "is -123": function(c) { + assert.strictEqual(c.maxAge, -123); + }, + }, + "Infinity": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"Infinity"}'), + "is inf-as-string": function(c) { + assert.strictEqual(c.maxAge, "Infinity"); + }, + }, + "-Infinity": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"-Infinity"}'), + "is inf-as-string": function(c) { + assert.strictEqual(c.maxAge, "-Infinity"); + }, + }, + } +}) +.addBatch({ + "permuteDomain": { + "base case": { + topic: tough.permuteDomain.bind(null,'example.com'), + "got the domain": function(list) { + assert.deepEqual(list, ['example.com']); + }, + }, + "two levels": { + topic: tough.permuteDomain.bind(null,'foo.bar.example.com'), + "got three things": function(list) { + assert.deepEqual(list, ['example.com','bar.example.com','foo.bar.example.com']); + }, + }, + "invalid domain": { + topic: tough.permuteDomain.bind(null,'foo.bar.example.localduhmain'), + "got three things": function(list) { + assert.equal(list, null); + }, + }, + }, + "permutePath": { + "base case": { + topic: tough.permutePath.bind(null,'/'), + "just slash": function(list) { + assert.deepEqual(list,['/']); + }, + }, + "single case": { + topic: tough.permutePath.bind(null,'/foo'), + "two things": function(list) { + assert.deepEqual(list,['/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo',e)); + }); + }, + }, + "double case": { + topic: tough.permutePath.bind(null,'/foo/bar'), + "four things": function(list) { + assert.deepEqual(list,['/foo/bar','/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo/bar',e)); + }); + }, + }, + "trailing slash": { + topic: tough.permutePath.bind(null,'/foo/bar/'), + "three things": function(list) { + assert.deepEqual(list,['/foo/bar','/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo/bar/',e)); + }); + }, + }, + } +}) +.addBatch({ + "Issue 1": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function(err,cookie) { + this.callback(err,{cj:cj, cookie:cookie}); + }.bind(this)); + }, + "stored a cookie": function(t) { + assert.ok(t.cookie); + }, + "cookie's path was modified to remove unnecessary slash": function(t) { + assert.equal(t.cookie.path, '/some/path'); + }, + "getting it back": { + topic: function(t) { + t.cj.getCookies('http://domain/some/path/file', function(err,cookies) { + this.callback(err, {cj:t.cj, cookies:cookies||[]}); + }.bind(this)); + }, + "got one cookie": function(t) { + assert.lengthOf(t.cookies, 1); + }, + "it's the right one": function(t) { + var c = t.cookies[0]; + assert.equal(c.key, 'hello'); + assert.equal(c.value, 'world'); + }, + } + } +}) +.addBatch({ + "expiry option": { + topic: function() { + var cb = this.callback; + var cj = new CookieJar(); + cj.setCookie('near=expiry; Domain=example.com; Path=/; Max-Age=1','http://www.example.com',at(-1), function(err,cookie) { + + cb(err, {cj:cj, cookie:cookie}); + }); + }, + "set the cookie": function(t) { + assert.ok(t.cookie, "didn't set?!"); + assert.equal(t.cookie.key, 'near'); + }, + "then, retrieving": { + topic: function(t) { + var cb = this.callback; + setTimeout(function() { + t.cj.getCookies('http://www.example.com', {http:true, expire:false}, function(err,cookies) { + t.cookies = cookies; + cb(err,t); + }); + },2000); + }, + "got the cookie": function(t) { + assert.lengthOf(t.cookies, 1); + assert.equal(t.cookies[0].key, 'near'); + }, + } + } +}) +.addBatch({ + "trailing semi-colon set into cj": { + topic: function () { + var cb = this.callback; + var cj = new CookieJar(); + var ex = 'http://www.example.com'; + var tasks = []; + tasks.push(function(next) { + cj.setCookie('broken_path=testme; path=/;',ex,at(-1),next); + }); + tasks.push(function(next) { + cj.setCookie('b=2; Path=/;;;;',ex,at(-1),next); + }); + async.parallel(tasks, function (err, cookies) { + cb(null, { + cj: cj, + cookies: cookies + }); + }); + }, + "check number of cookies": function (t) { + assert.lengthOf(t.cookies, 2, "didn't set"); + }, + "check *broken_path* was set properly": function (t) { + assert.equal(t.cookies[0].key, "broken_path"); + assert.equal(t.cookies[0].value, "testme"); + assert.equal(t.cookies[0].path, "/"); + }, + "check *b* was set properly": function (t) { + assert.equal(t.cookies[1].key, "b"); + assert.equal(t.cookies[1].value, "2"); + assert.equal(t.cookies[1].path, "/"); + }, + "retrieve the cookie": { + topic: function (t) { + var cb = this.callback; + t.cj.getCookies('http://www.example.com', {}, function (err, cookies) { + t.cookies = cookies; + cb(err, t); + }); + }, + "get the cookie": function(t) { + assert.lengthOf(t.cookies, 2); + assert.equal(t.cookies[0].key, 'broken_path'); + assert.equal(t.cookies[0].value, 'testme'); + assert.equal(t.cookies[1].key, "b"); + assert.equal(t.cookies[1].value, "2"); + assert.equal(t.cookies[1].path, "/"); + }, + }, + } +}) +.addBatch({ + "Constructor":{ + topic: function () { + return new Cookie({ + key: 'test', + value: 'b', + maxAge: 60 + }); + }, + 'check for key property': function (c) { + assert.ok(c); + assert.equal(c.key, 'test'); + }, + 'check for value property': function (c) { + assert.equal(c.value, 'b'); + }, + 'check for maxAge': function (c) { + assert.equal(c.maxAge, 60); + }, + 'check for default values for unspecified properties': function (c) { + assert.equal(c.expires, "Infinity"); + assert.equal(c.secure, false); + assert.equal(c.httpOnly, false); + } + } +}) +.addBatch({ + "allPaths option": { + topic: function() { + var cj = new CookieJar(); + var tasks = []; + tasks.push(cj.setCookie.bind(cj, 'nopath_dom=qq; Path=/; Domain=example.com', 'http://example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'path_dom=qq; Path=/foo; Domain=example.com', 'http://example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'nopath_host=qq; Path=/', 'http://www.example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'path_host=qq; Path=/foo', 'http://www.example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'other=qq; Path=/', 'http://other.example.com/', {})); + tasks.push(cj.setCookie.bind(cj, 'other2=qq; Path=/foo', 'http://other.example.com/foo', {})); + var cb = this.callback; + async.parallel(tasks, function(err,results) { + cb(err, {cj:cj, cookies: results}); + }); + }, + "all set": function(t) { + assert.equal(t.cookies.length, 6); + assert.ok(t.cookies.every(function(c) { return !!c })); + }, + "getting without allPaths": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/', {}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found just two cookies": function(t) { + assert.equal(t.cookies.length, 2); + }, + "all are path=/": function(t) { + assert.ok(t.cookies.every(function(c) { return c.path === '/' })); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + "getting without allPaths for /foo": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/foo', {}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found four cookies": function(t) { + assert.equal(t.cookies.length, 4); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + "getting with allPaths:true": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/', {allPaths:true}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found four cookies": function(t) { + assert.equal(t.cookies.length, 4); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + } +}) +.export(module); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md new file mode 100644 index 00000000..bb533d56 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md @@ -0,0 +1,4 @@ +tunnel-agent +============ + +HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js new file mode 100644 index 00000000..3f7bbb90 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js @@ -0,0 +1,227 @@ +'use strict' + +var net = require('net') + , tls = require('tls') + , http = require('http') + , https = require('https') + , events = require('events') + , assert = require('assert') + , util = require('util') + ; + +exports.httpOverHttp = httpOverHttp +exports.httpsOverHttp = httpsOverHttp +exports.httpOverHttps = httpOverHttps +exports.httpsOverHttps = httpsOverHttps + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + return agent +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + agent.createSocket = createSecureSocket + return agent +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + return agent +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + agent.createSocket = createSecureSocket + return agent +} + + +function TunnelingAgent(options) { + var self = this + self.options = options || {} + self.proxyOptions = self.options.proxy || {} + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets + self.requests = [] + self.sockets = [] + + self.on('free', function onFree(socket, host, port) { + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i] + if (pending.host === host && pending.port === port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1) + pending.request.onSocket(socket) + return + } + } + socket.destroy() + self.removeSocket(socket) + }) +} +util.inherits(TunnelingAgent, events.EventEmitter) + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) { + var self = this + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push({host: host, port: port, request: req}) + return + } + + // If we are under maxSockets create a new one. + self.createSocket({host: host, port: port, request: req}, function(socket) { + socket.on('free', onFree) + socket.on('close', onCloseOrRemove) + socket.on('agentRemove', onCloseOrRemove) + req.onSocket(socket) + + function onFree() { + self.emit('free', socket, host, port) + } + + function onCloseOrRemove(err) { + self.removeSocket() + socket.removeListener('free', onFree) + socket.removeListener('close', onCloseOrRemove) + socket.removeListener('agentRemove', onCloseOrRemove) + } + }) +} + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this + var placeholder = {} + self.sockets.push(placeholder) + + var connectOptions = mergeOptions({}, self.proxyOptions, + { method: 'CONNECT' + , path: options.host + ':' + options.port + , agent: false + } + ) + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {} + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64') + } + + debug('making CONNECT request') + var connectReq = self.request(connectOptions) + connectReq.useChunkedEncodingByDefault = false // for v0.6 + connectReq.once('response', onResponse) // for v0.6 + connectReq.once('upgrade', onUpgrade) // for v0.6 + connectReq.once('connect', onConnect) // for v0.7 or later + connectReq.once('error', onError) + connectReq.end() + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head) + }) + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners() + socket.removeAllListeners() + + if (res.statusCode === 200) { + assert.equal(head.length, 0) + debug('tunneling connection has established') + self.sockets[self.sockets.indexOf(placeholder)] = socket + cb(socket) + } else { + debug('tunneling socket could not be established, statusCode=%d', res.statusCode) + var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } + } + + function onError(cause) { + connectReq.removeAllListeners() + + debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) + var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } +} + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) return + + this.sockets.splice(pos, 1) + + var pending = this.requests.shift() + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket) + }) + } +} + +function createSecureSocket(options, cb) { + var self = this + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, mergeOptions({}, self.options, + { servername: options.host + , socket: socket + } + )) + cb(secureSocket) + }) +} + + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i] + if (typeof overrides === 'object') { + var keys = Object.keys(overrides) + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j] + if (overrides[k] !== undefined) { + target[k] = overrides[k] + } + } + } + } + return target +} + + +var debug +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments) + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0] + } else { + args.unshift('TUNNEL:') + } + console.error.apply(console, args) + } +} else { + debug = function() {} +} +exports.debug = debug // for test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json new file mode 100644 index 00000000..acfa6e1c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json @@ -0,0 +1,32 @@ +{ + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "name": "tunnel-agent", + "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", + "version": "0.3.0", + "repository": { + "url": "https://github.com/mikeal/tunnel-agent" + }, + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/mikeal/tunnel-agent/issues" + }, + "homepage": "https://github.com/mikeal/tunnel-agent", + "_id": "tunnel-agent@0.3.0", + "dist": { + "shasum": "ad681b68f5321ad2827c4cfb1b7d5df2cfe942ee" + }, + "_from": "tunnel-agent@~0.3.0", + "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json new file mode 100755 index 00000000..57c99c02 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json @@ -0,0 +1,61 @@ +{ + "name": "request", + "description": "Simplified HTTP request client.", + "tags": [ + "http", + "simple", + "util", + "utility" + ], + "version": "2.31.0", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com" + }, + "repository": { + "type": "git", + "url": "http://github.com/mikeal/request.git" + }, + "bugs": { + "url": "http://github.com/mikeal/request/issues" + }, + "engines": [ + "node >= 0.8.0" + ], + "main": "index.js", + "dependencies": { + "qs": "~0.6.0", + "json-stringify-safe": "~5.0.0", + "forever-agent": "~0.5.0", + "node-uuid": "~1.4.0", + "mime": "~1.2.9", + "tough-cookie": "~0.9.15", + "form-data": "~0.1.0", + "tunnel-agent": "~0.3.0", + "http-signature": "~0.10.0", + "oauth-sign": "~0.3.0", + "hawk": "~1.0.0", + "aws-sign2": "~0.5.0" + }, + "optionalDependencies": { + "tough-cookie": "~0.9.15", + "form-data": "~0.1.0", + "tunnel-agent": "~0.3.0", + "http-signature": "~0.10.0", + "oauth-sign": "~0.3.0", + "hawk": "~1.0.0", + "aws-sign2": "~0.5.0" + }, + "scripts": { + "test": "node tests/run.js" + }, + "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```javascript\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\nNote that `setCookie` requires at least three parameters, and the last is required to be a callback.\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.setCookie(cookie, uri, function (err, cookie){})\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/mikeal/request", + "_id": "request@2.31.0", + "dist": { + "shasum": "4c8ac967c9a4b9410cb4ba1a61fdb644267eeeff" + }, + "_from": "request@~2.31.0", + "_resolved": "https://registry.npmjs.org/request/-/request-2.31.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js new file mode 100644 index 00000000..3c03c47d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js @@ -0,0 +1,1260 @@ +var optional = require('./lib/optional') + , http = require('http') + , https = optional('https') + , tls = optional('tls') + , url = require('url') + , util = require('util') + , stream = require('stream') + , qs = require('qs') + , querystring = require('querystring') + , crypto = require('crypto') + + , oauth = optional('oauth-sign') + , hawk = optional('hawk') + , aws = optional('aws-sign') + , httpSignature = optional('http-signature') + , uuid = require('node-uuid') + , mime = require('mime') + , tunnel = optional('tunnel-agent') + , _safeStringify = require('json-stringify-safe') + + , ForeverAgent = require('forever-agent') + , FormData = optional('form-data') + + , Cookie = optional('tough-cookie') + , CookieJar = Cookie && Cookie.CookieJar + , cookieJar = CookieJar && new CookieJar + + , copy = require('./lib/copy') + , debug = require('./lib/debug') + , getSafe = require('./lib/getSafe') + ; + +function safeStringify (obj) { + var ret + try { ret = JSON.stringify(obj) } + catch (e) { ret = _safeStringify(obj) } + return ret +} + +var globalPool = {} +var isUrl = /^https?:/i + + +// Hacky fix for pre-0.4.4 https +if (https && !https.Agent) { + https.Agent = function (options) { + http.Agent.call(this, options) + } + util.inherits(https.Agent, http.Agent) + https.Agent.prototype._getConnection = function (host, port, cb) { + var s = tls.connect(port, host, this.options, function () { + // do other checks here? + if (cb) cb() + }) + return s + } +} + +function isReadStream (rs) { + if (rs.readable && rs.path && rs.mode) { + return true + } +} + +function toBase64 (str) { + return (new Buffer(str || "", "ascii")).toString("base64") +} + +function md5 (str) { + return crypto.createHash('md5').update(str).digest('hex') +} + +function Request (options) { + stream.Stream.call(this) + this.readable = true + this.writable = true + + if (typeof options === 'string') { + options = {uri:options} + } + + var reserved = Object.keys(Request.prototype) + for (var i in options) { + if (reserved.indexOf(i) === -1) { + this[i] = options[i] + } else { + if (typeof options[i] === 'function') { + delete options[i] + } + } + } + + if (options.method) { + this.explicitMethod = true + } + + this.canTunnel = options.tunnel !== false && tunnel; + + this.init(options) +} +util.inherits(Request, stream.Stream) +Request.prototype.init = function (options) { + // init() contains all the code to setup the request object. + // the actual outgoing request is not started until start() is called + // this function is called from both the constructor and on redirect. + var self = this + if (!options) options = {} + + if (!self.method) self.method = options.method || 'GET' + self.localAddress = options.localAddress + + debug(options) + if (!self.pool && self.pool !== false) self.pool = globalPool + self.dests = self.dests || [] + self.__isRequestRequest = true + + // Protect against double callback + if (!self._callback && self.callback) { + self._callback = self.callback + self.callback = function () { + if (self._callbackCalled) return // Print a warning maybe? + self._callbackCalled = true + self._callback.apply(self, arguments) + } + self.on('error', self.callback.bind()) + self.on('complete', self.callback.bind(self, null)) + } + + if (self.url && !self.uri) { + // People use this property instead all the time so why not just support it. + self.uri = self.url + delete self.url + } + + if (!self.uri) { + // this will throw if unhandled but is handleable when in a redirect + return self.emit('error', new Error("options.uri is a required argument")) + } else { + if (typeof self.uri == "string") self.uri = url.parse(self.uri) + } + + if (self.strictSSL === false) { + self.rejectUnauthorized = false + } + + if (self.proxy) { + if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy) + + // do the HTTP CONNECT dance using koichik/node-tunnel + if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) { + var tunnelFn = self.proxy.protocol === "http:" + ? tunnel.httpsOverHttp : tunnel.httpsOverHttps + + var tunnelOptions = { proxy: { host: self.proxy.hostname + , port: +self.proxy.port + , proxyAuth: self.proxy.auth + , headers: { Host: self.uri.hostname + ':' + + (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }} + , rejectUnauthorized: self.rejectUnauthorized + , ca: this.ca } + + self.agent = tunnelFn(tunnelOptions) + self.tunnel = true + } + } + + if (!self.uri.pathname) {self.uri.pathname = '/'} + + if (!self.uri.host) { + // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar + // Detect and reject it as soon as possible + var faultyUri = url.format(self.uri) + var message = 'Invalid URI "' + faultyUri + '"' + if (Object.keys(options).length === 0) { + // No option ? This can be the sign of a redirect + // As this is a case where the user cannot do anything (they didn't call request directly with this URL) + // they should be warned that it can be caused by a redirection (can save some hair) + message += '. This can be caused by a crappy redirection.' + } + self.emit('error', new Error(message)) + return // This error was fatal + } + + self._redirectsFollowed = self._redirectsFollowed || 0 + self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10 + self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true + self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false + if (self.followRedirect || self.followAllRedirects) + self.redirects = self.redirects || [] + + self.headers = self.headers ? copy(self.headers) : {} + + self.setHost = false + if (!self.hasHeader('host')) { + self.setHeader('host', self.uri.hostname) + if (self.uri.port) { + if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && + !(self.uri.port === 443 && self.uri.protocol === 'https:') ) + self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) ) + } + self.setHost = true + } + + self.jar(self._jar || options.jar) + + if (!self.uri.port) { + if (self.uri.protocol == 'http:') {self.uri.port = 80} + else if (self.uri.protocol == 'https:') {self.uri.port = 443} + } + + if (self.proxy && !self.tunnel) { + self.port = self.proxy.port + self.host = self.proxy.hostname + } else { + self.port = self.uri.port + self.host = self.uri.hostname + } + + self.clientErrorHandler = function (error) { + if (self._aborted) return + if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' + && self.agent.addRequestNoreuse) { + self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } + self.start() + self.req.end() + return + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + self.emit('error', error) + } + + self._parserErrorHandler = function (error) { + if (this.res) { + if (this.res.request) { + this.res.request.emit('error', error) + } else { + this.res.emit('error', error) + } + } else { + this._httpMessage.emit('error', error) + } + } + + if (options.form) { + self.form(options.form) + } + + if (options.qs) self.qs(options.qs) + + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || "") + } + + if (self.path.length === 0) self.path = '/' + + + // Auth must happen last in case signing is dependent on other headers + if (options.oauth) { + self.oauth(options.oauth) + } + + if (options.aws) { + self.aws(options.aws) + } + + if (options.hawk) { + self.hawk(options.hawk) + } + + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } + + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password + + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately + ) + } + + if (self.uri.auth && !self.hasHeader('authorization')) { + var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) + self.auth(authPieces[0], authPieces.slice(1).join(':'), true) + } + if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { + self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) + } + + + if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + + if (options.json) { + self.json(options.json) + } else if (options.multipart) { + self.boundary = uuid() + self.multipart(options.multipart) + } + + if (self.body) { + var length = 0 + if (!Buffer.isBuffer(self.body)) { + if (Array.isArray(self.body)) { + for (var i = 0; i < self.body.length; i++) { + length += self.body[i].length + } + } else { + self.body = new Buffer(self.body) + length = self.body.length + } + } else { + length = self.body.length + } + if (length) { + if (!self.hasHeader('content-length')) self.setHeader('content-length', length) + } else { + throw new Error('Argument error, options.body.') + } + } + + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + , defaultModules = {'http:':http, 'https:':https} + , httpModules = self.httpModules || {} + ; + self.httpModule = httpModules[protocol] || defaultModules[protocol] + + if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) + + if (options.ca) self.ca = options.ca + + if (!self.agent) { + if (options.agentOptions) self.agentOptions = options.agentOptions + + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + } + } + + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getAgent() + if (self.maxSockets) { + // Don't use our pooling if node has the refactored client + self.agent.maxSockets = self.maxSockets + } + if (self.pool.maxSockets) { + // Don't use our pooling if node has the refactored client + self.agent.maxSockets = self.pool.maxSockets + } + } + + self.on('pipe', function (src) { + if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) + } + } + } + if (self._json && !self.hasHeader('content-type')) + self.setHeader('content-type', 'application/json') + if (src.method && !self.explicitMethod) { + self.method = src.method + } + } + + // self.on('pipe', function () { + // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") + // }) + }) + + process.nextTick(function () { + if (self._aborted) return + + if (self._form) { + self.setHeaders(self._form.getHeaders()) + self._form.pipe(self) + } + if (self.body) { + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } else if (self.requestBodyStream) { + console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() + } + self.ntick = true + }) +} + +// Must call this when following a redirect from https to http or vice versa +// Attempts to keep everything as identical as possible, but update the +// httpModule, Tunneling agent, and/or Forever Agent in use. +Request.prototype._updateProtocol = function () { + var self = this + var protocol = self.uri.protocol + + if (protocol === 'https:') { + // previously was doing http, now doing https + // if it's https, then we might need to tunnel now. + if (self.proxy && self.canTunnel) { + self.tunnel = true + var tunnelFn = self.proxy.protocol === 'http:' + ? tunnel.httpsOverHttp : tunnel.httpsOverHttps + var tunnelOptions = { proxy: { host: self.proxy.hostname + , port: +self.proxy.port + , proxyAuth: self.proxy.auth } + , rejectUnauthorized: self.rejectUnauthorized + , ca: self.ca } + self.agent = tunnelFn(tunnelOptions) + return + } + + self.httpModule = https + switch (self.agentClass) { + case ForeverAgent: + self.agentClass = ForeverAgent.SSL + break + case http.Agent: + self.agentClass = https.Agent + break + default: + // nothing we can do. Just hope for the best. + return + } + + // if there's an agent, we need to get a new one. + if (self.agent) self.agent = self.getAgent() + + } else { + // previously was doing https, now doing http + // stop any tunneling. + if (self.tunnel) self.tunnel = false + self.httpModule = http + switch (self.agentClass) { + case ForeverAgent.SSL: + self.agentClass = ForeverAgent + break + case https.Agent: + self.agentClass = http.Agent + break + default: + // nothing we can do. just hope for the best + return + } + + // if there's an agent, then get a new one. + if (self.agent) { + self.agent = null + self.agent = self.getAgent() + } + } +} + +Request.prototype.getAgent = function () { + var Agent = this.agentClass + var options = {} + if (this.agentOptions) { + for (var i in this.agentOptions) { + options[i] = this.agentOptions[i] + } + } + if (this.ca) options.ca = this.ca + if (this.ciphers) options.ciphers = this.ciphers + if (this.secureProtocol) options.secureProtocol = this.secureProtocol + if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized + + if (this.cert && this.key) { + options.key = this.key + options.cert = this.cert + } + + var poolKey = '' + + // different types of agents are in different pools + if (Agent !== this.httpModule.Agent) { + poolKey += Agent.name + } + + if (!this.httpModule.globalAgent) { + // node 0.4.x + options.host = this.host + options.port = this.port + if (poolKey) poolKey += ':' + poolKey += this.host + ':' + this.port + } + + // ca option is only relevant if proxy or destination are https + var proxy = this.proxy + if (typeof proxy === 'string') proxy = url.parse(proxy) + var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + if (isHttps) { + if (options.ca) { + if (poolKey) poolKey += ':' + poolKey += options.ca + } + + if (typeof options.rejectUnauthorized !== 'undefined') { + if (poolKey) poolKey += ':' + poolKey += options.rejectUnauthorized + } + + if (options.cert) + poolKey += options.cert.toString('ascii') + options.key.toString('ascii') + + if (options.ciphers) { + if (poolKey) poolKey += ':' + poolKey += options.ciphers + } + + if (options.secureProtocol) { + if (poolKey) poolKey += ':' + poolKey += options.secureProtocol + } + } + + if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) { + // not doing anything special. Use the globalAgent + return this.httpModule.globalAgent + } + + // we're using a stored agent. Make sure it's protocol-specific + poolKey = this.uri.protocol + poolKey + + // already generated an agent for this setting + if (this.pool[poolKey]) return this.pool[poolKey] + + return this.pool[poolKey] = new Agent(options) +} + +Request.prototype.start = function () { + // start() is called once we are ready to send the outgoing HTTP request. + // this is usually called on the first write(), end() or on nextTick() + var self = this + + if (self._aborted) return + + self._started = true + self.method = self.method || 'GET' + self.href = self.uri.href + + if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { + self.setHeader('content-length', self.src.stat.size) + } + if (self._aws) { + self.aws(self._aws, true) + } + + // We have a method named auth, which is completely different from the http.request + // auth option. If we don't remove it, we're gonna have a bad time. + var reqOptions = copy(self) + delete reqOptions.auth + + debug('make request', self.uri.href) + self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self)) + + if (self.timeout && !self.timeoutTimer) { + self.timeoutTimer = setTimeout(function () { + self.req.abort() + var e = new Error("ETIMEDOUT") + e.code = "ETIMEDOUT" + self.emit("error", e) + }, self.timeout) + + // Set additional timeout on socket - in case if remote + // server freeze after sending headers + if (self.req.setTimeout) { // only works on node 0.6+ + self.req.setTimeout(self.timeout, function () { + if (self.req) { + self.req.abort() + var e = new Error("ESOCKETTIMEDOUT") + e.code = "ESOCKETTIMEDOUT" + self.emit("error", e) + } + }) + } + } + + self.req.on('error', self.clientErrorHandler) + self.req.on('drain', function() { + self.emit('drain') + }) + self.on('end', function() { + if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler) + }) + self.emit('request', self.req) +} +Request.prototype.onResponse = function (response) { + var self = this + debug('onResponse', self.uri.href, response.statusCode, response.headers) + response.on('end', function() { + debug('response end', self.uri.href, response.statusCode, response.headers) + }); + + if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { + response.connection.once('error', self._parserErrorHandler) + } + if (self._aborted) { + debug('aborted', self.uri.href) + response.resume() + return + } + if (self._paused) response.pause() + else response.resume() + + self.response = response + response.request = self + response.toJSON = toJSON + + // XXX This is different on 0.10, because SSL is strict by default + if (self.httpModule === https && + self.strictSSL && + !response.client.authorized) { + debug('strict ssl error', self.uri.href) + var sslErr = response.client.authorizationError + self.emit('error', new Error('SSL Error: '+ sslErr)) + return + } + + if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')] + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + + var addCookie = function (cookie) { + if (self._jar){ + var targetCookieJar = self._jar.setCookie?self._jar:cookieJar; + + //set the cookie if it's domain in the href's domain. + targetCookieJar.setCookie(cookie, self.uri.href, function(err){ + if (err){ + console.warn('set cookie failed,'+ err) + } + }) + } + + } + + if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) { + var headerName = hasHeader('set-cookie', response.headers) + if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie) + else addCookie(response.headers[headerName]) + } + + var redirectTo = null + if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) { + var location = response.headers[hasHeader('location', response.headers)] + debug('redirect', location) + + if (self.followAllRedirects) { + redirectTo = location + } else if (self.followRedirect) { + switch (self.method) { + case 'PATCH': + case 'PUT': + case 'POST': + case 'DELETE': + // Do not follow redirects + break + default: + redirectTo = location + break + } + } + } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) { + var authHeader = response.headers[hasHeader('www-authenticate', response.headers)] + var authVerb = authHeader && authHeader.split(' ')[0] + debug('reauth', authVerb) + + switch (authVerb) { + case 'Basic': + self.auth(self._user, self._pass, true) + redirectTo = self.uri + break + + case 'Digest': + // TODO: More complete implementation of RFC 2617. + // - check challenge.algorithm + // - support algorithm="MD5-sess" + // - handle challenge.domain + // - support qop="auth-int" only + // - handle Authentication-Info (not necessarily?) + // - check challenge.stale (not necessarily?) + // - increase nc (not necessarily?) + // For reference: + // http://tools.ietf.org/html/rfc2617#section-3 + // https://github.com/bagder/curl/blob/master/lib/http_digest.c + + var challenge = {} + var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi + for (;;) { + var match = re.exec(authHeader) + if (!match) break + challenge[match[1]] = match[2] || match[3]; + } + + var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass) + var ha2 = md5(self.method + ':' + self.uri.path) + var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' + var nc = qop && '00000001' + var cnonce = qop && uuid().replace(/-/g, '') + var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2) + var authValues = { + username: self._user, + realm: challenge.realm, + nonce: challenge.nonce, + uri: self.uri.path, + qop: qop, + response: digestResponse, + nc: nc, + cnonce: cnonce, + algorithm: challenge.algorithm, + opaque: challenge.opaque + } + + authHeader = [] + for (var k in authValues) { + if (!authValues[k]) { + //ignore + } else if (k === 'qop' || k === 'nc' || k === 'algorithm') { + authHeader.push(k + '=' + authValues[k]) + } else { + authHeader.push(k + '="' + authValues[k] + '"') + } + } + authHeader = 'Digest ' + authHeader.join(', ') + self.setHeader('authorization', authHeader) + self._sentAuth = true + + redirectTo = self.uri + break + } + } + + if (redirectTo) { + debug('redirect to', redirectTo) + + // ignore any potential response body. it cannot possibly be useful + // to us at this point. + if (self._paused) response.resume() + + if (self._redirectsFollowed >= self.maxRedirects) { + self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href)) + return + } + self._redirectsFollowed += 1 + + if (!isUrl.test(redirectTo)) { + redirectTo = url.resolve(self.uri.href, redirectTo) + } + + var uriPrev = self.uri + self.uri = url.parse(redirectTo) + + // handle the case where we change protocol from https to http or vice versa + if (self.uri.protocol !== uriPrev.protocol) { + self._updateProtocol() + } + + self.redirects.push( + { statusCode : response.statusCode + , redirectUri: redirectTo + } + ) + if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET' + // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215 + delete self.src + delete self.req + delete self.agent + delete self._started + if (response.statusCode != 401) { + // Remove parameters from the previous response, unless this is the second request + // for a server that requires digest authentication. + delete self.body + delete self._form + if (self.headers) { + if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')] + if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')] + if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')] + } + } + + self.emit('redirect'); + + self.init() + return // Ignore the rest of the response + } else { + self._redirectsFollowed = self._redirectsFollowed || 0 + // Be a good stream and emit end when the response is finished. + // Hack to emit end on close because of a core bug that never fires end + response.on('close', function () { + if (!self._ended) self.response.emit('end') + }) + + if (self.encoding) { + if (self.dests.length !== 0) { + console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") + } else { + response.setEncoding(self.encoding) + } + } + + self.emit('response', response) + + self.dests.forEach(function (dest) { + self.pipeDest(dest) + }) + + response.on("data", function (chunk) { + self._destdata = true + self.emit("data", chunk) + }) + response.on("end", function (chunk) { + self._ended = true + self.emit("end", chunk) + }) + response.on("close", function () {self.emit("close")}) + + if (self.callback) { + var buffer = [] + var bodyLen = 0 + self.on("data", function (chunk) { + buffer.push(chunk) + bodyLen += chunk.length + }) + self.on("end", function () { + debug('end event', self.uri.href) + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + + if (buffer.length && Buffer.isBuffer(buffer[0])) { + debug('has body', self.uri.href, bodyLen) + var body = new Buffer(bodyLen) + var i = 0 + buffer.forEach(function (chunk) { + chunk.copy(body, i, 0, chunk.length) + i += chunk.length + }) + if (self.encoding === null) { + response.body = body + } else { + response.body = body.toString(self.encoding) + } + } else if (buffer.length) { + // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. + // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). + if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") { + buffer[0] = buffer[0].substring(1) + } + response.body = buffer.join('') + } + + if (self._json) { + try { + response.body = JSON.parse(response.body) + } catch (e) {} + } + debug('emitting complete', self.uri.href) + if(response.body == undefined && !self._json) { + response.body = ""; + } + self.emit('complete', response, response.body) + }) + } + //if no callback + else{ + self.on("end", function () { + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + self.emit('complete', response); + }); + } + } + debug('finish init function', self.uri.href) +} + +Request.prototype.abort = function () { + this._aborted = true + + if (this.req) { + this.req.abort() + } + else if (this.response) { + this.response.abort() + } + + this.emit("abort") +} + +Request.prototype.pipeDest = function (dest) { + var response = this.response + // Called after the response is received + if (dest.headers && !dest.headersSent) { + if (hasHeader('content-type', response.headers)) { + var ctname = hasHeader('content-type', response.headers) + if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname]) + else dest.headers[ctname] = response.headers[ctname] + } + + if (hasHeader('content-length', response.headers)) { + var clname = hasHeader('content-length', response.headers) + if (dest.setHeader) dest.setHeader(clname, response.headers[clname]) + else dest.headers[clname] = response.headers[clname] + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i in response.headers) { + dest.setHeader(i, response.headers[i]) + } + dest.statusCode = response.statusCode + } + if (this.pipefilter) this.pipefilter(response, dest) +} + +// Composable API +Request.prototype.setHeader = function (name, value, clobber) { + if (clobber === undefined) clobber = true + if (clobber || !this.hasHeader(name)) this.headers[name] = value + else this.headers[this.hasHeader(name)] += ',' + value + return this +} +Request.prototype.setHeaders = function (headers) { + for (var i in headers) {this.setHeader(i, headers[i])} + return this +} +Request.prototype.hasHeader = function (header, headers) { + var headers = Object.keys(headers || this.headers) + , lheaders = headers.map(function (h) {return h.toLowerCase()}) + ; + header = header.toLowerCase() + for (var i=0;i + +[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) + + + +**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** + +Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. + +```js +fs.createReadStream('ex.txt') + .pipe(through2(function (chunk, enc, callback) { + + for (var i = 0; i < chunk.length; i++) + if (chunk[i] == 97) + chunk[i] = 122 // swap 'a' for 'z' + + this.push(chunk) + + callback() + + })) + .pipe(fs.createWriteStream('out.txt')) +``` + +Or object streams: + +```js +var all = [] + +fs.createReadStream('data.csv') + .pipe(csv2()) + .pipe(through2.obj(function (chunk, enc, callback) { + + var data = { + name : chunk[0] + , address : chunk[3] + , phone : chunk[10] + } + + this.push(data) + + callback() + + })) + .on('data', function (data) { + all.push(data) + }) + .on('end', function () { + doSomethingSpecial(all) + }) +``` + +Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. + +## API + +through2([ options, ] [ transformFunction ] [, flushFunction ]) + +Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). + +### options + +The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). + +The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { + + this.push(new Buffer('wut?')) + cb() + + }) + .pipe(fs.createWriteStream('/tmp/wut.txt')) +``` + +### transformFunction + +The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. + +To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. + +If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. + +### flushFunction + +The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. + +through2.ctor([ options, ] transformFunction[, flushFunction ]) + +Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. + +```js +var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { + if (record.temp != null && record.unit = "F") { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = "C" + } + this.push(record) + callback() +}) + +// Create instances of FToC like so: +var converter = new FToC() +// Or: +var converter = FToC() +// Or specify/override options when you instantiate, if you prefer: +var converter = FToC({objectMode: true}) +``` + +## License + +**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore new file mode 100644 index 00000000..38344f87 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE new file mode 100644 index 00000000..0c44ae71 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md new file mode 100644 index 00000000..be976683 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md @@ -0,0 +1,768 @@ +# readable-stream + +A new class of streams for Node.js + +This module provides the new Stream base classes introduced in Node +v0.10, for use in Node v0.8. You can use it to have programs that +have to work with node v0.8, while being forward-compatible for v0.10 +and beyond. When you drop support for v0.8, you can remove this +module, and only use the native streams. + +This is almost exactly the same codebase as appears in Node v0.10. +However: + +1. The exported object is actually the Readable class. Decorating the + native `stream` module would be global pollution. +2. In v0.10, you can safely use `base64` as an argument to + `setEncoding` in Readable streams. However, in v0.8, the + StringDecoder class has no `end()` method, which is problematic for + Base64. So, don't use that, because it'll break and be weird. + +Other than that, the API is the same as `require('stream')` in v0.10, +so the API docs are reproduced below. + +---------- + + Stability: 2 - Unstable + +A stream is an abstract interface implemented by various objects in +Node. For example a request to an HTTP server is a stream, as is +stdout. Streams are readable, writable, or both. All streams are +instances of [EventEmitter][] + +You can load the Stream base classes by doing `require('stream')`. +There are base classes provided for Readable streams, Writable +streams, Duplex streams, and Transform streams. + +## Compatibility + +In earlier versions of Node, the Readable stream interface was +simpler, but also less powerful and less useful. + +* Rather than waiting for you to call the `read()` method, `'data'` + events would start emitting immediately. If you needed to do some + I/O to decide how to handle data, then you had to store the chunks + in some kind of buffer so that they would not be lost. +* The `pause()` method was advisory, rather than guaranteed. This + meant that you still had to be prepared to receive `'data'` events + even when the stream was in a paused state. + +In Node v0.10, the Readable class described below was added. For +backwards compatibility with older Node programs, Readable streams +switch into "old mode" when a `'data'` event handler is added, or when +the `pause()` or `resume()` methods are called. The effect is that, +even if you are not using the new `read()` method and `'readable'` +event, you no longer have to worry about losing `'data'` chunks. + +Most programs will continue to function normally. However, this +introduces an edge case in the following conditions: + +* No `'data'` event handler is added. +* The `pause()` and `resume()` methods are never called. + +For example, consider the following code: + +```javascript +// WARNING! BROKEN! +net.createServer(function(socket) { + + // we add an 'end' method, but never consume the data + socket.on('end', function() { + // It will never get here. + socket.end('I got your message (but didnt read it)\n'); + }); + +}).listen(1337); +``` + +In versions of node prior to v0.10, the incoming message data would be +simply discarded. However, in Node v0.10 and beyond, the socket will +remain paused forever. + +The workaround in this situation is to call the `resume()` method to +trigger "old mode" behavior: + +```javascript +// Workaround +net.createServer(function(socket) { + + socket.on('end', function() { + socket.end('I got your message (but didnt read it)\n'); + }); + + // start the flow of data, discarding it. + socket.resume(); + +}).listen(1337); +``` + +In addition to new Readable streams switching into old-mode, pre-v0.10 +style streams can be wrapped in a Readable class using the `wrap()` +method. + +## Class: stream.Readable + + + +A `Readable Stream` has the following methods, members, and events. + +Note that `stream.Readable` is an abstract class designed to be +extended with an underlying implementation of the `_read(size)` +method. (See below.) + +### new stream.Readable([options]) + +* `options` {Object} + * `highWaterMark` {Number} The maximum number of bytes to store in + the internal buffer before ceasing to read from the underlying + resource. Default=16kb + * `encoding` {String} If specified, then buffers will be decoded to + strings using the specified encoding. Default=null + * `objectMode` {Boolean} Whether this stream should behave + as a stream of objects. Meaning that stream.read(n) returns + a single value instead of a Buffer of size n + +In classes that extend the Readable class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### readable.\_read(size) + +* `size` {Number} Number of bytes to read asynchronously + +Note: **This function should NOT be called directly.** It should be +implemented by child classes, and called by the internal Readable +class methods only. + +All Readable stream implementations must provide a `_read` method +to fetch data from the underlying resource. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +When data is available, put it into the read queue by calling +`readable.push(chunk)`. If `push` returns false, then you should stop +reading. When `_read` is called again, you should start pushing more +data. + +The `size` argument is advisory. Implementations where a "read" is a +single call that returns data can use this to know how much data to +fetch. Implementations where that is not relevant, such as TCP or +TLS, may ignore this argument, and simply provide data whenever it +becomes available. There is no need, for example to "wait" until +`size` bytes are available before calling `stream.push(chunk)`. + +### readable.push(chunk) + +* `chunk` {Buffer | null | String} Chunk of data to push into the read queue +* return {Boolean} Whether or not more pushes should be performed + +Note: **This function should be called by Readable implementors, NOT +by consumers of Readable subclasses.** The `_read()` function will not +be called again until at least one `push(chunk)` call is made. If no +data is available, then you MAY call `push('')` (an empty string) to +allow a future `_read` call, without adding any data to the queue. + +The `Readable` class works by putting data into a read queue to be +pulled out later by calling the `read()` method when the `'readable'` +event fires. + +The `push()` method will explicitly insert some data into the read +queue. If it is called with `null` then it will signal the end of the +data. + +In some cases, you may be wrapping a lower-level source which has some +sort of pause/resume mechanism, and a data callback. In those cases, +you could wrap the low-level source object by doing something like +this: + +```javascript +// source is an object with readStop() and readStart() methods, +// and an `ondata` member that gets called when it has data, and +// an `onend` member that gets called when the data is over. + +var stream = new Readable(); + +source.ondata = function(chunk) { + // if push() returns false, then we need to stop reading from source + if (!stream.push(chunk)) + source.readStop(); +}; + +source.onend = function() { + stream.push(null); +}; + +// _read will be called when the stream wants to pull more data in +// the advisory size argument is ignored in this case. +stream._read = function(n) { + source.readStart(); +}; +``` + +### readable.unshift(chunk) + +* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue +* return {Boolean} Whether or not more pushes should be performed + +This is the corollary of `readable.push(chunk)`. Rather than putting +the data at the *end* of the read queue, it puts it at the *front* of +the read queue. + +This is useful in certain use-cases where a stream is being consumed +by a parser, which needs to "un-consume" some data that it has +optimistically pulled out of the source. + +```javascript +// A parser for a simple data protocol. +// The "header" is a JSON object, followed by 2 \n characters, and +// then a message body. +// +// Note: This can be done more simply as a Transform stream. See below. + +function SimpleProtocol(source, options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Readable.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + + // source is a readable stream, such as a socket or file + this._source = source; + + var self = this; + source.on('end', function() { + self.push(null); + }); + + // give it a kick whenever the source is readable + // read(0) will not consume any bytes + source.on('readable', function() { + self.read(0); + }); + + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype = Object.create( + Readable.prototype, { constructor: { value: SimpleProtocol }}); + +SimpleProtocol.prototype._read = function(n) { + if (!this._inBody) { + var chunk = this._source.read(); + + // if the source doesn't have data, we don't have data yet. + if (chunk === null) + return this.push(''); + + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + this.push(''); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // now, because we got some extra data, unshift the rest + // back into the read queue so that our consumer will see it. + var b = chunk.slice(split); + this.unshift(b); + + // and let them know that we are done parsing the header. + this.emit('header', this.header); + } + } else { + // from there on, just provide the data to our consumer. + // careful not to push(null), since that would indicate EOF. + var chunk = this._source.read(); + if (chunk) this.push(chunk); + } +}; + +// Usage: +var parser = new SimpleProtocol(source); +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + +### readable.wrap(stream) + +* `stream` {Stream} An "old style" readable stream + +If you are using an older Node library that emits `'data'` events and +has a `pause()` method that is advisory only, then you can use the +`wrap()` method to create a Readable stream that uses the old stream +as its data source. + +For example: + +```javascript +var OldReader = require('./old-api-module.js').OldReader; +var oreader = new OldReader; +var Readable = require('stream').Readable; +var myReader = new Readable().wrap(oreader); + +myReader.on('readable', function() { + myReader.read(); // etc. +}); +``` + +### Event: 'readable' + +When there is data ready to be consumed, this event will fire. + +When this event emits, call the `read()` method to consume the data. + +### Event: 'end' + +Emitted when the stream has received an EOF (FIN in TCP terminology). +Indicates that no more `'data'` events will happen. If the stream is +also writable, it may be possible to continue writing. + +### Event: 'data' + +The `'data'` event emits either a `Buffer` (by default) or a string if +`setEncoding()` was used. + +Note that adding a `'data'` event listener will switch the Readable +stream into "old mode", where data is emitted as soon as it is +available, rather than waiting for you to call `read()` to consume it. + +### Event: 'error' + +Emitted if there was an error receiving data. + +### Event: 'close' + +Emitted when the underlying resource (for example, the backing file +descriptor) has been closed. Not all streams will emit this. + +### readable.setEncoding(encoding) + +Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` +can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. + +The encoding can also be set by specifying an `encoding` field to the +constructor. + +### readable.read([size]) + +* `size` {Number | null} Optional number of bytes to read. +* Return: {Buffer | String | null} + +Note: **This function SHOULD be called by Readable stream users.** + +Call this method to consume data once the `'readable'` event is +emitted. + +The `size` argument will set a minimum number of bytes that you are +interested in. If not set, then the entire content of the internal +buffer is returned. + +If there is no data to consume, or if there are fewer bytes in the +internal buffer than the `size` argument, then `null` is returned, and +a future `'readable'` event will be emitted when more is available. + +Calling `stream.read(0)` will always return `null`, and will trigger a +refresh of the internal buffer, but otherwise be a no-op. + +### readable.pipe(destination, [options]) + +* `destination` {Writable Stream} +* `options` {Object} Optional + * `end` {Boolean} Default=true + +Connects this readable stream to `destination` WriteStream. Incoming +data on this stream gets written to `destination`. Properly manages +back-pressure so that a slow destination will not be overwhelmed by a +fast readable stream. + +This function returns the `destination` stream. + +For example, emulating the Unix `cat` command: + + process.stdin.pipe(process.stdout); + +By default `end()` is called on the destination when the source stream +emits `end`, so that `destination` is no longer writable. Pass `{ end: +false }` as `options` to keep the destination stream open. + +This keeps `writer` open so that "Goodbye" can be written at the +end. + + reader.pipe(writer, { end: false }); + reader.on("end", function() { + writer.end("Goodbye\n"); + }); + +Note that `process.stderr` and `process.stdout` are never closed until +the process exits, regardless of the specified options. + +### readable.unpipe([destination]) + +* `destination` {Writable Stream} Optional + +Undo a previously established `pipe()`. If no destination is +provided, then all previously established pipes are removed. + +### readable.pause() + +Switches the readable stream into "old mode", where data is emitted +using a `'data'` event rather than being buffered for consumption via +the `read()` method. + +Ceases the flow of data. No `'data'` events are emitted while the +stream is in a paused state. + +### readable.resume() + +Switches the readable stream into "old mode", where data is emitted +using a `'data'` event rather than being buffered for consumption via +the `read()` method. + +Resumes the incoming `'data'` events after a `pause()`. + + +## Class: stream.Writable + + + +A `Writable` Stream has the following methods, members, and events. + +Note that `stream.Writable` is an abstract class designed to be +extended with an underlying implementation of the +`_write(chunk, encoding, cb)` method. (See below.) + +### new stream.Writable([options]) + +* `options` {Object} + * `highWaterMark` {Number} Buffer level when `write()` starts + returning false. Default=16kb + * `decodeStrings` {Boolean} Whether or not to decode strings into + Buffers before passing them to `_write()`. Default=true + +In classes that extend the Writable class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### writable.\_write(chunk, encoding, callback) + +* `chunk` {Buffer | String} The chunk to be written. Will always + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. Ignore chunk is a buffer. Note that chunk will + **always** be a buffer unless the `decodeStrings` option is + explicitly set to `false`. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. + +All Writable stream implementations must provide a `_write` method to +send data to the underlying resource. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Writable +class methods only. + +Call the callback using the standard `callback(error)` pattern to +signal that the write completed successfully or with an error. + +If the `decodeStrings` flag is set in the constructor options, then +`chunk` may be a string rather than a Buffer, and `encoding` will +indicate the sort of string that it is. This is to support +implementations that have an optimized handling for certain string +data encodings. If you do not explicitly set the `decodeStrings` +option to `false`, then you can safely ignore the `encoding` argument, +and assume that `chunk` will always be a Buffer. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + + +### writable.write(chunk, [encoding], [callback]) + +* `chunk` {Buffer | String} Data to be written +* `encoding` {String} Optional. If `chunk` is a string, then encoding + defaults to `'utf8'` +* `callback` {Function} Optional. Called when this chunk is + successfully written. +* Returns {Boolean} + +Writes `chunk` to the stream. Returns `true` if the data has been +flushed to the underlying resource. Returns `false` to indicate that +the buffer is full, and the data will be sent out in the future. The +`'drain'` event will indicate when the buffer is empty again. + +The specifics of when `write()` will return false, is determined by +the `highWaterMark` option provided to the constructor. + +### writable.end([chunk], [encoding], [callback]) + +* `chunk` {Buffer | String} Optional final data to be written +* `encoding` {String} Optional. If `chunk` is a string, then encoding + defaults to `'utf8'` +* `callback` {Function} Optional. Called when the final chunk is + successfully written. + +Call this method to signal the end of the data being written to the +stream. + +### Event: 'drain' + +Emitted when the stream's write queue empties and it's safe to write +without buffering again. Listen for it when `stream.write()` returns +`false`. + +### Event: 'close' + +Emitted when the underlying resource (for example, the backing file +descriptor) has been closed. Not all streams will emit this. + +### Event: 'finish' + +When `end()` is called and there are no more chunks to write, this +event is emitted. + +### Event: 'pipe' + +* `source` {Readable Stream} + +Emitted when the stream is passed to a readable stream's pipe method. + +### Event 'unpipe' + +* `source` {Readable Stream} + +Emitted when a previously established `pipe()` is removed using the +source Readable stream's `unpipe()` method. + +## Class: stream.Duplex + + + +A "duplex" stream is one that is both Readable and Writable, such as a +TCP socket connection. + +Note that `stream.Duplex` is an abstract class designed to be +extended with an underlying implementation of the `_read(size)` +and `_write(chunk, encoding, callback)` methods as you would with a Readable or +Writable stream class. + +Since JavaScript doesn't have multiple prototypal inheritance, this +class prototypally inherits from Readable, and then parasitically from +Writable. It is thus up to the user to implement both the lowlevel +`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method +on extension duplex classes. + +### new stream.Duplex(options) + +* `options` {Object} Passed to both Writable and Readable + constructors. Also has the following fields: + * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then + the stream will automatically end the readable side when the + writable side ends and vice versa. + +In classes that extend the Duplex class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +## Class: stream.Transform + +A "transform" stream is a duplex stream where the output is causally +connected in some way to the input, such as a zlib stream or a crypto +stream. + +There is no requirement that the output be the same size as the input, +the same number of chunks, or arrive at the same time. For example, a +Hash stream will only ever have a single chunk of output which is +provided when the input is ended. A zlib stream will either produce +much smaller or much larger than its input. + +Rather than implement the `_read()` and `_write()` methods, Transform +classes must implement the `_transform()` method, and may optionally +also implement the `_flush()` method. (See below.) + +### new stream.Transform([options]) + +* `options` {Object} Passed to both Writable and Readable + constructors. + +In classes that extend the Transform class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### transform.\_transform(chunk, encoding, callback) + +* `chunk` {Buffer | String} The chunk to be transformed. Will always + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. (Ignore if `decodeStrings` chunk is a buffer.) +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Transform +class methods only. + +All Transform stream implementations must provide a `_transform` +method to accept input and produce output. + +`_transform` should do whatever has to be done in this specific +Transform class, to handle the bytes being written, and pass them off +to the readable portion of the interface. Do asynchronous I/O, +process things, and so on. + +Call `transform.push(outputChunk)` 0 or more times to generate output +from this input chunk, depending on how much data you want to output +as a result of this chunk. + +Call the callback function only when the current chunk is completely +consumed. Note that there may or may not be output as a result of any +particular input chunk. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +### transform.\_flush(callback) + +* `callback` {Function} Call this function (optionally with an error + argument) when you are done flushing any remaining data. + +Note: **This function MUST NOT be called directly.** It MAY be implemented +by child classes, and if so, will be called by the internal Transform +class methods only. + +In some cases, your transform operation may need to emit a bit more +data at the end of the stream. For example, a `Zlib` compression +stream will store up some internal state so that it can optimally +compress the output. At the end, however, it needs to do the best it +can with what is left, so that the data will be complete. + +In those cases, you can implement a `_flush` method, which will be +called at the very end, after all the written data is consumed, but +before emitting `end` to signal the end of the readable side. Just +like with `_transform`, call `transform.push(chunk)` zero or more +times, as appropriate, and call `callback` when the flush operation is +complete. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +### Example: `SimpleProtocol` parser + +The example above of a simple protocol parser can be implemented much +more simply by using the higher level `Transform` stream class. + +In this example, rather than providing the input as an argument, it +would be piped into the parser, which is a more idiomatic Node stream +approach. + +```javascript +function SimpleProtocol(options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Transform.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype = Object.create( + Transform.prototype, { constructor: { value: SimpleProtocol }}); + +SimpleProtocol.prototype._transform = function(chunk, encoding, done) { + if (!this._inBody) { + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // and let them know that we are done parsing the header. + this.emit('header', this.header); + + // now, because we got some extra data, emit this first. + this.push(b); + } + } else { + // from there on, just provide the data to our consumer as-is. + this.push(b); + } + done(); +}; + +var parser = new SimpleProtocol(); +source.pipe(parser) + +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + + +## Class: stream.PassThrough + +This is a trivial implementation of a `Transform` stream that simply +passes the input bytes across to the output. Its purpose is mainly +for examples and testing, but there are occasionally use cases where +it can come in handy. + + +[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js new file mode 100644 index 00000000..ca807af8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch new file mode 100644 index 00000000..0ad71a1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch @@ -0,0 +1,68 @@ +diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js +index c5a741c..a2e0d8e 100644 +--- a/lib/_stream_duplex.js ++++ b/lib/_stream_duplex.js +@@ -26,8 +26,8 @@ + + module.exports = Duplex; + var util = require('util'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('./_stream_readable'); ++var Writable = require('./_stream_writable'); + + util.inherits(Duplex, Readable); + +diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js +index a5e9864..330c247 100644 +--- a/lib/_stream_passthrough.js ++++ b/lib/_stream_passthrough.js +@@ -25,7 +25,7 @@ + + module.exports = PassThrough; + +-var Transform = require('_stream_transform'); ++var Transform = require('./_stream_transform'); + var util = require('util'); + util.inherits(PassThrough, Transform); + +diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js +index 2259d2e..e6681ee 100644 +--- a/lib/_stream_readable.js ++++ b/lib/_stream_readable.js +@@ -23,6 +23,9 @@ module.exports = Readable; + Readable.ReadableState = ReadableState; + + var EE = require('events').EventEmitter; ++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { ++ return emitter.listeners(type).length; ++}; + var Stream = require('stream'); + var util = require('util'); + var StringDecoder; +diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js +index e925b4b..f08b05e 100644 +--- a/lib/_stream_transform.js ++++ b/lib/_stream_transform.js +@@ -64,7 +64,7 @@ + + module.exports = Transform; + +-var Duplex = require('_stream_duplex'); ++var Duplex = require('./_stream_duplex'); + var util = require('util'); + util.inherits(Transform, Duplex); + +diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js +index a26f711..56ca47d 100644 +--- a/lib/_stream_writable.js ++++ b/lib/_stream_writable.js +@@ -109,7 +109,7 @@ function WritableState(options, stream) { + function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. +- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) ++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000..a2e0d8e0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,69 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +module.exports = Duplex; +var util = require('util'); +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +Object.keys(Writable.prototype).forEach(function(method) { + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; +}); + +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000..330c247d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,41 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); +var util = require('util'); +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000..323f3305 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,927 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +module.exports = Readable; +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +var Stream = require('stream'); +var util = require('util'); +var StringDecoder; + +util.inherits(Readable, Stream); + +function ReadableState(options, stream) { + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = false; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // In streams that never have any data, and do push(null) right away, + // the consumer can miss the 'end' event if they do some I/O before + // consuming the stream. So, we don't emit('end') until some reading + // happens. + this.calledRead = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (typeof chunk === 'string' && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null || chunk === undefined) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) { + state.buffer.unshift(chunk); + } else { + state.reading = false; + state.buffer.push(chunk); + } + + if (state.needReadable) + emitReadable(stream); + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (isNaN(n) || n === null) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + var state = this._readableState; + state.calledRead = true; + var nOrig = n; + + if (typeof n !== 'number' || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + + // if we currently have less than the highWaterMark, then also read some + if (state.length - n <= state.highWaterMark) + doRead = true; + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) + doRead = false; + + if (doRead) { + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read called its callback synchronously, then `reading` + // will be false, and we need to re-evaluate how much data we + // can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we happened to read() exactly the remaining amount in the + // buffer, and the EOF has been seen at this point, then make sure + // that we emit 'end' on the very next tick. + if (state.ended && !state.endEmitted && state.length === 0) + endReadable(this); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode && + !er) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // if we've ended and we have some data left, then emit + // 'readable' now to make sure it gets picked up. + if (state.length > 0) + emitReadable(stream); + else + endReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (state.emittedReadable) + return; + + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); +} + +function emitReadable_(stream) { + stream.emit('readable'); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + if (readable !== src) return; + cleanup(); + } + + function onend() { + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (!dest._writableState || dest._writableState.needDrain) + ondrain(); + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (Array.isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; + + + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + // the handler that waits for readable events after all + // the data gets sucked out in flow. + // This would be easier to follow with a .once() handler + // in flow(), but that is too slow. + this.on('readable', pipeOnReadable); + + state.flowing = true; + process.nextTick(function() { + flow(src); + }); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var dest = this; + var state = src._readableState; + state.awaitDrain--; + if (state.awaitDrain === 0) + flow(src); + }; +} + +function flow(src) { + var state = src._readableState; + var chunk; + state.awaitDrain = 0; + + function write(dest, i, list) { + var written = dest.write(chunk); + if (false === written) { + state.awaitDrain++; + } + } + + while (state.pipesCount && null !== (chunk = src.read())) { + + if (state.pipesCount === 1) + write(state.pipes, 0, null); + else + state.pipes.forEach(write); + + src.emit('data', chunk); + + // if anyone needs a drain, then we have to wait for that. + if (state.awaitDrain > 0) + return; + } + + // if every destination was unpiped, either before entering this + // function, or in the while loop, then stop flowing. + // + // NB: This is a pretty rare edge case. + if (state.pipesCount === 0) { + state.flowing = false; + + // if there were data event listeners added, then switch to old mode. + if (EE.listenerCount(src, 'data') > 0) + emitDataEvents(src); + return; + } + + // at this point, no one needed a drain, so we just ran out of data + // on the next readable event, start it over again. + state.ranOut = true; +} + +function pipeOnReadable() { + if (this._readableState.ranOut) { + this._readableState.ranOut = false; + flow(this); + } +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = state.pipes.indexOf(dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data' && !this._readableState.flowing) + emitDataEvents(this); + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + this.read(0); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + emitDataEvents(this); + this.read(0); + this.emit('resume'); +}; + +Readable.prototype.pause = function() { + emitDataEvents(this, true); + this.emit('pause'); +}; + +function emitDataEvents(stream, startPaused) { + var state = stream._readableState; + + if (state.flowing) { + // https://github.com/isaacs/readable-stream/issues/16 + throw new Error('Cannot switch to old mode now.'); + } + + var paused = startPaused || false; + var readable = false; + + // convert to an old-style stream. + stream.readable = true; + stream.pipe = Stream.prototype.pipe; + stream.on = stream.addListener = Stream.prototype.on; + + stream.on('readable', function() { + readable = true; + + var c; + while (!paused && (null !== (c = stream.read()))) + stream.emit('data', c); + + if (c === null) { + readable = false; + stream._readableState.needReadable = true; + } + }); + + stream.pause = function() { + paused = true; + this.emit('pause'); + }; + + stream.resume = function() { + paused = false; + if (readable) + process.nextTick(function() { + stream.emit('readable'); + }); + else + this.read(0); + this.emit('resume'); + }; + + // now make it start, just in case it hadn't already. + stream.emit('readable'); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + if (state.decoder) + chunk = state.decoder.write(chunk); + if (!chunk || !state.objectMode && !chunk.length) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (typeof stream[i] === 'function' && + typeof this[i] === 'undefined') { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + events.forEach(function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted && state.calledRead) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000..707e4b3b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,205 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); +var util = require('util'); +util.inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + var ts = this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + this.once('finish', function() { + if ('function' === typeof this._flush) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error('not implemented'); +}; + +Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || + rs.needReadable || + rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function(n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var rs = stream._readableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000..9eaf4ec2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,371 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; +Writable.WritableState = WritableState; + +var util = require('util'); +var assert = require('assert'); +var Stream = require('stream'); + +util.inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + options = options || {}; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function(er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.buffer = []; +} + +function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (typeof cb !== 'function') + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) + ret = writeOrBuffer(this, state, chunk, encoding, cb); + + return ret; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + typeof chunk === 'string') { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) + state.needDrain = true; + + if (state.writing) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + else + doWrite(stream, state, len, chunk, encoding, cb); + + return ret; +} + +function doWrite(stream, state, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + process.nextTick(function() { + cb(er); + }); + else + cb(er); + + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) + onwriteError(stream, state, sync, er, cb); + else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(stream, state); + + if (!finished && !state.bufferProcessing && state.buffer.length) + clearBuffer(stream, state); + + if (sync) { + process.nextTick(function() { + afterWrite(stream, state, finished, cb); + }); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + cb(); + if (finished) + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, len, chunk, encoding, cb); + + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + c++; + break; + } + } + + state.bufferProcessing = false; + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); +}; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (typeof chunk !== 'undefined' && chunk !== null) + this.write(chunk, encoding); + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + state.finished = true; + stream.emit('finish'); + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once('finish', cb); + } + state.ended = true; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore new file mode 100644 index 00000000..b512c09d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE new file mode 100644 index 00000000..6de584a4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE @@ -0,0 +1,20 @@ +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md new file mode 100644 index 00000000..4d2aa001 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md @@ -0,0 +1,7 @@ +**string_decoder.js** (`require('string_decoder')`) from Node.js core + +Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. + +Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** + +The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js new file mode 100755 index 00000000..46470cfd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js @@ -0,0 +1,94 @@ +#!/usr/bin/env node + +const hyperquest = require('hyperzip')(require('hyperdirect')) + , bl = require('bl') + , fs = require('fs') + , path = require('path') + , cheerio = require('cheerio') + + , files = require('./files') + , testReplace = require('./test-replacements') + + , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' + , libsrcurl = srcurlpfx + 'lib/' + , testsrcurl = srcurlpfx + 'test/simple/' + , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' + , libourroot = path.join(__dirname, '../') + , testourroot = path.join(__dirname, '../test/simple/') + + +function processFile (url, out, replacements) { + hyperquest(url).pipe(bl(function (err, data) { + if (err) + throw err + + data = data.toString() + replacements.forEach(function (replacement) { + data = data.replace.apply(data, replacement) + }) + + fs.writeFile(out, data, 'utf8', function (err) { + if (err) + throw err + + console.log('Wrote', out) + }) + })) +} + +function processLibFile (file) { + var replacements = files[file] + , url = libsrcurl + file + , out = path.join(libourroot, replacements.out || file) + + processFile(url, out, replacements) +} + + +function processTestFile (file) { + var replacements = testReplace.all + , url = testsrcurl + file + , out = path.join(testourroot, file) + + if (testReplace[file]) + replacements = replacements.concat(testReplace[file]) + + processFile(url, out, replacements) +} + + +if (!/0\.1\d\.\d+/.test(process.argv[2])) { + console.log('Usage: build.js ') + return process.exit(-1) +} + + +//-------------------------------------------------------------------- +// Grab & process files in ../lib/ + +Object.keys(files).forEach(processLibFile) + +//-------------------------------------------------------------------- +// Discover, grab and process all test-string-decoder* files on joyent/node + +hyperquest(testlisturl).pipe(bl(function (err, data) { + if (err) + throw err + + var $ = cheerio.load(data.toString()) + + $('table.files .js-directory-link').each(function () { + var file = $(this).text() + if (/^test-string-decoder/.test(file) || file == 'common.js') + processTestFile(file) + }) +})) + +//-------------------------------------------------------------------- +// Grab the joyent/node test/common.js + +processFile( + testsrcurl + '../common.js' + , path.join(testourroot, '../common.js') + , testReplace['common.js'] +) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js new file mode 100644 index 00000000..7396a4f4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js @@ -0,0 +1,36 @@ +/* This file lists the files to be fetched from the node repo + * in the /lib/ directory which will be placed in the ../lib/ + * directory after having each of the "replacements" in the + * array for that file applied to it. The replacements are + * simply the arguments to String#replace, so they can be + * strings, regexes, functions. + */ + +module.exports['string_decoder.js'] = [ + + // pull in Bufer as a require + // add Buffer.isEncoding where missing + [ + /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m + , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' + + '\n' + + '\nvar isBufferEncoding = Buffer.isEncoding' + + '\n || function(encoding) {' + + '\n switch (encoding && encoding.toLowerCase()) {' + + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' + + '\n default: return false;' + + '\n }' + + '\n }' + + '\n' + + ] + + // use custom Buffer.isEncoding reference + , [ + /Buffer\.isEncoding\(/g + , 'isBufferEncoding\(' + ] + +] + +module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json new file mode 100644 index 00000000..f7ee6a46 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json @@ -0,0 +1,12 @@ +{ + "name": "string_decoder-build", + "version": "0.0.0", + "description": "", + "main": "build.js", + "dependencies": { + "bl": "~0.6.0", + "hyperzip": "0.0.0", + "hyperdirect": "0.0.0", + "cheerio": "~0.13.1" + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js new file mode 100644 index 00000000..5bbf6028 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js @@ -0,0 +1,24 @@ +module.exports.all = [ + [ + /require\(['"]string_decoder['"]\)/g + , 'require(\'../../\')' + ] + +] + +module.exports['common.js'] = [ + [ + /^ setImmediate,$/m + , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' + ] + + , [ + /^ clearImmediate,$/m + , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' + ] + + , [ + /^ global];$/m + , ' global].filter(Boolean);' + ] +] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js new file mode 100644 index 00000000..2e44a03e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -0,0 +1,200 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + this.charBuffer = new Buffer(6); + this.charReceived = 0; + this.charLength = 0; +}; + + +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + var offset = 0; + + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var i = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, offset, i); + this.charReceived += (i - offset); + offset = i; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (i == buffer.length) return charStr; + + // otherwise cut off the characters end from the beginning of this buffer + buffer = buffer.slice(i, buffer.length); + break; + } + + var lenIncomplete = this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); + this.charReceived = lenIncomplete; + end -= lenIncomplete; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + + return i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + var incomplete = this.charReceived = buffer.length % 2; + this.charLength = incomplete ? 2 : 0; + return incomplete; +} + +function base64DetectIncompleteChar(buffer) { + var incomplete = this.charReceived = buffer.length % 3; + this.charLength = incomplete ? 3 : 0; + return incomplete; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json new file mode 100644 index 00000000..c7cac1a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -0,0 +1,36 @@ +{ + "name": "string_decoder", + "version": "0.10.25", + "description": "The string_decoder module from Node core", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tap": "~0.4.8" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "_id": "string_decoder@0.10.25", + "dist": { + "shasum": "aa026a29a0177ff13c8df4472dcda2f26d646900" + }, + "_from": "string_decoder@~0.10.x", + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js new file mode 100644 index 00000000..ed5ff08d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js @@ -0,0 +1,200 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var path = require('path'); +var assert = require('assert'); + +exports.testDir = path.dirname(__filename); +exports.fixturesDir = path.join(exports.testDir, 'fixtures'); +exports.libDir = path.join(exports.testDir, '../lib'); +exports.tmpDir = path.join(exports.testDir, 'tmp'); +exports.PORT = +process.env.NODE_COMMON_PORT || 12346; + +if (process.platform === 'win32') { + exports.PIPE = '\\\\.\\pipe\\libuv-test'; +} else { + exports.PIPE = exports.tmpDir + '/test.sock'; +} + +var util = require('util'); +for (var i in util) exports[i] = util[i]; +//for (var i in exports) global[i] = exports[i]; + +function protoCtrChain(o) { + var result = []; + for (; o; o = o.__proto__) { result.push(o.constructor); } + return result.join(); +} + +exports.indirectInstanceOf = function(obj, cls) { + if (obj instanceof cls) { return true; } + var clsChain = protoCtrChain(cls.prototype); + var objChain = protoCtrChain(obj); + return objChain.slice(-clsChain.length) === clsChain; +}; + + +exports.ddCommand = function(filename, kilobytes) { + if (process.platform === 'win32') { + var p = path.resolve(exports.fixturesDir, 'create-file.js'); + return '"' + process.argv[0] + '" "' + p + '" "' + + filename + '" ' + (kilobytes * 1024); + } else { + return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; + } +}; + + +exports.spawnCat = function(options) { + var spawn = require('child_process').spawn; + + if (process.platform === 'win32') { + return spawn('more', [], options); + } else { + return spawn('cat', [], options); + } +}; + + +exports.spawnPwd = function(options) { + var spawn = require('child_process').spawn; + + if (process.platform === 'win32') { + return spawn('cmd.exe', ['/c', 'cd'], options); + } else { + return spawn('pwd', [], options); + } +}; + + +// Turn this off if the test should not check for global leaks. +exports.globalCheck = true; + +process.on('exit', function() { + if (!exports.globalCheck) return; + var knownGlobals = [setTimeout, + setInterval, + typeof setImmediate == 'undefined' ? null : setImmediate, + clearTimeout, + clearInterval, + typeof clearImmediate == 'undefined' ? null : clearImmediate, + console, + Buffer, + process, + global].filter(Boolean); + + if (global.gc) { + knownGlobals.push(gc); + } + + if (global.DTRACE_HTTP_SERVER_RESPONSE) { + knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); + knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); + knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); + knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); + knownGlobals.push(DTRACE_NET_STREAM_END); + knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); + knownGlobals.push(DTRACE_NET_SOCKET_READ); + knownGlobals.push(DTRACE_NET_SOCKET_WRITE); + } + if (global.COUNTER_NET_SERVER_CONNECTION) { + knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); + knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); + knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); + knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); + knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); + knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); + } + + if (global.ArrayBuffer) { + knownGlobals.push(ArrayBuffer); + knownGlobals.push(Int8Array); + knownGlobals.push(Uint8Array); + knownGlobals.push(Uint8ClampedArray); + knownGlobals.push(Int16Array); + knownGlobals.push(Uint16Array); + knownGlobals.push(Int32Array); + knownGlobals.push(Uint32Array); + knownGlobals.push(Float32Array); + knownGlobals.push(Float64Array); + knownGlobals.push(DataView); + } + + for (var x in global) { + var found = false; + + for (var y in knownGlobals) { + if (global[x] === knownGlobals[y]) { + found = true; + break; + } + } + + if (!found) { + console.error('Unknown global: %s', x); + assert.ok(false, 'Unknown global found'); + } + } +}); + + +var mustCallChecks = []; + + +function runCallChecks(exitCode) { + if (exitCode !== 0) return; + + var failed = mustCallChecks.filter(function(context) { + return context.actual !== context.expected; + }); + + failed.forEach(function(context) { + console.log('Mismatched %s function calls. Expected %d, actual %d.', + context.name, + context.expected, + context.actual); + console.log(context.stack.split('\n').slice(2).join('\n')); + }); + + if (failed.length) process.exit(1); +} + + +exports.mustCall = function(fn, expected) { + if (typeof expected !== 'number') expected = 1; + + var context = { + expected: expected, + actual: 0, + stack: (new Error).stack, + name: fn.name || '' + }; + + // add the exit listener only once to avoid listener leak warnings + if (mustCallChecks.length === 0) process.on('exit', runCallChecks); + + mustCallChecks.push(context); + + return function() { + context.actual++; + return fn.apply(this, arguments); + }; +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js new file mode 100644 index 00000000..869a4116 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js @@ -0,0 +1,75 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// verify that the string decoder works getting 1 byte at a time, +// the whole buffer at once, and that both match the .toString(enc) +// result of the entire buffer. + +var assert = require('assert'); +var SD = require('../../').StringDecoder; +var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; + +var bufs = [ '☃💩', 'asdf' ].map(function(b) { + return new Buffer(b); +}); + +// also test just arbitrary bytes from 0-15. +for (var i = 1; i <= 16; i++) { + var bytes = new Array(i).join('.').split('.').map(function(_, j) { + return j + 0x78; + }); + bufs.push(new Buffer(bytes)); +} + +encodings.forEach(testEncoding); + +console.log('ok'); + +function testEncoding(encoding) { + bufs.forEach(function(buf) { + testBuf(encoding, buf); + }); +} + +function testBuf(encoding, buf) { + console.error('# %s', encoding, buf); + + // write one byte at a time. + var s = new SD(encoding); + var res1 = ''; + for (var i = 0; i < buf.length; i++) { + res1 += s.write(buf.slice(i, i + 1)); + } + res1 += s.end(); + + // write the whole buffer at once. + var res2 = ''; + var s = new SD(encoding); + res2 += s.write(buf); + res2 += s.end(); + + // .toString() on the buffer + var res3 = buf.toString(encoding); + + console.log('expect=%j', res3); + assert.equal(res1, res3, 'one byte at a time should match toString'); + assert.equal(res2, res3, 'all bytes at once should match toString'); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js new file mode 100644 index 00000000..7f69f7ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js @@ -0,0 +1,163 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('../common'); +var assert = require('assert'); +var StringDecoder = require('../../').StringDecoder; +var decoder = new StringDecoder('utf8'); + + + +var buffer = new Buffer('$'); +assert.deepEqual('$', decoder.write(buffer)); + +buffer = new Buffer('¢'); +assert.deepEqual('', decoder.write(buffer.slice(0, 1))); +assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); + +buffer = new Buffer('€'); +assert.deepEqual('', decoder.write(buffer.slice(0, 1))); +assert.deepEqual('', decoder.write(buffer.slice(1, 2))); +assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); + +buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); +s += decoder.write(buffer.slice(2, 3)); +s += decoder.write(buffer.slice(3, 4)); +assert.ok(s.length > 0); + +// CESU-8 +buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); +s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 4)); +s += decoder.write(buffer.slice(4, 5)); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 2)); +s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(4, 5)); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 6)); +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + + +// UCS-2 +decoder = new StringDecoder('ucs2'); +buffer = new Buffer('ab', 'ucs2'); +assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars +buffer = new Buffer('abc', 'ucs2'); +assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' +assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' + + +// UTF-16LE +buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(2, 3)); +s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 4)); +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + + +// A mixed ascii and non-ascii string +// Test stolen from deps/v8/test/cctest/test-strings.cc +// U+02E4 -> CB A4 +// U+0064 -> 64 +// U+12E4 -> E1 8B A4 +// U+0030 -> 30 +// U+3045 -> E3 81 85 +var expected = '\u02e4\u0064\u12e4\u0030\u3045'; +var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, + 0x30, 0xE3, 0x81, 0x85]); +var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; + +// Split the buffer into 3 segments +// |----|------|-------| +// 0 i j buffer.length +// Scan through every possible 3 segment combination +// and make sure that the string is always parsed. +common.print('scanning '); +for (var j = 2; j < buffer.length; j++) { + for (var i = 1; i < j; i++) { + var decoder = new StringDecoder('utf8'); + + var sum = decoder.write(buffer.slice(0, i)); + + // just check that we've received the right amount + // after the first write + assert.equal(charLengths[i], sum.length); + + sum += decoder.write(buffer.slice(i, j)); + sum += decoder.write(buffer.slice(j, buffer.length)); + assert.equal(expected, sum); + common.print('.'); + } +} +console.log(' crayon!'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json new file mode 100644 index 00000000..c9e268d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json @@ -0,0 +1,42 @@ +{ + "name": "readable-stream", + "version": "1.0.25", + "description": "An exploration of a new kind of readable streams for Node.js", + "main": "readable.js", + "dependencies": { + "string_decoder": "~0.10.x" + }, + "devDependencies": { + "tap": "~0.2.6" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "BSD", + "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/readable-stream/issues" + }, + "homepage": "https://github.com/isaacs/readable-stream", + "_id": "readable-stream@1.0.25", + "dist": { + "shasum": "3d234b55fd2a25db8327618f088e50a32044df50" + }, + "_from": "readable-stream@~1.0.17", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.25.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js new file mode 100644 index 00000000..27e8d8a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js new file mode 100644 index 00000000..4d1ddfc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js @@ -0,0 +1,6 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js new file mode 100644 index 00000000..5d482f07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js new file mode 100644 index 00000000..e1e9efdf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE new file mode 100644 index 00000000..a23e08a8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile new file mode 100644 index 00000000..d583fcf4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile @@ -0,0 +1,4 @@ +browser: + node ./support/compile + +.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md new file mode 100644 index 00000000..389adae3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md @@ -0,0 +1,27 @@ +# xtend + +[![browser support][3]][4] + +Extend like a boss + +xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. + +## Examples + +```js +var extend = require("xtend") + +var combination = extend({ + a: "a" +}, { + b: "b" +}) +// { a: "a", b: "b" } +``` + + +## MIT Licenced + + + [3]: http://ci.testling.com/Raynos/xtend.png + [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js new file mode 100644 index 00000000..62391e78 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js @@ -0,0 +1,7 @@ +module.exports = hasKeys + +function hasKeys(source) { + return source !== null && + (typeof source === "object" || + typeof source === "function") +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js new file mode 100644 index 00000000..20937d19 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js @@ -0,0 +1,25 @@ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js new file mode 100644 index 00000000..17454ae4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js @@ -0,0 +1,25 @@ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend(target) { + var sources = [].slice.call(arguments, 1) + + for (var i = 0; i < sources.length; i++) { + var source = sources[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml new file mode 100644 index 00000000..60d00ce1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + - "0.8" + - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md new file mode 100644 index 00000000..ab32d0ad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md @@ -0,0 +1,39 @@ +#object-keys [![Version Badge][2]][1] + +[![Build Status][3]][4] [![dependency status][5]][6] + +[![browser support][7]][8] + +An Object.keys shim. Uses Object.keys if available. + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.equal(keys(obj), ['a', 'b', 'c']); +``` + +## Source +Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/object-keys +[2]: http://vb.teelaun.ch/ljharb/object-keys.svg +[3]: https://travis-ci.org/ljharb/object-keys.png +[4]: https://travis-ci.org/ljharb/object-keys +[5]: https://david-dm.org/ljharb/object-keys.png +[6]: https://david-dm.org/ljharb/object-keys +[7]: https://ci.testling.com/ljharb/object-keys.png +[8]: https://ci.testling.com/ljharb/object-keys +[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 +[10]: https://github.com/bestiejs/lodash + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js new file mode 100644 index 00000000..db32d458 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js @@ -0,0 +1,40 @@ +var hasOwn = Object.prototype.hasOwnProperty; +var toString = Object.prototype.toString; + +var isFunction = function (fn) { + var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; + if (!isFunc && typeof window !== 'undefined') { + isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; + } + return isFunc; +}; + +module.exports = function forEach(obj, fn) { + if (!isFunction(fn)) { + throw new TypeError('iterator must be a function'); + } + var i, k, + isString = typeof obj === 'string', + l = obj.length, + context = arguments.length > 2 ? arguments[2] : null; + if (l === +l) { + for (i = 0; i < l; i++) { + if (context === null) { + fn(isString ? obj.charAt(i) : obj[i], i, obj); + } else { + fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); + } + } + } else { + for (k in obj) { + if (hasOwn.call(obj, k)) { + if (context === null) { + fn(obj[k], k, obj); + } else { + fn.call(context, obj[k], k, obj); + } + } + } + } +}; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js new file mode 100644 index 00000000..f5b24b6d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js @@ -0,0 +1,2 @@ +module.exports = Object.keys || require('./shim'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js new file mode 100644 index 00000000..74a09897 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js @@ -0,0 +1,16 @@ +var toString = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toString.call(value); + var isArguments = str === '[object Arguments]'; + if (!isArguments) { + isArguments = str !== '[object Array]' + && value !== null + && typeof value === 'object' + && typeof value.length === 'number' + && value.length >= 0 + && toString.call(value.callee) === '[object Function]'; + } + return isArguments; +}; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json new file mode 100644 index 00000000..9dfda8dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json @@ -0,0 +1,60 @@ +{ + "name": "object-keys", + "version": "0.4.0", + "author": { + "name": "Jordan Harband" + }, + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "node test/index.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "foreach": "~2.0.3", + "is": "~0.2.6", + "tape": "~1.0.4", + "indexof": "~0.0.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "readme": "#object-keys [![Version Badge][2]][1]\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/ljharb/object-keys/issues" + }, + "homepage": "https://github.com/ljharb/object-keys", + "_id": "object-keys@0.4.0", + "dist": { + "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336" + }, + "_from": "object-keys@~0.4.0", + "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js new file mode 100644 index 00000000..b88421be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js @@ -0,0 +1,62 @@ +(function () { + "use strict"; + + // modified from https://github.com/kriskowal/es5-shim + var has = Object.prototype.hasOwnProperty, + toString = Object.prototype.toString, + forEach = require('./foreach'), + isArgs = require('./isArguments'), + hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), + hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + keysShim; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object', + isFunction = toString.call(object) === '[object Function]', + isArguments = isArgs(object), + theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + + if (isArguments) { + forEach(object, function (value) { + theKeys.push(value); + }); + } else { + var name, + skipProto = hasProtoEnumBug && isFunction; + + for (name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(name); + } + } + } + + if (hasDontEnumBug) { + var ctor = object.constructor, + skipConstructor = ctor && ctor.prototype === object; + + forEach(dontEnums, function (dontEnum) { + if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { + theKeys.push(dontEnum); + } + }); + } + return theKeys; + }; + + module.exports = keysShim; +}()); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js new file mode 100644 index 00000000..f29f065a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js @@ -0,0 +1,156 @@ +var test = require('tape'); +var forEach = require('../foreach.js'); + +test('second argument: iterator', function (t) { + var arr = []; + t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); + t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); + t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); + t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); + t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); + t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); + t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); + t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); + t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); + t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); + if (typeof window !== 'undefined') { + t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); + } + t.end(); +}); + +test('array', function (t) { + var arr = [1, 2, 3]; + + t.test('iterates over every item', function (st) { + var index = 0; + forEach(arr, function () { index += 1; }); + st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(arr.length); + forEach(arr, function (item) { + st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(arr.length); + forEach(arr, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(arr.length); + forEach(arr, function (item, index, array) { + st.deepEqual(arr, array, 'array is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(arr.length); + forEach(arr, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('object', function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + var keys = ['a', 'b', 'c']; + + var F = function () { + this.a = 1; + this.b = 2; + }; + F.prototype.c = 3; + var fKeys = ['a', 'b']; + + t.test('iterates over every object literal key', function (st) { + var counter = 0; + forEach(obj, function () { counter += 1; }); + st.equal(counter, keys.length, 'iterated ' + counter + ' times'); + st.end(); + }); + + t.test('iterates only over own keys', function (st) { + var counter = 0; + forEach(new F(), function () { counter += 1; }); + st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(keys.length); + forEach(obj, function (item) { + st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(keys.length); + forEach(obj, function (item, key) { + st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(keys.length); + forEach(obj, function (item, key, object) { + st.deepEqual(obj, object, 'object is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(1); + forEach({foo: 'bar'}, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + + +test('string', function (t) { + var str = 'str'; + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(str.length * 2 + 1); + forEach(str, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + st.equal(str.charAt(index), item); + counter += 1; + }); + st.equal(counter, str.length, 'iterates ' + str.length + ' times'); + }); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js new file mode 100644 index 00000000..8b77b1fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js @@ -0,0 +1,6 @@ + +require('./foreach'); +require('./isArguments'); + +require('./shim'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js new file mode 100644 index 00000000..62a07c2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js @@ -0,0 +1,10 @@ +var test = require('tape'); +var isArguments = require('../isArguments'); + +test('is.arguments', function (t) { + t.notOk(isArguments([]), 'array is not arguments'); + (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); + (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js new file mode 100644 index 00000000..9d932712 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js @@ -0,0 +1,134 @@ +var test = require('tape'); +var shimmedKeys = require('../index.js'); +var is = require('is'); +var keys = require('../shim.js'); +var forEach = require('foreach'); +var indexOf = require('indexof'); + +var obj = { + "str": "boz", + "obj": {}, + "arr": [], + "bool": true, + "num": 42, + "aNull": null, + "undef": undefined +}; +var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; + +test('exports a function', function (t) { + if (Object.keys) { + t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); + } else { + t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); + } + t.end(); +}); + +test('working with actual shim', function (t) { + t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); + t.end(); +}); + +test('works with an object literal', function (t) { + var theKeys = keys(obj); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, objKeys, 'Object has expected keys'); + t.end(); +}); + +test('works with an array', function (t) { + var arr = [1, 2, 3]; + var theKeys = keys(arr); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); + t.end(); +}); + +test('works with a function', function (t) { + var foo = function () {}; + foo.a = true; + + t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); + t.deepEqual(keys(foo), ['a'], 'returns expected keys'); + t.end(); +}); + +test('returns names which are own properties', function (t) { + forEach(keys(obj), function (name) { + t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); + }); + t.end(); +}); + +test('returns names which are enumerable', function (t) { + var k, loopedValues = []; + for (k in obj) { + loopedValues.push(k); + } + forEach(keys(obj), function (name) { + t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); + }); + t.end(); +}); + +test('throws an error for a non-object', function (t) { + t.throws( + function () { return keys(42); }, + new TypeError('Object.keys called on a non-object'), + 'throws on a non-object' + ); + t.end(); +}); + +test('works with an object instance', function (t) { + var Prototype = function () {}; + Prototype.prototype.foo = true; + var obj = new Prototype(); + obj.bar = true; + var theKeys = keys(obj); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); + t.end(); +}); + +test('works in iOS 5 mobile Safari', function (t) { + var Foo = function () {}; + Foo.a = function () {}; + + // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] + t.deepEqual(keys(Foo), ['a'], 'has expected keys'); + t.end(); +}); + +test('works in environments with the dontEnum bug (IE < 9)', function (t) { + var Foo = function () {}; + Foo.prototype.a = function () {}; + + // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] + t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); + t.end(); +}); + +test('shadowed properties', function (t) { + var shadowedProps = [ + 'dummyControlProp', /* just to be sure */ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + shadowedProps.sort(); + var shadowedObject = {}; + forEach(shadowedProps, function (value, index) { + shadowedObject[value] = index; + }); + var shadowedObjectKeys = keys(shadowedObject); + shadowedObjectKeys.sort(); + t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json new file mode 100644 index 00000000..a761197d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json @@ -0,0 +1,76 @@ +{ + "name": "xtend", + "version": "2.1.2", + "description": "extend like a boss", + "keywords": [ + "extend", + "merge", + "options", + "opts", + "object", + "array" + ], + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/Raynos/xtend.git" + }, + "main": "index", + "scripts": { + "test": "node test" + }, + "dependencies": { + "object-keys": "~0.4.0" + }, + "devDependencies": { + "tape": "~1.1.0" + }, + "homepage": "https://github.com/Raynos/xtend", + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "bugs": { + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/raynos/xtend/raw/master/LICENSE" + } + ], + "testling": { + "files": "test.js", + "browsers": [ + "ie/7..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] + }, + "engines": { + "node": ">=0.4" + }, + "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", + "readmeFilename": "README.md", + "_id": "xtend@2.1.2", + "dist": { + "shasum": "5e8f75d1b0d9ca976fee0f1aa88f80c7619210d5" + }, + "_from": "xtend@~2.1.1", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js new file mode 100644 index 00000000..3369d796 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js @@ -0,0 +1,63 @@ +var test = require("tape") +var extend = require("./") +var mutableExtend = require("./mutable") + +test("merge", function(assert) { + var a = { a: "foo" } + var b = { b: "bar" } + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("replace", function(assert) { + var a = { a: "foo" } + var b = { a: "bar" } + + assert.deepEqual(extend(a, b), { a: "bar" }) + assert.end() +}) + +test("undefined", function(assert) { + var a = { a: undefined } + var b = { b: "foo" } + + assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) + assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) + assert.end() +}) + +test("handle 0", function(assert) { + var a = { a: "default" } + var b = { a: 0 } + + assert.deepEqual(extend(a, b), { a: 0 }) + assert.deepEqual(extend(b, a), { a: "default" }) + assert.end() +}) + +test("is immutable", function (assert) { + var record = {} + + extend(record, { foo: "bar" }) + assert.equal(record.foo, undefined) + assert.end() +}) + +test("null as argument", function (assert) { + var a = { foo: "bar" } + var b = null + var c = void 0 + + assert.deepEqual(extend(b, a, c), { foo: "bar" }) + assert.end() +}) + +test("mutable", function (assert) { + var a = { foo: "bar" } + + mutableExtend(a, { bar: "baz" }) + + assert.equal(a.bar, "baz") + assert.end() +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json new file mode 100644 index 00000000..9612fee2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json @@ -0,0 +1,48 @@ +{ + "name": "through2", + "version": "0.4.1", + "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", + "main": "through2.js", + "scripts": { + "test": "node test/test.js", + "test-local": "brtapsauce-local test/basic-test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/rvagg/through2.git" + }, + "keywords": [ + "stream", + "streams2", + "through", + "transform" + ], + "author": { + "name": "Rod Vagg", + "email": "r@va.gg", + "url": "https://github.com/rvagg" + }, + "license": "MIT", + "dependencies": { + "readable-stream": "~1.0.17", + "xtend": "~2.1.1" + }, + "devDependencies": { + "tape": "~2.3.0", + "bl": "~0.6.0", + "stream-spigot": "~3.0.1", + "brtapsauce": "~0.2.2" + }, + "readme": "# through2\n\n\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\nthrough2([ options, ] [ transformFunction ] [, flushFunction ])\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\nthrough2.ctor([ options, ] transformFunction[, flushFunction ])\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/rvagg/through2/issues" + }, + "homepage": "https://github.com/rvagg/through2", + "_id": "through2@0.4.1", + "dist": { + "shasum": "48772c8b50c4955c25e7cdbe69f4220f4138178b" + }, + "_from": "through2@~0.4.0", + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.4.1.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js new file mode 100644 index 00000000..9d137c7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js @@ -0,0 +1,334 @@ +const test = require('tape') + , through2 = require('../') + , crypto = require('crypto') + , bl = require('bl') + , spigot = require('stream-spigot') + +test('plain through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('pipeable through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + // bl() acts like a proper streams2 stream and passes as much as it's + // asked for, so we really only get one write with such a small amount + // of data + t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') + t.end() + })) + + var bufs = bl() + bufs.append(crypto.randomBytes(10)) + bufs.append(crypto.randomBytes(5)) + bufs.append(crypto.randomBytes(10)) + bufs.pipe(th2) +}) + +test('object through', function (t) { + t.plan(3) + + var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object through with through2.obj', function (t) { + t.plan(3) + + var th2 = through2.obj(function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('flushing through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }, function (callback) { + this.push(new Buffer([ 101, 110, 100 ])) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('plain through ctor', function (t) { + var Th2 = through2.ctor(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + var th2 = new Th2() + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('reuse through ctor', function (t) { + t.plan(4) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + if (!this._i) { + t.ok(1, 'did not contain previous instance data (this._i)') + this._i = 97 // 'a' + } else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + var th2 = Th2() + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + + var newInstance = Th2() + newInstance.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') + })) + + newInstance.write(crypto.randomBytes(7)) + newInstance.write(crypto.randomBytes(4)) + newInstance.write(crypto.randomBytes(7)) + newInstance.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('object through ctor', function (t) { + t.plan(3) + + var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = new Th2() + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('pipeable object through ctor', function (t) { + t.plan(4) + + var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { + if (record.temp != null && record.unit == 'F') { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = 'C' + } + this.push(record) + callback() + }) + + var th2 = Th2() + + var expect = [-19, -40, 100, 22] + th2.on('data', function (o) { + t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') + }) + + spigot({objectMode: true}, [ + {temp: -2.2, unit: 'F'}, + {temp: -40, unit: 'F'}, + {temp: 212, unit: 'F'}, + {temp: 22, unit: 'C'} + ]).pipe(th2) +}) + +test('object through ctor override', function (t) { + t.plan(3) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({objectMode: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object settings available in transform', function (t) { + t.plan(6) + + var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2() + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object settings available in transform override', function (t) { + t.plan(6) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({objectMode: true, peek: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object override extends options', function (t) { + t.plan(6) + + var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({peek: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js new file mode 100644 index 00000000..cc10868b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js @@ -0,0 +1,42 @@ +/* +on rvagg@fletcher: + @0.2.3: Ran 36719 iterations in 10000 ms +*/ + +const through2 = require('../') + , bl = require('bl') + , crypto = require('crypto') + , assert = require('assert') + +function run (callback) { + var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) + , stream = through2(function (chunk, env, callback) { + callback(null, chunk.toString('hex')) + }) + + stream.pipe(bl(function (err, data) { + assert(!err) + assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) + callback() + })) + + bufs.forEach(function (b) { + stream.write(b) + }) + stream.end() +} + +var count = 0 + , start = Date.now() + +;(function exec () { + count++ + run(function () { + if (Date.now() - start < 1000 * 10) { + return setImmediate(exec) + } + console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') + }) +}()) + +console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js new file mode 100644 index 00000000..a6d28625 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js @@ -0,0 +1,38 @@ +#!/usr/bin/env node + +const user = process.env.SAUCE_USER + , key = process.env.SAUCE_KEY + , path = require('path') + , brtapsauce = require('brtapsauce') + , testFile = path.join(__dirname, 'basic-test.js') + + , capabilities = [ + { browserName: 'chrome' , platform: 'Windows XP', version: '' } + , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } + , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } + , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } + , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } + , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } + , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } + , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } + , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } + , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } + , { browserName: 'opera' , platform: 'Windows 7' , version: '' } + , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } + , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } + , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } + ] + +if (!user) + throw new Error('Must set a SAUCE_USER env var') +if (!key) + throw new Error('Must set a SAUCE_KEY env var') + +brtapsauce({ + name : 'Traversty' + , user : user + , key : key + , brsrc : testFile + , capabilities : capabilities + , options : { timeout: 60 * 6 } +}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js new file mode 100644 index 00000000..aa9b4877 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js @@ -0,0 +1,9 @@ +require('./basic-test') + +if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) + return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') + +if (!/v0\.10/.test(process.version)) + return console.log('Not Node v0.10.x, not running sauce tests') + +require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js new file mode 100644 index 00000000..c1104848 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js @@ -0,0 +1,78 @@ +var Transform = require('readable-stream/transform') + , inherits = require('util').inherits + , xtend = require('xtend') + + +// a noop _transform function +function noop (chunk, enc, callback) { + callback(null, chunk) +} + + +// create a new export function, used by both the main export and +// the .ctor export, contains common logic for dealing with arguments +function through2 (construct) { + return function (options, transform, flush) { + if (typeof options == 'function') { + flush = transform + transform = options + options = {} + } + + if (typeof transform != 'function') + transform = noop + + if (typeof flush != 'function') + flush = null + + return construct(options, transform, flush) + } +} + + +// main export, just make me a transform stream! +module.exports = through2(function (options, transform, flush) { + var t2 = new Transform(options) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +// make me a reusable prototype that I can `new`, or implicitly `new` +// with a constructor call +module.exports.ctor = through2(function (options, transform, flush) { + function Through2 (override) { + if (!(this instanceof Through2)) + return new Through2(override) + + this.options = xtend(options, override) + + Transform.call(this, this.options) + } + + inherits(Through2, Transform) + + Through2.prototype._transform = transform + + if (flush) + Through2.prototype._flush = flush + + return Through2 +}) + + +module.exports.obj = through2(function (options, transform, flush) { + var t2 = new Transform(xtend({ objectMode: true }, options)) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/package.json new file mode 100644 index 00000000..d289871c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/package.json @@ -0,0 +1,55 @@ +{ + "name": "download", + "version": "0.1.10", + "description": "Download and extract files effortlessly", + "keywords": [ + "url", + "http", + "download", + "extract" + ], + "homepage": "https://github.com/kevva/download", + "bugs": { + "url": "https://github.com/kevva/download/issues" + }, + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "http://kevinmartensson.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/kevva/download.git" + }, + "scripts": { + "test": "mocha --reporter list" + }, + "main": "download.js", + "files": [ + "download.js" + ], + "dependencies": { + "decompress": "~0.1.5", + "each-async": "~0.1.1", + "mkdirp": "~0.3.5", + "request": "~2.31.0", + "through2": "~0.4.0" + }, + "devDependencies": { + "mocha": "~1.17.0", + "nock": "~0.27.1", + "rimraf": "~2.2.5" + }, + "engines": { + "node": ">=0.10.0" + }, + "readme": "# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)\n\nDownload and extract files effortlessly in Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/download): `npm install download`\n\n## Examples\n\nIf you're fetching an archive you can set `extract: true` in options and\nit'll extract it for you.\n\n```js\nvar download = require('download');\n\n// download and extract `foo.tar.gz` into `bar/`\ndownload('foo.tar.gz', 'bar', { extract: true });\n\n// download and save `foo.exe` into `bar/foo.exe` with mode `0755`\ndownload('foo.exe', 'bar', { mode: '0755' });\n\n// download and save `foo.zip` into `bar/foobar.zip`\ndownload({ url: 'foo.zip', name: 'foobar.zip' }, 'bar');\n\n// download and save an array of files in `bar/`\nvar files = ['foo.jpg', 'bar.jpg', 'cat.jpg'];\ndownload(files, 'bar');\n\n// download, save and rename an array of files in `bar/`\nvar files = [{\n url: 'foo.jpg',\n name: 'foobar.jpg'\n}, {\n url: 'cat.jpg',\n name: 'dog.jpg'\n}];\ndownload(files, 'bar');\n```\n\n## API\n\n### download(url, dest, opts)\n\nDownload a file or an array of files to a given destination. Returns an EventEmitter \nthat emits the following possible events:\n\n* `response` — Relayed when the underlying `http.ClientRequest` emits the same \nevent. Listeners called with a `http.IncomingMessage` instance.\n* `data` — Relayed when the underlying `http.IncomingMessage` emits the same \nevent. Listeners called with a `Buffer` instance.\n* `error` — Relayed when the underlying `http.ClientRequest` emits the same event \nor when the response status code is not in the 200s. Listeners called with an \n`Error` instance (in the first case) or the response status code.\n* `close` — Relayed when the underlying `stream.Duplex` emits the same event.\n\n## Options\n\nYou can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below.\n\n### extract\n\nType: `Boolean` \nDefault: `false`\n\nIf set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/).\n\n### mode\n\nType: `String` \nDefault: `undefined`\n\nSet mode on the downloaded files.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", + "readmeFilename": "README.md", + "_id": "download@0.1.10", + "dist": { + "shasum": "dc5d3ab4a7fc78e374e2de0381273b7b999bc29d" + }, + "_from": "download@~0.1.2", + "_resolved": "https://registry.npmjs.org/download/-/download-0.1.10.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore new file mode 100644 index 00000000..2ccbe465 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml new file mode 100644 index 00000000..c1ffcb31 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/History.md new file mode 100644 index 00000000..d1fa5334 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/History.md @@ -0,0 +1,20 @@ + +0.0.2 / 2013-05-29 +================== + + * Updated github url + * Fix bug calling isbin with list of paths + * Add tests for sync version + * Added travis CI passing image to readme + * Added node engines and keywords + * Added travis CI config + * Added basic readme + * Added basic test suite and Makefile + * Add async version + * Some refactorings using 'some' function + * Fixed issue with wrong paths if called multiple times + +0.0.1 / 2012-12-06 +================== + + * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile new file mode 100644 index 00000000..1a2444a1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile @@ -0,0 +1,6 @@ +REPORTER ?= dot + +test: + @NODE_ENV=test ./node_modules/mocha/bin/mocha -R $(REPORTER) + +.PHONY: test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/README.md new file mode 100644 index 00000000..5224d614 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/README.md @@ -0,0 +1,59 @@ +[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin) + +# Isbin + +Tiny little helper library to determine if a certain binary is available within $PATH or any additional folder. + +# Installation + +```bash +$ npm install isbin +``` + +# Usage + +```js +var isbin = require('isbin'); + +// Test against $PATH +isbin('mysql', function(exists) { + console.log(exists); // ==> Boolean +}); + +// With additional path to test +isbin('mysql', '/usr/local/bin', function(exists) { + console.log(exists); // ==> Boolean +}); + +// Or multiple ones +isbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) { + console.log(exists); // ==> Boolean +}); +``` + +There are also synchronous versions available + +```js +var exists = isbin('mysql'); +var exists = isbin('mysql', '/usr/local/bin'); +var exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']); +``` + +# Running the tests + +```bash +$ npm install +$ make test +``` + +# License + +(The MIT License) + +Copyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/index.js new file mode 100644 index 00000000..bb0a047c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/index.js @@ -0,0 +1 @@ +module.exports = require('./lib'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js new file mode 100644 index 00000000..1b8a5cac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js @@ -0,0 +1,51 @@ +/** + * Require dependencies + */ + +var fs = require('fs') + , async = require('async'); + +/** + * Check if given binary exists + * + * @param {String} bin Binary to test + * @param {String|Array} additional Additional paths to check + * @param {Function(result)} isbinChecked Callback when check is done async, optional + * @return {Boolean} True if binary was found + */ + +function isbin(bin, additional, isbinChecked) { + // isbin(bin, cb) + if (!isbinChecked) isbinChecked = additional; + + // Read $PATH to get set up bin folders + var paths = process.env.PATH.split(':') || []; + + // isbin(bin, 'path', cb) + if ('string' === typeof additional) { + paths.push(additional); + } + + // isbin(bin, ['path1', 'path2'], cb) + if ('object' === typeof additional && additional.length !== null) { + paths.concat(additional); + } + + // async check + if ('function' === typeof isbinChecked) { + return async.some(paths, function(path, pathChecked) { + fs.exists(path + '/' + bin, pathChecked); + }, isbinChecked); + } + + // sync check + return paths.reverse().some(function(path) { + return fs.existsSync(path + '/' + bin); + }); +}; + +/** + * Expose module + */ + +module.exports = isbin; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules new file mode 100644 index 00000000..a9aae984 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules @@ -0,0 +1,9 @@ +[submodule "deps/nodeunit"] + path = deps/nodeunit + url = git://github.com/caolan/nodeunit.git +[submodule "deps/UglifyJS"] + path = deps/UglifyJS + url = https://github.com/mishoo/UglifyJS.git +[submodule "deps/nodelint"] + path = deps/nodelint + url = https://github.com/tav/nodelint.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore new file mode 100644 index 00000000..9bdfc97c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore @@ -0,0 +1,4 @@ +deps +dist +test +nodelint.cfg \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE new file mode 100644 index 00000000..b7f9d500 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile new file mode 100644 index 00000000..bad647c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile @@ -0,0 +1,25 @@ +PACKAGE = asyncjs +NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) +CWD := $(shell pwd) +NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit +UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs +NODELINT = $(CWD)/node_modules/nodelint/nodelint + +BUILDDIR = dist + +all: clean test build + +build: $(wildcard lib/*.js) + mkdir -p $(BUILDDIR) + $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js + +test: + $(NODEUNIT) test + +clean: + rm -rf $(BUILDDIR) + +lint: + $(NODELINT) --config nodelint.cfg lib/async.js + +.PHONY: test build all diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md new file mode 100644 index 00000000..1bbbc477 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md @@ -0,0 +1,1021 @@ +# Async.js + +Async is a utility module which provides straight-forward, powerful functions +for working with asynchronous JavaScript. Although originally designed for +use with [node.js](http://nodejs.org), it can also be used directly in the +browser. + +Async provides around 20 functions that include the usual 'functional' +suspects (map, reduce, filter, forEach…) as well as some common patterns +for asynchronous control flow (parallel, series, waterfall…). All these +functions assume you follow the node.js convention of providing a single +callback as the last argument of your async function. + + +## Quick Examples + + async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file + }); + + async.filter(['file1','file2','file3'], path.exists, function(results){ + // results now equals an array of the existing files + }); + + async.parallel([ + function(){ ... }, + function(){ ... } + ], callback); + + async.series([ + function(){ ... }, + function(){ ... } + ]); + +There are many more functions available so take a look at the docs below for a +full list. This module aims to be comprehensive, so if you feel anything is +missing please create a GitHub issue for it. + + +## Download + +Releases are available for download from +[GitHub](http://github.com/caolan/async/downloads). +Alternatively, you can install using Node Package Manager (npm): + + npm install async + + +__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed + +__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped + + +## In the Browser + +So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: + + + + + +## Documentation + +### Collections + +* [forEach](#forEach) +* [map](#map) +* [filter](#filter) +* [reject](#reject) +* [reduce](#reduce) +* [detect](#detect) +* [sortBy](#sortBy) +* [some](#some) +* [every](#every) +* [concat](#concat) + +### Control Flow + +* [series](#series) +* [parallel](#parallel) +* [whilst](#whilst) +* [until](#until) +* [waterfall](#waterfall) +* [queue](#queue) +* [auto](#auto) +* [iterator](#iterator) +* [apply](#apply) +* [nextTick](#nextTick) + +### Utils + +* [memoize](#memoize) +* [unmemoize](#unmemoize) +* [log](#log) +* [dir](#dir) +* [noConflict](#noConflict) + + +## Collections + + +### forEach(arr, iterator, callback) + +Applies an iterator function to each item in an array, in parallel. +The iterator is called with an item from the list and a callback for when it +has finished. If the iterator passes an error to this callback, the main +callback for the forEach function is immediately called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + + // assuming openFiles is an array of file names and saveFile is a function + // to save the modified contents of that file: + + async.forEach(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error + }); + +--------------------------------------- + + +### forEachSeries(arr, iterator, callback) + +The same as forEach only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. This means the iterator functions will complete in order. + + +--------------------------------------- + + +### forEachLimit(arr, limit, iterator, callback) + +The same as forEach only the iterator is applied to batches of items in the +array, in series. The next batch of iterators is only called once the current +one has completed processing. + +__Arguments__ + +* arr - An array to iterate over. +* limit - How many items should be in each batch. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + + // Assume documents is an array of JSON objects and requestApi is a + // function that interacts with a rate-limited REST api. + + async.forEachLimit(documents, 20, requestApi, function(err){ + // if any of the saves produced an error, err would equal that error + }); +--------------------------------------- + + +### map(arr, iterator, callback) + +Produces a new array of values by mapping each value in the given array through +the iterator function. The iterator is called with an item from the array and a +callback for when it has finished processing. The callback takes 2 arguments, +an error and the transformed item from the array. If the iterator passes an +error to this callback, the main callback for the map function is immediately +called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order, however +the results array will be in the same order as the original array. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + + async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file + }); + +--------------------------------------- + + +### mapSeries(arr, iterator, callback) + +The same as map only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +--------------------------------------- + + +### filter(arr, iterator, callback) + +__Alias:__ select + +Returns a new array of all the values which pass an async truth test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(results) - A callback which is called after all the iterator + functions have finished. + +__Example__ + + async.filter(['file1','file2','file3'], path.exists, function(results){ + // results now equals an array of the existing files + }); + +--------------------------------------- + + +### filterSeries(arr, iterator, callback) + +__alias:__ selectSeries + +The same as filter only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + +--------------------------------------- + + +### reject(arr, iterator, callback) + +The opposite of filter. Removes values that pass an async truth test. + +--------------------------------------- + + +### rejectSeries(arr, iterator, callback) + +The same as filter, only the iterator is applied to each item in the array +in series. + + +--------------------------------------- + + +### reduce(arr, memo, iterator, callback) + +__aliases:__ inject, foldl + +Reduces a list of values into a single value using an async iterator to return +each successive step. Memo is the initial state of the reduction. This +function only operates in series. For performance reasons, it may make sense to +split a call to this function into a parallel map, then use the normal +Array.prototype.reduce on the results. This function is for situations where +each step in the reduction needs to be async, if you can get the data before +reducing it then its probably a good idea to do so. + +__Arguments__ + +* arr - An array to iterate over. +* memo - The initial state of the reduction. +* iterator(memo, item, callback) - A function applied to each item in the + array to produce the next step in the reduction. The iterator is passed a + callback which accepts an optional error as its first argument, and the state + of the reduction as the second. If an error is passed to the callback, the + reduction is stopped and the main callback is immediately called with the + error. +* callback(err, result) - A callback which is called after all the iterator + functions have finished. Result is the reduced value. + +__Example__ + + async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); + }, function(err, result){ + // result is now equal to the last value of memo, which is 6 + }); + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, callback) + +__Alias:__ foldr + +Same as reduce, only operates on the items in the array in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, callback) + +Returns the first value in a list that passes an async truth test. The +iterator is applied in parallel, meaning the first iterator to return true will +fire the detect callback with that result. That means the result might not be +the first item in the original array (in terms of order) that passes the test. + +If order within the original array is important then look at detectSeries. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value undefined if none passed. + +__Example__ + + async.detect(['file1','file2','file3'], path.exists, function(result){ + // result now equals the first file in the list that exists + }); + +--------------------------------------- + + +### detectSeries(arr, iterator, callback) + +The same as detect, only the iterator is applied to each item in the array +in series. This means the result is always the first in the original array (in +terms of array order) that passes the truth test. + + +--------------------------------------- + + +### sortBy(arr, iterator, callback) + +Sorts a list by the results of running each value through an async iterator. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and a value to use as the sort criteria. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is the items from + the original array sorted by the values returned by the iterator calls. + +__Example__ + + async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); + }, function(err, results){ + // results is now the original array of files sorted by + // modified date + }); + + +--------------------------------------- + + +### some(arr, iterator, callback) + +__Alias:__ any + +Returns true if at least one element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. Once any iterator +call returns true, the main callback is immediately called. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + either true or false depending on the values of the async tests. + +__Example__ + + async.some(['file1','file2','file3'], path.exists, function(result){ + // if result is true then at least one of the files exists + }); + +--------------------------------------- + + +### every(arr, iterator, callback) + +__Alias:__ all + +Returns true if every element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called after all the iterator + functions have finished. Result will be either true or false depending on + the values of the async tests. + +__Example__ + + async.every(['file1','file2','file3'], path.exists, function(result){ + // if result is true then every file exists + }); + +--------------------------------------- + + +### concat(arr, iterator, callback) + +Applies an iterator to each item in a list, concatenating the results. Returns the +concatenated list. The iterators are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of the arguments passed to the iterator function. + +__Arguments__ + +* arr - An array to iterate over +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and an array of results. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array containing + the concatenated results of the iterator function. + +__Example__ + + async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories + }); + +--------------------------------------- + + +### concatSeries(arr, iterator, callback) + +Same as async.concat, but executes in series instead of parallel. + + +## Control Flow + + +### series(tasks, [callback]) + +Run an array of functions in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run and the callback for the series is +immediately called with the value of the error. Once the tasks have completed, +the results are passed to the final callback as an array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.series. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback it must call on completion. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets an array of all the arguments passed to + the callbacks used in the array. + +__Example__ + + async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + }, + ], + // optional callback + function(err, results){ + // results is now equal to ['one', 'two'] + }); + + + // an example using an object instead of an array + async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + }, + }, + function(err, results) { + // results is now equal to: {one: 1, two: 2} + }); + + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run an array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main callback is immediately called with the value of the error. +Once the tasks have completed, the results are passed to the final callback as an +array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.parallel. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed a + callback it must call on completion. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets an array of all the arguments passed to + the callbacks used in the array. + +__Example__ + + async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + }, + ], + // optional callback + function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. + }); + + + // an example using an object instead of an array + async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + }, + }, + function(err, results) { + // results is now equals to: {one: 1, two: 2} + }); + + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call fn, while test returns true. Calls the callback when stopped, +or an error occurs. + +__Arguments__ + +* test() - synchronous truth test to perform before each execution of fn. +* fn(callback) - A function to call each time the test passes. The function is + passed a callback which must be called once it has completed with an optional + error as the first argument. +* callback(err) - A callback which is called after the test fails and repeated + execution of fn has stopped. + +__Example__ + + var count = 0; + + async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } + ); + + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call fn, until test returns true. Calls the callback when stopped, +or an error occurs. + +The inverse of async.whilst. + + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs an array of functions in series, each passing their results to the next in +the array. However, if any of the functions pass an error to the callback, the +next function is not executed and the main callback is immediately called with +the error. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a callback it + must call on completion. +* callback(err, [results]) - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + + async.waterfall([ + function(callback){ + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback){ + callback(null, 'three'); + }, + function(arg1, callback){ + // arg1 now equals 'three' + callback(null, 'done'); + } + ], function (err, result) { + // result now equals 'done' + }); + + +--------------------------------------- + + +### queue(worker, concurrency) + +Creates a queue object with the specified concurrency. Tasks added to the +queue will be processed in parallel (up to the concurrency limit). If all +workers are in progress, the task is queued until one is available. Once +a worker has completed a task, the task's callback is called. + +__Arguments__ + +* worker(task, callback) - An asynchronous function for processing a queued + task. +* concurrency - An integer for determining how many worker functions should be + run in parallel. + +__Queue objects__ + +The queue object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* concurrency - an integer for determining how many worker functions should be + run in parallel. This property can be changed after a queue is created to + alter the concurrency on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + + // create a queue object with concurrency 2 + + var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); + }, 2); + + + // assign a callback + q.drain = function() { + console.log('all items have been processed'); + } + + // add some items to the queue + + q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); + }); + q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); + }); + + // add some items to the queue (batch-wise) + + q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing bar'); + }); + + +--------------------------------------- + + +### auto(tasks, [callback]) + +Determines the best order for running functions based on their requirements. +Each function can optionally depend on other functions being completed first, +and each function is run as soon as its requirements are satisfied. If any of +the functions pass an error to their callback, that function will not complete +(so any other functions depending on it will not run) and the main callback +will be called immediately with the error. Functions also receive an object +containing the results of functions which have completed so far. + +__Arguments__ + +* tasks - An object literal containing named functions or an array of + requirements, with the function itself the last item in the array. The key + used for each function or array is used when specifying requirements. The + syntax is easier to understand by looking at the example. +* callback(err, results) - An optional callback which is called when all the + tasks have been completed. The callback will receive an error as an argument + if any tasks pass an error to their callback. If all tasks complete + successfully, it will receive an object containing their results. + +__Example__ + + async.auto({ + get_data: function(callback){ + // async code to get some data + }, + make_folder: function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + }, + write_file: ['get_data', 'make_folder', function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, filename); + }], + email_link: ['write_file', function(callback, results){ + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + }] + }); + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + + async.parallel([ + function(callback){ + // async code to get some data + }, + function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + } + ], + function(results){ + async.series([ + function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + }, + email_link: function(callback){ + // once the file is written let's email a link to it... + } + ]); + }); + +For a complicated series of async tasks using the auto function makes adding +new tasks much easier and makes the code more readable. + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the array, +returning a continuation to call the next one after that. Its also possible to +'peek' the next iterator by doing iterator.next(). + +This function is used internally by the async module but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a callback it + must call on completion. + +__Example__ + + var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } + ]); + + node> var iterator2 = iterator(); + 'one' + node> var iterator3 = iterator2(); + 'two' + node> iterator3(); + 'three' + node> var nextfn = iterator2.next(); + node> nextfn(); + 'three' + + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied, a useful +shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + + // using apply + + async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), + ]); + + + // the same process without using apply + + async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + }, + ]); + +It's possible to pass any number of additional arguments when calling the +continuation: + + node> var fn = async.apply(sys.puts, 'one'); + node> fn('two', 'three'); + one + two + three + +--------------------------------------- + + +### nextTick(callback) + +Calls the callback on a later loop around the event loop. In node.js this just +calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), +which means other higher priority events may precede the execution of the callback. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* callback - The function to call on a later loop around the event loop. + +__Example__ + + var call_order = []; + async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two] + }); + call_order.push('one') + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an async function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +__Arguments__ + +* fn - the function you to proxy and cache results from. +* hasher - an optional function for generating a custom hash for storing + results, it has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + + var slow_fn = function (name, callback) { + // do something + callback(null, result); + }; + var fn = async.memoize(slow_fn); + + // fn can now be used as if it were slow_fn + fn('some name', function () { + // callback + }); + + +### unmemoize(fn) + +Undoes a memoized function, reverting it to the original, unmemoized +form. Comes handy in tests. + +__Arguments__ + +* fn - the memoized function + + +### log(function, arguments) + +Logs the result of an async function to the console. Only works in node.js or +in browsers that support console.log and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.log is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + + var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); + }; + + node> async.log(hello, 'world'); + 'hello world' + + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an async function to the console using console.dir to +display the properties of the resulting object. Only works in node.js or +in browsers that support console.dir and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.dir is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + + var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); + }; + + node> async.dir(hello, 'world'); + {hello: 'world'} + + +--------------------------------------- + + +### noConflict() + +Changes the value of async back to its original value, returning a reference to the +async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js new file mode 100644 index 00000000..8e238453 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js @@ -0,0 +1,3 @@ +// This file is just added for convenience so this repository can be +// directly checked out into a project's deps folder +module.exports = require('./lib/async'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js new file mode 100644 index 00000000..7cc4f5ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js @@ -0,0 +1,692 @@ +/*global setTimeout: false, console: false */ +(function () { + + var async = {}; + + // global on the server, window in the browser + var root = this, + previous_async = root.async; + + if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } + else { + root.async = async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + //// cross-browser compatiblity functions //// + + var _forEach = function (arr, iterator) { + if (arr.forEach) { + return arr.forEach(iterator); + } + for (var i = 0; i < arr.length; i += 1) { + iterator(arr[i], i, arr); + } + }; + + var _map = function (arr, iterator) { + if (arr.map) { + return arr.map(iterator); + } + var results = []; + _forEach(arr, function (x, i, a) { + results.push(iterator(x, i, a)); + }); + return results; + }; + + var _reduce = function (arr, iterator, memo) { + if (arr.reduce) { + return arr.reduce(iterator, memo); + } + _forEach(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + }; + + var _keys = function (obj) { + if (Object.keys) { + return Object.keys(obj); + } + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + if (typeof process === 'undefined' || !(process.nextTick)) { + async.nextTick = function (fn) { + setTimeout(fn, 0); + }; + } + else { + async.nextTick = process.nextTick; + } + + async.forEach = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + _forEach(arr, function (x) { + iterator(x, function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed === arr.length) { + callback(null); + } + } + }); + }); + }; + + async.forEachSeries = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + var iterate = function () { + iterator(arr[completed], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed === arr.length) { + callback(null); + } + else { + iterate(); + } + } + }); + }; + iterate(); + }; + + async.forEachLimit = function (arr, limit, iterator, callback) { + callback = callback || function () {}; + if (!arr.length || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed === arr.length) { + return callback(); + } + + while (running < limit && started < arr.length) { + started += 1; + running += 1; + iterator(arr[started - 1], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + running -= 1; + if (completed === arr.length) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + + + var doParallel = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.forEach].concat(args)); + }; + }; + var doSeries = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.forEachSeries].concat(args)); + }; + }; + + + var _asyncMap = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + }; + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.reduce = function (arr, memo, iterator, callback) { + async.forEachSeries(arr, function (x, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + // inject alias + async.inject = async.reduce; + // foldl alias + async.foldl = async.reduce; + + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, function (x) { + return x; + }).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + // foldr alias + async.foldr = async.reduceRight; + + var _filter = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.filter = doParallel(_filter); + async.filterSeries = doSeries(_filter); + // select alias + async.select = async.filter; + async.selectSeries = async.filterSeries; + + var _reject = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (!v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.reject = doParallel(_reject); + async.rejectSeries = doSeries(_reject); + + var _detect = function (eachfn, arr, iterator, main_callback) { + eachfn(arr, function (x, callback) { + iterator(x, function (result) { + if (result) { + main_callback(x); + main_callback = function () {}; + } + else { + callback(); + } + }); + }, function (err) { + main_callback(); + }); + }; + async.detect = doParallel(_detect); + async.detectSeries = doSeries(_detect); + + async.some = function (arr, iterator, main_callback) { + async.forEach(arr, function (x, callback) { + iterator(x, function (v) { + if (v) { + main_callback(true); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(false); + }); + }; + // any alias + async.any = async.some; + + async.every = function (arr, iterator, main_callback) { + async.forEach(arr, function (x, callback) { + iterator(x, function (v) { + if (!v) { + main_callback(false); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(true); + }); + }; + // all alias + async.all = async.every; + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + var fn = function (left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }; + callback(null, _map(results.sort(fn), function (x) { + return x.value; + })); + } + }); + }; + + async.auto = function (tasks, callback) { + callback = callback || function () {}; + var keys = _keys(tasks); + if (!keys.length) { + return callback(null); + } + + var results = {}; + + var listeners = []; + var addListener = function (fn) { + listeners.unshift(fn); + }; + var removeListener = function (fn) { + for (var i = 0; i < listeners.length; i += 1) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + return; + } + } + }; + var taskComplete = function () { + _forEach(listeners.slice(0), function (fn) { + fn(); + }); + }; + + addListener(function () { + if (_keys(results).length === keys.length) { + callback(null, results); + callback = function () {}; + } + }); + + _forEach(keys, function (k) { + var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; + var taskCallback = function (err) { + if (err) { + callback(err); + // stop subsequent errors hitting callback multiple times + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + taskComplete(); + } + }; + var requires = task.slice(0, Math.abs(task.length - 1)) || []; + var ready = function () { + return _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + }; + if (ready()) { + task[task.length - 1](taskCallback, results); + } + else { + var listener = function () { + if (ready()) { + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + }; + addListener(listener); + } + }); + }; + + async.waterfall = function (tasks, callback) { + callback = callback || function () {}; + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + async.nextTick(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(async.iterator(tasks))(); + }; + + async.parallel = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.map(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.forEach(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.series = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.mapSeries(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.forEachSeries(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.iterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + async.apply = function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + return function () { + return fn.apply( + null, args.concat(Array.prototype.slice.call(arguments)) + ); + }; + }; + + var _concat = function (eachfn, arr, fn, callback) { + var r = []; + eachfn(arr, function (x, cb) { + fn(x, function (err, y) { + r = r.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, r); + }); + }; + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + if (test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.whilst(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.until = function (test, iterator, callback) { + if (!test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.until(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.queue = function (worker, concurrency) { + var workers = 0; + var q = { + tasks: [], + concurrency: concurrency, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _forEach(data, function(task) { + q.tasks.push({ + data: task, + callback: typeof callback === 'function' ? callback : null + }); + if (q.saturated && q.tasks.length == concurrency) { + q.saturated(); + } + async.nextTick(q.process); + }); + }, + process: function () { + if (workers < q.concurrency && q.tasks.length) { + var task = q.tasks.shift(); + if(q.empty && q.tasks.length == 0) q.empty(); + workers += 1; + worker(task.data, function () { + workers -= 1; + if (task.callback) { + task.callback.apply(task, arguments); + } + if(q.drain && q.tasks.length + workers == 0) q.drain(); + q.process(); + }); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + } + }; + return q; + }; + + var _console_fn = function (name) { + return function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + fn.apply(null, args.concat([function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (typeof console !== 'undefined') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _forEach(args, function (x) { + console[name](x); + }); + } + } + }])); + }; + }; + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + hasher = hasher || function (x) { + return x; + }; + var memoized = function () { + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + var key = hasher.apply(null, args); + if (key in memo) { + callback.apply(null, memo[key]); + } + else if (key in queues) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([function () { + memo[key] = arguments; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, arguments); + } + }])); + } + }; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + +}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json new file mode 100644 index 00000000..31e18559 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json @@ -0,0 +1,36 @@ +{ + "name": "async", + "description": "Higher-order functions and common patterns for asynchronous code", + "main": "./index", + "author": { + "name": "Caolan McMahon" + }, + "version": "0.1.22", + "repository": { + "type": "git", + "url": "http://github.com/caolan/async.git" + }, + "bugs": { + "url": "http://github.com/caolan/async/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/caolan/async/raw/master/LICENSE" + } + ], + "devDependencies": { + "nodeunit": ">0.0.0", + "uglify-js": "1.2.x", + "nodelint": ">0.0.0" + }, + "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n \n \n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n );\n\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ], function (err, result) {\n // result now equals 'done' \n });\n\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n // add some items to the queue (batch-wise)\n\n q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. If all tasks complete\n successfully, it will receive an object containing their results.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/caolan/async", + "_id": "async@0.1.22", + "dist": { + "shasum": "3b270eedc0419d6f92a664444ce98e0f59a8fef7" + }, + "_from": "async@0.1.22", + "_resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/package.json new file mode 100644 index 00000000..1d8c8459 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/package.json @@ -0,0 +1,45 @@ +{ + "name": "isbin", + "version": "0.0.2", + "description": "Checks for available binaries on unix machines", + "main": "index.js", + "engines": { + "node": ">= 0.8.0" + }, + "keywords": [ + "fs", + "bin", + "binary", + "exists", + "check", + "path" + ], + "scripts": { + "test": "make test" + }, + "repository": { + "type": "git", + "url": "git://github.com/behrendtio/isbin.git" + }, + "author": "", + "license": "MIT", + "dependencies": { + "async": "0.1.22" + }, + "devDependencies": { + "mocha": "1.7.3", + "should": "1.2.1" + }, + "readme": "[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin)\n\n# Isbin\n\nTiny little helper library to determine if a certain binary is available within $PATH or any additional folder.\n\n# Installation\n\n```bash\n$ npm install isbin\n```\n\n# Usage\n\n```js\nvar isbin = require('isbin');\n\n// Test against $PATH\nisbin('mysql', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// With additional path to test\nisbin('mysql', '/usr/local/bin', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// Or multiple ones\nisbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) {\n console.log(exists); // ==> Boolean\n});\n```\n\nThere are also synchronous versions available\n\n```js\nvar exists = isbin('mysql');\nvar exists = isbin('mysql', '/usr/local/bin');\nvar exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']);\n```\n\n# Running the tests\n\n```bash\n$ npm install\n$ make test\n```\n\n# License\n\n(The MIT License)\n\nCopyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/behrendtio/isbin/issues" + }, + "homepage": "https://github.com/behrendtio/isbin", + "_id": "isbin@0.0.2", + "dist": { + "shasum": "2a35fb234ad5ee30f78da61b57e8f42ac43ec5a4" + }, + "_from": "isbin@0.0.2", + "_resolved": "https://registry.npmjs.org/isbin/-/isbin-0.0.2.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js new file mode 100644 index 00000000..068a38a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js @@ -0,0 +1,39 @@ +var isbin = require('../'); + +describe('isbin', function() { + it('accepts binary, additional path and callback', function(done) { + isbin('ls', '/etc', function(exists) { + exists.should.be.a('boolean'); + done(); + }) + }); + + it('accepts array of paths', function(done) { + isbin('ls', ['/etc', '/home'], function(exists) { + exists.should.be.a('boolean'); + done(); + }); + }); + + it('accepts just binary and callback', function(done) { + isbin('ls', function(exists) { + exists.should.be.a('boolean'); + done(); + }); + }); + + it('accepts binary, additional path and callback', function() { + var exists = isbin('ls', '/etc'); + exists.should.be.a('boolean'); + }); + + it('accepts array of paths', function() { + var exists = isbin('ls', ['/etc', '/home']); + exists.should.be.a('boolean'); + }); + + it('accepts just binary', function() { + var exists = isbin('ls'); + exists.should.be.a('boolean'); + }); +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts new file mode 100644 index 00000000..e5eb9f87 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts @@ -0,0 +1,4 @@ +--require should +--bail +--ui bdd +--slow 100 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig new file mode 100644 index 00000000..e036e247 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig @@ -0,0 +1,20 @@ +; EditorConfig is awesome: http://EditorConfig.org + +; top-most EditorConfig file +root = true + +; base rules +[*] +end_of_line = lf +insert_final_newline = false +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true + +; The default indent on package.json is 2 spaces, better to keep it so we can +; use `npm install --save` and other features that rewrites the package.json +; file automatically +[package.json] +indent_style = space +indent_size = 2 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc new file mode 100644 index 00000000..bbdb29cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc @@ -0,0 +1,69 @@ +{ + // Settings + "passfail" : false, // Stop on first error. + "maxerr" : 50, // Maximum error before stopping. + + + // Predefined globals whom JSHint will ignore. + "browser" : true, // Standard browser globals e.g. `window`, `document`. + "couch" : false, + "dojo" : false, + "jquery" : true, + "mootools" : false, + "node" : false, + "prototypejs" : false, + "rhino" : false, + "wsh" : false, + + // Custom globals. + "predef" : [ + "define", + "require" + ], + + + // Development. + "debug" : false, // Allow debugger statements e.g. browser breakpoints. + "devel" : false, // Allow developments statements e.g. `console.log();`. + + + // EcmaScript 5. + "es5" : false, // Allow EcmaScript 5 syntax. + "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). + "strict" : false, // Require `use strict` pragma in every file. + + + // The Good Parts. + "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). + "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). + "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. + "curly" : false, // Require {} for every new block or scope. + "eqeqeq" : true, // Require triple equals i.e. `===`. + "eqnull" : true, // Tolerate use of `== null`. + "evil" : false, // Tolerate use of `eval`. + "expr" : false, // Tolerate `ExpressionStatement` as Programs. + "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` + "latedef" : false, // Prohibit variable use before definition. + "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. + "loopfunc" : false, // Allow functions to be defined within loops. + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. + "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`. + "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. + "scripturl" : false, // Tolerate script-targeted URLs. + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. + "undef" : false, // Require all non-global variables be declared before they are used. + + + // Personal styling prefrences. + "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. + "noempty" : true, // Prohipit use of empty blocks. + "nomen" : false, // Prohibit use of initial or trailing underbars in names. + "nonew" : true, // Prohibit use of constructors for side-effects. + "onevar" : false, // Allow only one `var` statement per function. + "plusplus" : false, // Prohibit use of `++` & `--`. + "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. + "trailing" : true, // Prohibit trailing whitespaces. + "white" : false // Check against strict whitespace and indentation rules. +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore new file mode 100644 index 00000000..1341acd9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore @@ -0,0 +1,30 @@ +# dumb files +# ========== + +.tmp* +.project +.settings/ +.livereload +.DS_Store? +ehthumbs.db +Icon? +Thumbs.db + + +# stuff not needed by node +# ======================== + +node_modules/ +tests/ +_build/ +doc_html/ +coverage/ + +# we keep the doc/ folder in case npm decides to display it in the future +# also good in case user is using an old version or working offline + +# we also keep the src/ folder in case the user still needs the AMD modules +# after build (see issue #102) + +bower.json +build.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml new file mode 100644 index 00000000..36de1532 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml @@ -0,0 +1,13 @@ + language: node_js + node_js: + - "0.8" + script: "npm test --coverage" + notifications: + irc: + channels: + - "irc.freenode.org#moutjs" + on_success: always + on_failure: always + use_notice: true + skip_join: true + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md new file mode 100644 index 00000000..0f5eac12 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md @@ -0,0 +1,93 @@ +mout changelog +============== + +v0.6.0 (2013/05/22) +------------------- + + - add optional delimeter to `string/unCamelCase` + - allow custom char on `number/pad` + - allow underscore characters in `string/removeNonWord` + - accept `level` on `array/flatten` instead of a flag + - convert underscores to camelCase in `string/camelCase` + - remove `create()` from number/currencyFormat + - add `date/dayOfTheYear` + - add `date/diff` + - add `date/isSame` + - add `date/startOf` + - add `date/strftime` + - add `date/timezoneAbbr` + - add `date/timezoneOffset` + - add `date/totalDaysInYear` + - add `date/weekOfTheYear` + - add `function/timeout` + - add `object/bindAll` + - add `object/functions` + - add `time/convert` + + +v0.5.0 (2013/04/04) +------------------- + + - add `array/collect` + - add `callback` parameter to `object/equals` and `object/deepEquals` to allow + custom compare operations. + - normalize behavior in `array/*` methods to treat `null` values as empty + arrays when reading from array + - add `date/parseIso` + - add `date/isLeapYear` + - add `date/totalDaysInMonth` + - add `object/deepMatches` + - change `function/makeIterator_` to use `deepMatches` (affects nearly all + iteration methods) + - add `thisObj` parameter to `array/min` and `array/max` + + +v0.4.0 (2013/02/26) +------------------- + + - add `object/equals` + - add `object/deepEquals` + - add `object/matches`. + - add `lang/is` and `lang/isnt`. + - add `lang/isInteger`. + - add `array/findIndex`. + - add shorthand syntax to `array/*`, `object/*` and `collection/*` methods. + - improve `number/sign` behavior when value is NaN or +0 or -0. + - improve `lang/isNaN` to actually check if value *is not a number* without + coercing value; so `[]`, `""`, `null` and `"12"` are considered NaN (#39). + - improve `string/contains` to match ES6 behavior (add fromIndex argument). + + +v0.3.0 (2013/02/01) +------------------- + + - add `lang/clone`. + - add `lang/toString`. + - add `string/replace`. + - add `string/WHITE_SPACES` + - rename `function/curry` to `function/partial`. + - allow custom chars in `string/trim`, `ltrim`, and `rtrim`. + - convert values to strings in the `string/*` functions. + + +v0.2.0 (2013/01/13) +------------------- + + - fix bug in `math/ceil` for negative radixes. + - change `object/deepFillIn` and `object/deepMixIn` to recurse only if both + existing and new values are plain objects. Will not recurse into arrays + or objects not created by the Object constructor. + - add `lang/isPlainObject` to check if a file is a valid object and is created + by the Object constructor + - change `lang/clone` behavior when dealing with custom types (avoid cloning + it by default) and add second argument to allow custom behavior if needed. + - rename `lang/clone` to `lang/deepClone`. + - add VERSION property to index.js + - simplify `math/floor`, `math/round`, `math/ceil` and `math/countSteps`. + + +v0.1.0 (2013/01/09) +------------------- + +- Rename project from "amd-utils" to "mout" + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md new file mode 100644 index 00000000..65d9add1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing + +Fork the repo at https://github.com/mout/mout + + > "Write clearly, don't be too clever" - The Elements of Programming Style + +Avoid unnamed functions and follow the other modules structure. By only using named functions it will be easier to extract the code from the AMD module if needed and it will also give better error messages, JavaScript minifiers like [Google Closure Compiler](http://code.google.com/closure/compiler/) and [UglifyJS](https://github.com/mishoo/UglifyJS) will make sure code is as small/optimized as possible. + + > "Make it clear before you make it faster." - The Elements of Programming Style + +Be sure to always create tests for each proposed module. Features will only be merged if they contain proper tests and documentation. + + > "Good code is its own best documentation." - Steve McConnell + +We should do a code review before merging to make sure names makes sense and implementation is as good as possible. + +Try to split your pull requests into logical groups, the smaller the easier to be reviewed/merged. + + + +## Tests & Code Coverage ## + +Tests can be found inside the `tests` folder, to execute them in the browser open the `tests/runner.html`. The same tests also work on node.js by running `npm test`. + +We should have tests for all methods and ensure we have a high code coverage through our continuous integration server ([travis](https://travis-ci.org/mout/mout)). When you ask for a pull request Travis will automatically run the tests on node.js and check the code coverage as well. + +We run `node build pkg` automatically before any `npm test`, so specs and packages should always be in sync. (will avoid human mistakes) + +To check code coverage run `npm test --coverage`, it will generate the reports inside the `coverage` folder and also log the results. Please note that node.js doesn't execute all code branches since we have some conditionals that are only met on old JavaScript engines (eg. IE 7-8), so we will never have 100% code coverage (but should be close to it). + + + +## Build Script ## + +The [build script](https://github.com/mout/mout/wiki/Build-Script) can be extremely helpful and can avoid human mistakes, use it. + + + +## Admins / Pull Requests ## + +Even if you are an admin (have commit rights) please do pull requests when adding new features or changing current behavior, that way we can review the work and discuss. Feel free to push changes that doesn't affect behavior without asking for a pull request (readme, changelog, build script, typos, refactoring, ...). + + + +## Large changes ## + +If you are proposing some major change, please create an issue to discuss it first. (maybe it's outside the scope of the project) + + + +## Questions / IRC / Wiki / Issue Tracker ## + +When in doubt ask someone on IRC to help you ([#moutjs on irc.freenode.net](http://webchat.freenode.net/?channels=moutjs)) or create a [new issue](http://github.com/mout/mout/issues). + +The [project wiki](https://github.com/mout/mout/wiki) can also be a good resource of information. + + +--- + +Check the [contributors list at github](https://github.com/mout/mout/contributors). + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md new file mode 100644 index 00000000..e9ccc2be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) +## Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/README.md new file mode 100644 index 00000000..872943bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/README.md @@ -0,0 +1,63 @@ +![mout](http://moutjs.com/logo.png "Modular JavaScript Utilties") + +http://moutjs.com/ + +[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout) + +All code is library agnostic and consist mostly of helper methods that aren't +directly related with the DOM, the purpose of this library isn't to replace +Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common +problems that aren't solved by most of them. Consider it as a crossbrowser +JavaScript standard library. + + + +## Main goals ## + + - increase code reuse; + - be clear (code should be clean/readable); + - be easy to debug; + - be easy to maintain; + - follow best practices; + - follow standards when possible; + - **don't convert JavaScript into another language!** + - be compatible with other frameworks; + - be modular; + - have unit tests for all modules; + - work on multiple environments (IE7+, modern browsers, node.js); + + + +## What shouldn't be here ## + + - UI components; + - CSS selector engine; + - Event system - pub/sub; + - Template engine; + - Anything that isn't generic enough to be on a standard library; + - Anything that could be a separate library and/or isn't a modular utility... + + + +## API Documentation ## + +Online documentation can be found at http://moutjs.com/ or inside the +`doc` folder. + + + +## FAQ / Wiki / IRC ## + +For more info about project structure, design decisions, tips, how to +contribute, build system, etc, please check the [project +wiki](https://github.com/mout/mout/wiki). + +We also have an IRC channel [#moutjs on +irc.freenode.net](http://webchat.freenode.net/?channels=moutjs) + + + +## License ## + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array.js new file mode 100644 index 00000000..89d388ba --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array.js @@ -0,0 +1,46 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'append' : require('./array/append'), + 'collect' : require('./array/collect'), + 'combine' : require('./array/combine'), + 'compact' : require('./array/compact'), + 'contains' : require('./array/contains'), + 'difference' : require('./array/difference'), + 'every' : require('./array/every'), + 'filter' : require('./array/filter'), + 'find' : require('./array/find'), + 'findIndex' : require('./array/findIndex'), + 'flatten' : require('./array/flatten'), + 'forEach' : require('./array/forEach'), + 'indexOf' : require('./array/indexOf'), + 'insert' : require('./array/insert'), + 'intersection' : require('./array/intersection'), + 'invoke' : require('./array/invoke'), + 'join' : require('./array/join'), + 'lastIndexOf' : require('./array/lastIndexOf'), + 'map' : require('./array/map'), + 'max' : require('./array/max'), + 'min' : require('./array/min'), + 'pick' : require('./array/pick'), + 'pluck' : require('./array/pluck'), + 'range' : require('./array/range'), + 'reduce' : require('./array/reduce'), + 'reduceRight' : require('./array/reduceRight'), + 'reject' : require('./array/reject'), + 'remove' : require('./array/remove'), + 'removeAll' : require('./array/removeAll'), + 'shuffle' : require('./array/shuffle'), + 'some' : require('./array/some'), + 'sort' : require('./array/sort'), + 'split' : require('./array/split'), + 'toLookup' : require('./array/toLookup'), + 'union' : require('./array/union'), + 'unique' : require('./array/unique'), + 'xor' : require('./array/xor'), + 'zip' : require('./array/zip') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js new file mode 100644 index 00000000..bf74037e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js @@ -0,0 +1,21 @@ + + + /** + * Appends an array to the end of another. + * The first array will be modified. + */ + function append(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var pad = arr1.length, + i = -1, + len = arr2.length; + while (++i < len) { + arr1[pad + i] = arr2[i]; + } + return arr1; + } + module.exports = append; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js new file mode 100644 index 00000000..58637493 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js @@ -0,0 +1,27 @@ +var append = require('./append'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Maps the items in the array and concatenates the result arrays. + */ + function collect(arr, callback, thisObj){ + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + var value = callback(arr[i], i, arr); + if (value != null) { + append(results, value); + } + } + + return results; + } + + module.exports = collect; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js new file mode 100644 index 00000000..d66e6212 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js @@ -0,0 +1,22 @@ +var indexOf = require('./indexOf'); + + /** + * Combines an array with all the items of another. + * Does not allow duplicates and is case and type sensitive. + */ + function combine(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var i = -1, len = arr2.length; + while (++i < len) { + if (indexOf(arr1, arr2[i]) === -1) { + arr1.push(arr2[i]); + } + } + + return arr1; + } + module.exports = combine; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js new file mode 100644 index 00000000..74c176ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js @@ -0,0 +1,13 @@ +var filter = require('./filter'); + + /** + * Remove all null/undefined items from array. + */ + function compact(arr) { + return filter(arr, function(val){ + return (val != null); + }); + } + + module.exports = compact; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js new file mode 100644 index 00000000..92bb6ad9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js @@ -0,0 +1,10 @@ +var indexOf = require('./indexOf'); + + /** + * If array contains values. + */ + function contains(arr, val) { + return indexOf(arr, val) !== -1; + } + module.exports = contains; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js new file mode 100644 index 00000000..d0570510 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js @@ -0,0 +1,22 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var some = require('./some'); +var contains = require('./contains'); + + + /** + * Return a new Array with elements that aren't present in the other Arrays. + */ + function difference(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return !some(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + module.exports = difference; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js new file mode 100644 index 00000000..ac598832 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js @@ -0,0 +1,27 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Array every + */ + function every(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (!callback(arr[i], i, arr) ) { + result = false; + break; + } + } + + return result; + } + + module.exports = every; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js new file mode 100644 index 00000000..ebeb58dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js @@ -0,0 +1,27 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array filter + */ + function filter(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + module.exports = filter; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js new file mode 100644 index 00000000..b4a73131 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js @@ -0,0 +1,13 @@ +var findIndex = require('./findIndex'); + + /** + * Returns first item that matches criteria + */ + function find(arr, iterator, thisObj){ + var idx = findIndex(arr, iterator, thisObj); + return idx >= 0? arr[idx] : void(0); + } + + module.exports = find; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js new file mode 100644 index 00000000..53f22a5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js @@ -0,0 +1,23 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Returns the index of the first item that matches criteria + */ + function findIndex(arr, iterator, thisObj){ + iterator = makeIterator(iterator, thisObj); + if (arr == null) { + return -1; + } + + var i = -1, len = arr.length; + while (++i < len) { + if (iterator(arr[i], i, arr)) { + return i; + } + } + + return -1; + } + + module.exports = findIndex; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js new file mode 100644 index 00000000..aa9757ab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js @@ -0,0 +1,43 @@ +var isArray = require('../lang/isArray'); +var append = require('./append'); + + /* + * Helper function to flatten to a destination array. + * Used to remove the need to create intermediate arrays while flattening. + */ + function flattenTo(arr, result, level) { + if (arr == null) { + return result; + } else if (level === 0) { + append(result, arr); + return result; + } + + var value, + i = -1, + len = arr.length; + while (++i < len) { + value = arr[i]; + if (isArray(value)) { + flattenTo(value, result, level - 1); + } else { + result.push(value); + } + } + return result; + } + + /** + * Recursively flattens an array. + * A new array containing all the elements is returned. + * If `shallow` is true, it will only flatten one level. + */ + function flatten(arr, level) { + level = level == null? -1 : level; + return flattenTo(arr, [], level); + } + + module.exports = flatten; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js new file mode 100644 index 00000000..268e506f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js @@ -0,0 +1,23 @@ + + + /** + * Array forEach + */ + function forEach(arr, callback, thisObj) { + if (arr == null) { + return; + } + var i = -1, + len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback.call(thisObj, arr[i], i, arr) === false ) { + break; + } + } + } + + module.exports = forEach; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js new file mode 100644 index 00000000..6a9ac832 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js @@ -0,0 +1,28 @@ + + + /** + * Array.indexOf + */ + function indexOf(arr, item, fromIndex) { + fromIndex = fromIndex || 0; + if (arr == null) { + return -1; + } + + var len = arr.length, + i = fromIndex < 0 ? len + fromIndex : fromIndex; + while (i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[i] === item) { + return i; + } + + i++; + } + + return -1; + } + + module.exports = indexOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js new file mode 100644 index 00000000..f1f95b75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js @@ -0,0 +1,15 @@ +var difference = require('./difference'); +var toArray = require('../lang/toArray'); + + /** + * Insert item into array if not already present. + */ + function insert(arr, rest_items) { + var diff = difference(toArray(arguments).slice(1), arr); + if (diff.length) { + Array.prototype.push.apply(arr, diff); + } + return arr.length; + } + module.exports = insert; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js new file mode 100644 index 00000000..e6170062 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js @@ -0,0 +1,23 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var every = require('./every'); +var contains = require('./contains'); + + + /** + * Return a new Array with elements common to all Arrays. + * - based on underscore.js implementation + */ + function intersection(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return every(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + module.exports = intersection; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js new file mode 100644 index 00000000..c01aab1b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); + + /** + * Call `methodName` on each item of the array passing custom arguments if + * needed. + */ + function invoke(arr, methodName, var_args){ + if (arr == null) { + return arr; + } + + var args = Array.prototype.slice.call(arguments, 2); + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + value[methodName].apply(value, args); + } + + return arr; + } + + module.exports = invoke; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js new file mode 100644 index 00000000..71d8bd20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js @@ -0,0 +1,17 @@ +var filter = require('./filter'); + + function isValidString(val) { + return (val != null && val !== ''); + } + + /** + * Joins strings with the specified separator inserted between each value. + * Null values and empty strings will be excluded. + */ + function join(items, separator) { + separator = separator || ''; + return filter(items, isValidString).join(separator); + } + + module.exports = join; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js new file mode 100644 index 00000000..ee44a25b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js @@ -0,0 +1,28 @@ + + + /** + * Array lastIndexOf + */ + function lastIndexOf(arr, item, fromIndex) { + if (arr == null) { + return -1; + } + + var len = arr.length; + fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; + fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; + + while (fromIndex >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[fromIndex] === item) { + return fromIndex; + } + fromIndex--; + } + + return -1; + } + + module.exports = lastIndexOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js new file mode 100644 index 00000000..54064f6b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array map + */ + function map(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null){ + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + results[i] = callback(arr[i], i, arr); + } + + return results; + } + + module.exports = map; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js new file mode 100644 index 00000000..183b10ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js @@ -0,0 +1,35 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Return maximum value inside array + */ + function max(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return Infinity; + } else if (arr.length && !iterator) { + return Math.max.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = -Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp > compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + module.exports = max; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js new file mode 100644 index 00000000..dd00b6cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js @@ -0,0 +1,35 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Return minimum value inside array + */ + function min(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return -Infinity; + } else if (arr.length && !iterator) { + return Math.min.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp < compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + module.exports = min; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js new file mode 100644 index 00000000..6a54846c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js @@ -0,0 +1,14 @@ +var randInt = require('../random/randInt'); + + /** + * Remove a random item from the Array and return it + */ + function pick(arr){ + if (arr == null || !arr.length) return; + var idx = randInt(0, arr.length - 1); + return arr.splice(idx, 1)[0]; + } + + module.exports = pick; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js new file mode 100644 index 00000000..fef4043b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js @@ -0,0 +1,12 @@ +var map = require('./map'); + + /** + * Extract a list of property values. + */ + function pluck(arr, propName){ + return map(arr, propName); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js new file mode 100644 index 00000000..31d3c770 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js @@ -0,0 +1,27 @@ +var countSteps = require('../math/countSteps'); + + /** + * Returns an Array of numbers inside range. + */ + function range(start, stop, step) { + if (stop == null) { + stop = start; + start = 0; + } + step = step || 1; + + var result = [], + nSteps = countSteps(stop - start, step), + i = start; + + while (i <= stop) { + result.push(i); + i += step; + } + + return result; + } + + module.exports = range; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js new file mode 100644 index 00000000..1a350c6e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js @@ -0,0 +1,33 @@ +var forEach = require('./forEach'); + + /** + * Array reduce + */ + function reduce(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2, + result = initVal; + + if (arr == null || !arr.length) { + if (!hasInit) { + throw new Error('reduce of empty array with no initial value'); + } else { + return initVal; + } + } + + var i = -1, len = arr.length; + while (++i < len) { + if (!hasInit) { + result = arr[i]; + hasInit = true; + } else { + result = fn(result, arr[i], i, arr); + } + } + + return result; + } + + module.exports = reduce; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js new file mode 100644 index 00000000..e36fd4aa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js @@ -0,0 +1,34 @@ + + + /** + * Array reduceRight + */ + function reduceRight(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2; + + if (arr == null || !arr.length) { + if (hasInit) { + return initVal; + } else { + throw new Error('reduce of empty array with no initial value'); + } + } + + var i = arr.length, result = initVal, value; + while (--i >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + value = arr[i]; + if (!hasInit) { + result = value; + hasInit = true; + } else { + result = fn(result, value, i, arr); + } + } + return result; + } + + module.exports = reduceRight; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js new file mode 100644 index 00000000..685f2918 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js @@ -0,0 +1,26 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array reject + */ + function reject(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (!callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + module.exports = reject; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js new file mode 100644 index 00000000..aa6517db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js @@ -0,0 +1,13 @@ +var indexOf = require('./indexOf'); + + /** + * Remove a single item from the array. + * (it won't remove duplicates, just a single item) + */ + function remove(arr, item){ + var idx = indexOf(arr, item); + if (idx !== -1) arr.splice(idx, 1); + } + + module.exports = remove; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js new file mode 100644 index 00000000..d5f7f3b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js @@ -0,0 +1,15 @@ +var indexOf = require('./indexOf'); + + /** + * Remove all instances of an item from array. + */ + function removeAll(arr, item){ + var idx = indexOf(arr, item); + while (idx !== -1) { + arr.splice(idx, 1); + idx = indexOf(arr, item, idx); + } + } + + module.exports = removeAll; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js new file mode 100644 index 00000000..97805ec8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js @@ -0,0 +1,29 @@ +var randInt = require('../random/randInt'); +var forEach = require('./forEach'); + + /** + * Shuffle array items. + */ + function shuffle(arr) { + var results = [], + rnd; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + if (!i) { + results[0] = arr[0]; + } else { + rnd = randInt(0, i); + results[i] = results[rnd]; + results[rnd] = arr[i]; + } + } + + return results; + } + + module.exports = shuffle; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js new file mode 100644 index 00000000..8d17772b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js @@ -0,0 +1,27 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Array some + */ + function some(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback(arr[i], i, arr) ) { + result = true; + break; + } + } + + return result; + } + + module.exports = some; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js new file mode 100644 index 00000000..7807339b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js @@ -0,0 +1,55 @@ + + + /** + * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) + */ + function mergeSort(arr, compareFn) { + if (arr == null) { + return []; + } else if (arr.length < 2) { + return arr; + } + + if (compareFn == null) { + compareFn = defaultCompare; + } + + var mid, left, right; + + mid = ~~(arr.length / 2); + left = mergeSort( arr.slice(0, mid), compareFn ); + right = mergeSort( arr.slice(mid, arr.length), compareFn ); + + return merge(left, right, compareFn); + } + + function defaultCompare(a, b) { + return a < b ? -1 : (a > b? 1 : 0); + } + + function merge(left, right, compareFn) { + var result = []; + + while (left.length && right.length) { + if (compareFn(left[0], right[0]) <= 0) { + // if 0 it should preserve same order (stable) + result.push(left.shift()); + } else { + result.push(right.shift()); + } + } + + if (left.length) { + result.push.apply(result, left); + } + + if (right.length) { + result.push.apply(result, right); + } + + return result; + } + + module.exports = mergeSort; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js new file mode 100644 index 00000000..4f3ba50c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js @@ -0,0 +1,35 @@ + + + /** + * Split array into a fixed number of segments. + */ + function split(array, segments) { + segments = segments || 2; + var results = []; + if (array == null) { + return results; + } + + var minLength = Math.floor(array.length / segments), + remainder = array.length % segments, + i = 0, + len = array.length, + segmentIndex = 0, + segmentLength; + + while (i < len) { + segmentLength = minLength; + if (segmentIndex < remainder) { + segmentLength++; + } + + results.push(array.slice(i, i + segmentLength)); + + segmentIndex++; + i += segmentLength; + } + + return results; + } + module.exports = split; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js new file mode 100644 index 00000000..ce4c55dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js @@ -0,0 +1,28 @@ +var isFunction = require('../lang/isFunction'); + + /** + * Creates an object that holds a lookup for the objects in the array. + */ + function toLookup(arr, key) { + var result = {}; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length, value; + if (isFunction(key)) { + while (++i < len) { + value = arr[i]; + result[key(value)] = value; + } + } else { + while (++i < len) { + value = arr[i]; + result[value[key]] = value; + } + } + + return result; + } + module.exports = toLookup; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js new file mode 100644 index 00000000..f1334a91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js @@ -0,0 +1,19 @@ +var unique = require('./unique'); +var append = require('./append'); + + /** + * Concat multiple arrays and remove duplicates + */ + function union(arrs) { + var results = []; + var i = -1, len = arguments.length; + while (++i < len) { + append(results, arguments[i]); + } + + return unique(results); + } + + module.exports = union; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js new file mode 100644 index 00000000..0192b2df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js @@ -0,0 +1,17 @@ +var indexOf = require('./indexOf'); +var filter = require('./filter'); + + /** + * @return {array} Array of unique items + */ + function unique(arr){ + return filter(arr, isUnique); + } + + function isUnique(item, i, arr){ + return indexOf(arr, item, i+1) === -1; + } + + module.exports = unique; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js new file mode 100644 index 00000000..c125a996 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js @@ -0,0 +1,26 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var contains = require('./contains'); + + + /** + * Exclusive OR. Returns items that are present in a single array. + * - like ptyhon's `symmetric_difference` + */ + function xor(arr1, arr2) { + arr1 = unique(arr1); + arr2 = unique(arr2); + + var a1 = filter(arr1, function(item){ + return !contains(arr2, item); + }), + a2 = filter(arr2, function(item){ + return !contains(arr1, item); + }); + + return a1.concat(a2); + } + + module.exports = xor; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js new file mode 100644 index 00000000..931eb818 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js @@ -0,0 +1,29 @@ +var max = require('./max'); +var pluck = require('./pluck'); +var map = require('./map'); + + function getLength(arr) { + return arr == null ? 0 : arr.length; + } + + /** + * Merges together the values of each of the arrays with the values at the + * corresponding position. + */ + function zip(arr){ + var len = arr ? max(map(arguments, getLength)) : 0, + results = [], + i = -1, + item; + while (++i < len) { + results.push(map(arguments, function(item) { + return item == null ? undefined : item[i]; + })); + } + + return results; + } + + module.exports = zip; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection.js new file mode 100644 index 00000000..d5cf6cad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection.js @@ -0,0 +1,22 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'contains' : require('./collection/contains'), + 'every' : require('./collection/every'), + 'filter' : require('./collection/filter'), + 'find' : require('./collection/find'), + 'forEach' : require('./collection/forEach'), + 'make_' : require('./collection/make_'), + 'map' : require('./collection/map'), + 'max' : require('./collection/max'), + 'min' : require('./collection/min'), + 'pluck' : require('./collection/pluck'), + 'reduce' : require('./collection/reduce'), + 'reject' : require('./collection/reject'), + 'size' : require('./collection/size'), + 'some' : require('./collection/some') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js new file mode 100644 index 00000000..a73f994b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrContains = require('../array/contains'); +var objContains = require('../object/contains'); + + /** + */ + module.exports = make(arrContains, objContains); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js new file mode 100644 index 00000000..300e03c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrEvery = require('../array/every'); +var objEvery = require('../object/every'); + + /** + */ + module.exports = make(arrEvery, objEvery); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js new file mode 100644 index 00000000..38757005 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * filter collection values, returns array. + */ + function filter(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + var results = []; + if (!list) { + return results; + } + forEach(list, function(value, index, list) { + if (iterator(value, index, list)) { + results[results.length] = value; + } + }); + return results; + } + + module.exports = filter; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js new file mode 100644 index 00000000..14317e64 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrFind = require('../array/find'); +var objFind = require('../object/find'); + + /** + * Find value that returns true on iterator check. + */ + module.exports = make(arrFind, objFind); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js new file mode 100644 index 00000000..6e28dcb1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrForEach = require('../array/forEach'); +var objForEach = require('../object/forOwn'); + + /** + */ + module.exports = make(arrForEach, objForEach); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js new file mode 100644 index 00000000..029d27bf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js @@ -0,0 +1,19 @@ + + + /** + * internal method used to create other collection modules. + */ + function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { + return function(){ + var args = Array.prototype.slice.call(arguments); + if (args[0] == null) { + return defaultReturn; + } + // array-like is treated as array + return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); + }; + } + + module.exports = makeCollectionMethod; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js new file mode 100644 index 00000000..fc157f53 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js @@ -0,0 +1,23 @@ +var isObject = require('../lang/isObject'); +var values = require('../object/values'); +var arrMap = require('../array/map'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Map collection values, returns Array. + */ + function map(list, callback, thisObj) { + callback = makeIterator(callback, thisObj); + // list.length to check array-like object, if not array-like + // we simply map all the object values + if( isObject(list) && list.length == null ){ + list = values(list); + } + return arrMap(list, function (val, key, list) { + return callback(val, key, list); + }); + } + + module.exports = map; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js new file mode 100644 index 00000000..a8490e7e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrMax = require('../array/max'); +var objMax = require('../object/max'); + + /** + * Get maximum value inside collection + */ + module.exports = make(arrMax, objMax); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js new file mode 100644 index 00000000..51d9f148 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrMin = require('../array/min'); +var objMin = require('../object/min'); + + /** + * Get minimum value inside collection. + */ + module.exports = make(arrMin, objMin); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js new file mode 100644 index 00000000..9b283776 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js @@ -0,0 +1,14 @@ +var map = require('./map'); + + /** + * Extract a list of property values. + */ + function pluck(list, key) { + return map(list, function(value) { + return value[key]; + }); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js new file mode 100644 index 00000000..4c075735 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrReduce = require('../array/reduce'); +var objReduce = require('../object/reduce'); + + /** + */ + module.exports = make(arrReduce, objReduce); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js new file mode 100644 index 00000000..2a92e3b3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js @@ -0,0 +1,16 @@ +var filter = require('./filter'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Inverse or collection/filter + */ + function reject(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + return filter(list, function(value, index, list) { + return !iterator(value, index, list); + }, thisObj); + } + + module.exports = reject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js new file mode 100644 index 00000000..244e33e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js @@ -0,0 +1,19 @@ +var isArray = require('../lang/isArray'); +var objSize = require('../object/size'); + + /** + * Get collection size + */ + function size(list) { + if (!list) { + return 0; + } + if (isArray(list)) { + return list.length; + } + return objSize(list); + } + + module.exports = size; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js new file mode 100644 index 00000000..48fd252e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrSome = require('../array/some'); +var objSome = require('../object/some'); + + /** + */ + module.exports = make(arrSome, objSome); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date.js new file mode 100644 index 00000000..1cde1a95 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date.js @@ -0,0 +1,21 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'dayOfTheYear' : require('./date/dayOfTheYear'), + 'diff' : require('./date/diff'), + 'i18n_' : require('./date/i18n_'), + 'isLeapYear' : require('./date/isLeapYear'), + 'isSame' : require('./date/isSame'), + 'parseIso' : require('./date/parseIso'), + 'startOf' : require('./date/startOf'), + 'strftime' : require('./date/strftime'), + 'timezoneAbbr' : require('./date/timezoneAbbr'), + 'timezoneOffset' : require('./date/timezoneOffset'), + 'totalDaysInMonth' : require('./date/totalDaysInMonth'), + 'totalDaysInYear' : require('./date/totalDaysInYear'), + 'weekOfTheYear' : require('./date/weekOfTheYear') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js new file mode 100644 index 00000000..85905c5a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js @@ -0,0 +1,13 @@ +var isDate = require('../lang/isDate'); + + /** + * return the day of the year (1..366) + */ + function dayOfTheYear(date){ + return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - + Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; + } + + module.exports = dayOfTheYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js new file mode 100644 index 00000000..1131cdcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js @@ -0,0 +1,130 @@ +var totalDaysInMonth = require('./totalDaysInMonth'); +var totalDaysInYear = require('./totalDaysInYear'); +var convert = require('../time/convert'); + + /** + * calculate the difference between dates (range) + */ + function diff(start, end, unitName){ + // sort the dates to make it easier to process (specially year/month) + if (start > end) { + var swap = start; + start = end; + end = swap; + } + + var output; + + if (unitName === 'month') { + output = getMonthsDiff(start, end); + } else if (unitName === 'year'){ + output = getYearsDiff(start, end); + } else if (unitName != null) { + if (unitName === 'day') { + // ignore timezone difference because of daylight savings time + start = toUtc(start); + end = toUtc(end); + } + output = convert(end - start, 'ms', unitName); + } else { + output = end - start; + } + + return output; + } + + + function toUtc(d){ + // we ignore timezone differences on purpose because of daylight + // savings time, otherwise it would return fractional days/weeks even + // if a full day elapsed. eg: + // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) + // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) + // diff should be 4 days and not 4.041666666666667 + return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getHours(), d.getMinutes(), d.getSeconds(), + d.getMilliseconds()); + } + + + function getMonthsDiff(start, end){ + return getElapsedMonths(start, end) + + getElapsedYears(start, end) * 12 + + getFractionalMonth(start, end); + } + + + function getYearsDiff(start, end){ + var elapsedYears = getElapsedYears(start, end); + return elapsedYears + getFractionalYear(start, end, elapsedYears); + } + + + function getElapsedMonths(start, end){ + var monthDiff = end.getMonth() - start.getMonth(); + if (monthDiff < 0) { + monthDiff += 12; + } + // less than a full month + if (start.getDate() > end.getDate()) { + monthDiff -= 1; + } + return monthDiff; + } + + + function getElapsedYears(start, end){ + var yearDiff = end.getFullYear() - start.getFullYear(); + // less than a full year + if (start.getMonth() > end.getMonth()) { + yearDiff -= 1; + } + return yearDiff; + } + + + function getFractionalMonth(start, end){ + var fractionalDiff = 0; + var startDay = start.getDate(); + var endDay = end.getDate(); + + if (startDay !== endDay) { + var startTotalDays = totalDaysInMonth(start); + var endTotalDays = totalDaysInMonth(end); + var totalDays; + var daysElapsed; + + if (startDay > endDay) { + // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) + var baseDay = startTotalDays - startDay; + daysElapsed = endDay + baseDay; + // total days should be relative to 1st day of next month if + // startDay > endTotalDays + totalDays = (startDay > endTotalDays)? + endTotalDays + baseDay + 1 : startDay + baseDay; + } else { + // fractional is only based on endMonth eg: Jan 12 - Feb 18 + // (6 fractional days, 28 days until next full month) + daysElapsed = endDay - startDay; + totalDays = endTotalDays; + } + + fractionalDiff = daysElapsed / totalDays; + } + + return fractionalDiff; + } + + + function getFractionalYear(start, end, elapsedYears){ + var base = elapsedYears? + new Date(end.getFullYear(), start.getMonth(), start.getDate()) : + start; + var elapsedDays = diff(base, end, 'day'); + return elapsedDays / totalDaysInYear(end); + } + + + module.exports = diff; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js new file mode 100644 index 00000000..f9526ce4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js @@ -0,0 +1,61 @@ + + // en-US (English, United States) + module.exports = { + "am" : "AM", + "pm" : "PM", + + "x": "%m/%d/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %I:%M:%S %p %Z", + + "months" : [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + + "months_abbr" : [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + + "days" : [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + + "days_abbr" : [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ] + }; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js new file mode 100644 index 00000000..71ebadb5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js @@ -0,0 +1,61 @@ + + // pt-BR (Brazillian Portuguese) + module.exports = { + "am" : "", + "pm" : "", + + "x": "%d/%m/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %H:%M:%S %Z", + + "months" : [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + + "months_abbr" : [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Out", + "Nov", + "Dez" + ], + + "days" : [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" + ], + + "days_abbr" : [ + "Dom", + "Seg", + "Ter", + "Qua", + "Qui", + "Sex", + "Sáb" + ] + }; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js new file mode 100644 index 00000000..723fc103 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js @@ -0,0 +1,14 @@ +var mixIn = require('../object/mixIn'); +var enUS = require('./i18n/en-US'); + + // we also use mixIn to make sure we don't affect the original locale + var activeLocale = mixIn({}, enUS, { + // we expose a "set" method to allow overriding the global locale + set : function(localeData){ + mixIn(activeLocale, localeData); + } + }); + + module.exports = activeLocale; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js new file mode 100644 index 00000000..4212870b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js @@ -0,0 +1,15 @@ +var isDate = require('../lang/isDate'); + + /** + * checks if it's a leap year + */ + function isLeapYear(fullYear){ + if (isDate(fullYear)) { + fullYear = fullYear.getFullYear(); + } + return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); + } + + module.exports = isLeapYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js new file mode 100644 index 00000000..4097d29b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js @@ -0,0 +1,16 @@ +var startOf = require('./startOf'); + + /** + * Check if date is "same" with optional period + */ + function isSame(date1, date2, period){ + if (period) { + date1 = startOf(date1, period); + date2 = startOf(date2, period); + } + return Number(date1) === Number(date2); + } + + module.exports = isSame; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js new file mode 100644 index 00000000..8ea2b171 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js @@ -0,0 +1,146 @@ +var some = require('../array/some'); + + var datePatterns = [ + /^([0-9]{4})$/, // YYYY + /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) + /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD + ]; + var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD + + var timePatterns = [ + /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh + /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm + /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss + ]; + + var DATE_TIME = /^(.+)T(.+)$/; + var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; + + function matchAll(str, patterns) { + var match; + var found = some(patterns, function(pattern) { + return !!(match = pattern.exec(str)); + }); + + return found ? match : null; + } + + function getDate(year, month, day) { + var date = new Date(Date.UTC(year, month, day)); + + // Explicitly set year to avoid Date.UTC making dates < 100 relative to + // 1900 + date.setUTCFullYear(year); + + var valid = + date.getUTCFullYear() === year && + date.getUTCMonth() === month && + date.getUTCDate() === day; + return valid ? +date : NaN; + } + + function parseOrdinalDate(str) { + var match = ORD_DATE.exec(str); + if (match ) { + var year = +match[1], + day = +match[2], + date = new Date(Date.UTC(year, 0, day)); + + if (date.getUTCFullYear() === year) { + return +date; + } + } + + return NaN; + } + + function parseDate(str) { + var match, year, month, day; + + var match = matchAll(str, datePatterns); + if (match === null) { + // Ordinal dates are verified differently. + return parseOrdinalDate(str); + } + + year = (match[1] === void 0) ? 0 : +match[1]; + month = (match[2] === void 0) ? 0 : +match[2] - 1; + day = (match[3] === void 0) ? 1 : +match[3]; + + return getDate(year, month, day); + } + + function getTime(hr, min, sec) { + var valid = + (hr < 24 && hr >= 0 && + min < 60 && min >= 0 && + sec < 60 && min >= 0) || + (hr === 24 && min === 0 && sec === 0); + if (!valid) { + return NaN; + } + + return ((hr * 60 + min) * 60 + sec) * 1000; + } + + function parseOffset(str) { + var match; + if (str.charAt(str.length - 1) === 'Z') { + str = str.substring(0, str.length - 1); + } else if ((match = TIME_ZONE.exec(str))) { + var match = TIME_ZONE.exec(str); + if (match) { + var hours = +match[3], + minutes = (match[4] === void 0) ? 0 : +match[4], + offset = getTime(hours, minutes, 0); + + if (match[2] === '-') { + offset *= -1; + } + + return { offset: offset, time: match[1] }; + } + } + + // No time zone specified, assume UTC + return { offset: 0, time: str }; + } + + function parseTime(str) { + var match; + var offset = parseOffset(str); + + str = offset.time; + offset = offset.offset; + if (isNaN(offset)) { + return NaN; + } + + match = matchAll(str, timePatterns); + if (match === null) { + return NaN; + } + + var hours = (match[1] === void 0) ? 0 : +match[1], + minutes = (match[2] === void 0) ? 0 : +match[2], + seconds = (match[3] === void 0) ? 0 : +match[3]; + + return getTime(hours, minutes, seconds) - offset; + } + + /** + * Parse an ISO8601 formatted date string, and return a Date object. + */ + function parseISO8601(str){ + var match = DATE_TIME.exec(str); + if (!match) { + // No time specified + return parseDate(str); + } + + return parseDate(match[1]) + parseTime(match[2]); + } + + module.exports = parseISO8601; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js new file mode 100644 index 00000000..072bc0ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js @@ -0,0 +1,54 @@ +var clone = require('../lang/clone'); + + /** + * get a new Date object representing start of period + */ + function startOf(date, period){ + date = clone(date); + + // intentionally removed "break" from switch since start of + // month/year/etc should also reset the following periods + switch (period) { + case 'year': + date.setMonth(0); + /* falls through */ + case 'month': + date.setDate(1); + /* falls through */ + case 'week': + case 'day': + date.setHours(0); + /* falls through */ + case 'hour': + date.setMinutes(0); + /* falls through */ + case 'minute': + date.setSeconds(0); + /* falls through */ + case 'second': + date.setMilliseconds(0); + break; + default: + throw new Error('"'+ period +'" is not a valid period'); + } + + // week is the only case that should reset the weekDay and maybe even + // overflow to previous month + if (period === 'week') { + var weekDay = date.getDay(); + var baseDate = date.getDate(); + if (weekDay) { + if (weekDay >= baseDate) { + //start of the week is on previous month + date.setDate(0); + } + date.setDate(date.getDate() - date.getDay()); + } + } + + return date; + } + + module.exports = startOf; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js new file mode 100644 index 00000000..f033d10f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js @@ -0,0 +1,118 @@ +var pad = require('../number/pad'); +var i18n = require('./i18n_'); +var dayOfTheYear = require('./dayOfTheYear'); +var timezoneOffset = require('./timezoneOffset'); +var timezoneAbbr = require('./timezoneAbbr'); +var weekOfTheYear = require('./weekOfTheYear'); + + var _combinations = { + 'D': '%m/%d/%y', + 'F': '%Y-%m-%d', + 'r': '%I:%M:%S %p', + 'R': '%H:%M', + 'T': '%H:%M:%S', + 'x': 'locale', + 'X': 'locale', + 'c': 'locale' + }; + + + /** + * format date based on strftime format + */ + function strftime(date, format, localeData){ + localeData = localeData || i18n; + var reToken = /%([a-z%])/gi; + + function makeIterator(fn) { + return function(match, token){ + return fn(date, token, localeData); + }; + } + + return format + .replace(reToken, makeIterator(expandCombinations)) + .replace(reToken, makeIterator(convertToken)); + } + + + function expandCombinations(date, token, l10n){ + if (token in _combinations) { + var expanded = _combinations[token]; + return expanded === 'locale'? l10n[token] : expanded; + } else { + return '%'+ token; + } + } + + + function convertToken(date, token, l10n){ + switch (token){ + case 'a': + return l10n.days_abbr[date.getDay()]; + case 'A': + return l10n.days[date.getDay()]; + case 'h': + case 'b': + return l10n.months_abbr[date.getMonth()]; + case 'B': + return l10n.months[date.getMonth()]; + case 'C': + return pad(Math.floor(date.getFullYear() / 100), 2); + case 'd': + return pad(date.getDate(), 2); + case 'e': + return pad(date.getDate(), 2, ' '); + case 'H': + return pad(date.getHours(), 2); + case 'I': + return pad(date.getHours() % 12, 2); + case 'j': + return pad(dayOfTheYear(date), 3); + case 'L': + return pad(date.getMilliseconds(), 3); + case 'm': + return pad(date.getMonth() + 1, 2); + case 'M': + return pad(date.getMinutes(), 2); + case 'n': + return '\n'; + case 'p': + return date.getHours() >= 12? l10n.pm : l10n.am; + case 'P': + return convertToken(date, 'p', l10n).toLowerCase(); + case 's': + return date.getTime() / 1000; + case 'S': + return pad(date.getSeconds(), 2); + case 't': + return '\t'; + case 'u': + var day = date.getDay(); + return day === 0? 7 : day; + case 'U': + return pad(weekOfTheYear(date), 2); + case 'w': + return date.getDay(); + case 'W': + return pad(weekOfTheYear(date, 1), 2); + case 'y': + return pad(date.getFullYear() % 100, 2); + case 'Y': + return pad(date.getFullYear(), 4); + case 'z': + return timezoneOffset(date); + case 'Z': + return timezoneAbbr(date); + case '%': + return '%'; + default: + // keep unrecognized tokens + return '%'+ token; + } + } + + + module.exports = strftime; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js new file mode 100644 index 00000000..b1006875 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js @@ -0,0 +1,17 @@ +var timezoneOffset = require('./timezoneOffset'); + + /** + * Abbreviated time zone name or similar information. + */ + function timezoneAbbr(date){ + // Date.toString gives different results depending on the + // browser/system so we fallback to timezone offset + // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' + // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' + var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); + return tz? tz[1] : timezoneOffset(date); + } + + module.exports = timezoneAbbr; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js new file mode 100644 index 00000000..9492dceb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js @@ -0,0 +1,16 @@ +var pad = require('../number/pad'); + + /** + * time zone as hour and minute offset from UTC (e.g. +0900) + */ + function timezoneOffset(date){ + var offset = date.getTimezoneOffset(); + var abs = Math.abs(offset); + var h = pad(Math.floor(abs / 60), 2); + var m = pad(abs % 60, 2); + return (offset > 0? '-' : '+') + h + m; + } + + module.exports = timezoneOffset; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js new file mode 100644 index 00000000..8aafeb84 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js @@ -0,0 +1,25 @@ +var isDate = require('../lang/isDate'); +var isLeapYear = require('./isLeapYear'); + + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + + /** + * returns the total amount of days in the month (considering leap years) + */ + function totalDaysInMonth(fullYear, monthIndex){ + if (isDate(fullYear)) { + var date = fullYear; + year = date.getFullYear(); + monthIndex = date.getMonth(); + } + + if (monthIndex === 1 && isLeapYear(fullYear)) { + return 29; + } else { + return DAYS_IN_MONTH[monthIndex]; + } + } + + module.exports = totalDaysInMonth; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js new file mode 100644 index 00000000..b4b7e9b7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js @@ -0,0 +1,13 @@ +var isLeapYear = require('./isLeapYear'); + + /** + * return the amount of days in the year following the gregorian calendar + * and leap years + */ + function totalDaysInYear(fullYear){ + return isLeapYear(fullYear)? 366 : 365; + } + + module.exports = totalDaysInYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js new file mode 100644 index 00000000..dd51b7f1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js @@ -0,0 +1,16 @@ +var dayOfTheYear = require('./dayOfTheYear'); + + /** + * Return the week of the year based on given firstDayOfWeek + */ + function weekOfTheYear(date, firstDayOfWeek){ + firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; + var doy = dayOfTheYear(date); + var dow = (7 + date.getDay() - firstDayOfWeek) % 7; + var relativeWeekDay = 6 - firstDayOfWeek - dow; + return Math.floor((doy + relativeWeekDay) / 7); + } + + module.exports = weekOfTheYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md new file mode 100644 index 00000000..1f390fbc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md @@ -0,0 +1,773 @@ +# array # + +Array utilities. + + + + +## append(arr1, arr2):Array + +Appends an array to the end of the other. +The first array will be modified and will contain the appended items. + +See: [`union()`](#union), [`combine()`](#combine) + +```js +var foo = ['a', 'b'], + bar = ['b', 'd']; + +append(foo, bar); // ['a', 'b', 'b', 'd'] +``` + + + +## collect(arr, callback, [thisObj]):Array + +Maps the items in `arr` and concatenates the resulting arrays. + +See: [`map()`](#map) + +```js +collect([1, 2, 3], function(val) { + return [val, val % 2]; +}); // [1, 1, 2, 0, 3, 1]; + +collect(['a', 'bb', ''], function(val) { + return val.split(''); +}); // ['a', 'b', 'b'] +``` + +It also supports a shorthand syntax: + +```js +var items = [{ a: [1] }, { b: 'foo' }, { a: [2, 3] }]; +collect(items, 'a'); // [1, 2, 3]; +``` + + + +## combine(arr1, arr2):Array + +Combines an array with all the items of another. +The first array will be modified and will contain the combined items. +Does not allow duplicates and is case and type sensitive. + +See: [`union()`](#union), [`append()`](#append) + +```js +var foo = ['a', 'b'], + bar = ['b', 'd']; + +combine(foo, bar); // ['a', 'b', 'd'] +``` + + + +## compact(arr):Array + +Returns a new Array without any `null` or `undefined` values. Note that it will +keep empty strings and other falsy values (simillar to Ruby Array#compact). + +```js +var arr = [0, 1, null, false, '', 'foo', undefined, 'bar']; +compact(arr); // [0, 1, false, '', 'foo', 'bar']; +``` + + + +## contains(arr, value):Boolean + +Checks if Array contains value. Alias to `indexOf(arr, val) !== -1`. + +```js +var arr = [1, 2, 3]; +contains(arr, 2); // true +contains(arr, 'foo'); // false +``` + + + +## difference(...arrs):Array + +Return a new Array with elements that aren't present in the other Arrays +besides the first one. + +Works like [Python set#difference](http://docs.python.org/library/stdtypes.html#set.difference). + +It will remove duplicates. + +See: [`xor()`](#xor), [`intersection()`](#intersection) + +```js +var a = ['a', 'b', 1]; +var b = ['c', 1]; +difference(a, b); // ['a', 'b'] +``` + + + +## every(arr, callback, [thisObj]):Array + +Crossbrowser `Array.every()`. + +Tests whether all elements in the array pass the test implemented by the provided function. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = [1, 'foo', 'bar']; +every(items, isString); // false +every(items, isFunction); // false +every(items, function(val, key, arr){ + return val != null; +}); // true +``` + +more info at [MDN Array#every](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every) + +It also supports a shorthand syntax: + +```js +var items = [{id:1, active:true}, {id:3, active:true}, {id:8, active:true}]; +// all items with `id === 8` +every(items, {id:8}); // false +// `active` is truthy on all items +every(items, 'active'); // true +``` + + + +## filter(arr, callback, [thisObj]):Array + +Crossbrowser `Array.filter()`. + +Creates a new array with all elements that pass the callback test. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var nums = [1, 2, 3, 4, 5, 6]; +var oddNumbers = filter(nums, function(val, key, arr){ + return (val % 2) !== 0; +}); +// > [1, 3, 5] +``` + +more info at [MDN Array#filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) + +Filter also supports shorthand notation: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true}, + {name:'jane', surname:'doe', beard:false} +]; +// filter item that matches all properties/values pairs +filter(arr, {name:'john', beard:false}); +// > [{name:'john', surnname:'connor', beard:false}] +// items where 'beard' is a truthy value +filter(arr, 'beard'); +// > [{name:'john', surnname:'doe', beard:true}] +``` + +See [`reject()`](#reject) + + + +## find(arr, callback, [thisObj]):void + +Loops through all the items in the Array and returns the first one that passes +a truth test (callback). + +```js +var arr = [123, {a:'b'}, 'foo', 'bar']; +find(arr, isString); // "foo" +find(arr, isNumber); // 123 +find(arr, isObject); // {a:'b'} +``` + +Find also supports shorthand notation: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true} +]; +// first item that matches all properties/values pairs +find(arr, {name:'john'}); // {name:'john', surnname:'connor', beard:false} +// first item where 'beard' is a truthy value +find(arr, 'beard'); // {name:'john', surnname:'doe', beard:true} +``` + +See: [findIndex()](#findIndex) + + + +## findIndex(arr, iterator, [thisObj]):Number + +Loops through the items in the Array and returns the index of the first one +that passes a truth test (callback). + +Returns `-1` if no item was found that passes the truth test. + +```js +var arr = [1, { a: 1 }, 'foo', 'bar']; +findIndex(arr, isString); // 2 +findIndex(arr, isNumber); // 0 +findIndex(arr, isObject); // 1 +findIndex(arr, isRegExp); // -1 +``` + +`findIndex` also supports shorthand notation: + +```js +var pets = [ + { pet: 'dog', name: 'Sam' }, + { pet: 'dog', name: 'Maggie' } +]; + +findIndex(pets, { pet: 'dog' }); // 0 +findIndex(pets, { name: 'Maggie' }); // 1 +``` + +See: [find()](#find) + + + +## flatten(arr, [level]):Array + +Recursively flattens an array. A new array containing all the elements is +returned. If `level` is specified, it will only flatten up to that level. + +### Example + +```js +flatten([1, [2], [3, [4, 5]]]); +// > [1, 2, 3, 4, 5] +flatten([1, [2], [3, [4, 5]]], 1); +// > [1, 2, 3, [4, 5]] +``` + + + +## forEach(arr, callback, [thisObj]):void + +Crossbrowser `Array.forEach()`. + +It allows exiting the iteration early by returning `false` on the callback. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = ['foo', 'bar', 'lorem', 'ipsum']; +forEach(items, function(val, key, arr){ + console.log(key +' : '+ val); + if (val === 'lorem') { + // stop iteration (break) + return false; + } +}); +``` + +more info at [MDN Array#forEach](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach) + + + +## indexOf(arr, item, [fromIndex]):Number + +Crossbrowser `Array.indexOf()`. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#indexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) + + + + +## insert(arr, ...items):Number + +Push items into array only if they aren't contained by it. Returns the new +`length` of the array. + +See: [`remove()`](#remove), [`removeAll()`](#removeAll), +[`contains()`](#contains) + +```js +var arr = ['a', 'b']; +insert(arr, 'a'); // 2 : ['a', 'b'] +insert(arr, 'c'); // 3 : ['a', 'b', 'c'] +insert(arr, 1, 2, 'b'); // 5 : ['a', 'b', 'c', 1, 2] +``` + + + +## intersection(...arrs):Array + +Return a new Array with elements common to all Arrays. + +Similar to Python set#intersection and underscore.js intersection. + +It will remove duplicates. + +See: [`difference()`](#difference), [`xor()`](#xor) + +```js +var a = ['a', 'b', 1], + b = ['c', 1], + c = [1, 2, 3]; +intersection(a, b, c); // [1] +``` + + + +## invoke(arr, methodName[, ...args]):Array + +Call `methodName` on each item of the array passing custom arguments if needed. + +```js +invoke([[3,2,1], [9,5,2]], 'sort'); // [[1,2,3], [2,5,9]] +``` + + + +## join(arr, [separator]):String + +Joins the strings in `arr`, inserting `separator` between each value. + +This ignores null values and empty strings that are in the array. `separator` +defaults to an empty string. This will convert all non-string objects in the +array to a string. + +### Example + +```js +join(['a', 'b', 'c']); // 'abc' +join(['foo', 'bar'], ', '); // 'foo, bar' +join([null, 'foo', '', 'bar', undefined], ':'); // 'foo:bar' +``` + + + +## lastIndexOf(arr, item, [fromIndex]):Number + +Crossbrowser `Array.lastIndexOf()`. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#lastIndexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) + + + +## map(arr, callback, [thisObj]]):Array + +Crossbrowser `Array.map()`. + +Creates a new array with the results of calling a provided function on every +element in this array. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +See: [`collect()`](#collect) + +```js +var nums = [1,2,3,4]; +var double = map(nums, function(val, key, arr){ + return val * 2; +}); +// > [2, 4, 6, 8] +``` + +more info at [MDN Array#map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) + +It also supports a shorthand notation which can be used to achieve same result +as [`array/pluck`](#pluck): + +```js +var src = ['lorem', 'ipsum', 'foo', 'amet']; +// grab the "length" property of all items +var lengths = map(src, 'length'); // [5, 5, 3, 4] +``` + + + +## max(arr, [iterator], [thisObj]):* + +Returns maximum value inside array or use a custom iterator to define how items +should be compared. + +See: [`min()`](#min) + +```js +max([10, 2, 7]); // 10 +max(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'lorem' +``` + +It also supports a shorthand notation: + +```js +max(['foo', 'lorem', 'amet'], 'length'); // "lorem" +``` + + + +## min(arr, [iterator], [thisObj]):* + +Returns minimum value inside array or use a custom iterator to define how items +should be compared. + +See: [`max()`](#max) + +```js +min([10, 2, 7]); // 2 +min(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'foo' +``` + +It also supports a shorthand notation: + +```js +min(['foo', 'lorem', 'amet'], 'length'); // "foo" +``` + + + +## pick(arr):* + +Gets a random item and remove it from the array. + +### Example: + + var arr = [1, 2, 3, 4, 5, 6]; + var item_1 = pick(arr); // 4 + var item_2 = pick(arr); // 1 + console.log(arr); // [2, 3, 5, 6] + + + +## pluck(arr, propName):Array + +Extract a list of property values. + +See: [`function/prop()`](function.html#prop) + +```js +var users = [{name : 'John', age: 21}, {name: 'Jane', age : 27}]; +var names = pluck(users, 'name'); // ["John", "Jane"] +var ages = pluck(users, 'age'); // [21, 27] +``` + + + +## range([start], stop[, step]):Array + +Creates a new Array with all the values inside the range. Works similarly to +Python#range or PHP#range. + +### Arguments + + 1. `[start]` (Number) : Range start. Default is `0`. + 2. `stop` (Number) : Range limit. + 3. `[step]` (Number) : Step size. Default is `1`. + +### Example + +```js +range(5); // [0, 1, 2, 3, 4, 5] +range(0, 5); // [0, 1, 2, 3, 4, 5] +range(0, 5, 2); // [0, 2, 4] +range(20, 40, 5); // [20, 25, 30, 35, 40] +``` + + + +## reduce(arr, fn):* + +Crossbrowser `Array.reduce()`. + +Apply a function against an accumulator and each value of the array (from +left-to-right) as to reduce it to a single value. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#reduce](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce) + + + +## reduceRight(arr, fn):* + +Crossbrowser `Array.reduceRight()`. + +Apply a function simultaneously against two values of the array (from +right-to-left) as to reduce it to a single value. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#reduceRight](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight) + + + +## reject(arr, fn, thisObj):Array + +Creates a new array with all the elements that do **not** pass the truth test. +Opposite of [`filter()`](#filter). + +See [`filter()`](#filter) + +### Example + +```js +var numbers = [1, 2, 3, 4, 5, 6]; +reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4, 6] +``` + +It also supports a shorthand syntax: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true}, + {name:'jane', surname:'doe', beard:false} +]; +// reject items that matches all properties/values pairs +reject(arr, {name:'john'}); +// > [{name:'jane', surnname:'doe', beard:false}] +// reject items where 'beard' is a truthy value +filter(arr, 'beard'); +// > [{name:'john', surnname:'connor', beard:false}, +// {name:'jane', surname:'doe', beard:false}] +``` + + + +## remove(arr, item):void + +Remove a single item from the array. + +IMPORTANT: it won't remove duplicates, just a single item. + +### Example + +```js +var foo = [1, 2, 3, 4]; +remove(foo, 2); +console.log(foo); // [1, 3, 4] +``` + + + +## removeAll(arr, item):void + +Remove all instances of an item from the array. + +### Example + +```js +var foo = [1, 2, 3, 4, 2, 2]; +removeAll(foo, 2); +console.log(foo); // [1, 3, 4]; +``` + + + +## shuffle(arr):Array + +Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle. + +### Example + +```js +var arr = ['a', 'b', 'c', 'd', 'e']; +shuffle(arr); // ['b', 'd', 'e', 'c', 'a'] +``` + + + +## some(arr, callback, [thisObj]):Array + +Crossbrowser `Array.some()`. + +Tests whether some element in the array passes the test implemented by the provided function. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = [1, 'foo', 'bar']; +some(items, isString); // true +some(items, isFunction); // false +``` + +more info at [MDN Array#some](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some) + +It also supports a shorthand syntax: + +```js +var items = [{id:1, active:true}, {id:3, active:false}, {id:8, active:false}]; +// at least one item with `id === 8` +some(items, {id:8}); // true +// `active` is truthy on at least one item +some(items, 'active'); // true +``` + +see also: [`object/matches`](object.html#matches) + + + +## sort(arr, [compareFn]):Array + +Returns a sorted Array using the [Merge Sort](http://en.wikipedia.org/wiki/Merge_sort) algorithm (stable sort). + +The `Array.prototype.sort` browser implementations differ since the sorting algorithm isn't described in the ES spec - [in V8 it isn't stable](http://code.google.com/p/v8/issues/detail?id=90) and [on Firefox it is stable](https://bugzilla.mozilla.org/show_bug.cgi?id=224128) - so this function doesn't use the browser native implementation and is recommended in cases where a stable sort is required (items should preserve same order if already sorted). + +**Important:** It does logical comparisson by default (greater/less than) and +not a string comparisson like the native `Array#sort`. + +### compareFn + +If `compareFn` is supplied elements are sorted based on the value returned by +the `compareFn`. + + - If `compareFn(a, b)` is less than `0`, sort `a` to a lower index than `b`. + - If `compareFn(a, b)` returns `0`, leave `a` and `b` unchanged with respect + to each other, but sorted with respect to all different elements. + - If `compareFn(a, b)` is greater than `0`, sort `b` to a lower index than + `a`. + +### Example + +```js +sort([187, 23, 47, 987, 12, 59, 0]); // [0, 12, 23, 47, 59, 187, 987] +sort(['a', 'z', 'c', 'beta', 'b']); // ['a', 'b', 'beta', 'c', 'z'] + +// ['sit', 'amet', 'lorem', 'ipsum'] +sort(['lorem', 'ipsum', 'sit', 'amet'], function(a, b){ + // sort by length, items with same length + // will keep the relative order (stable) + return a.length - b.length; +}); + +// [4, 3, 2, 1] +sort([2, 3, 1, 4], function(a, b){ + // reverse sort + return b - a; +}); +``` + + + +## split(arr, [segments]):Array + +Splits an array into a fixed number of segments. + +The number of segments is specified by `segments` and defaults to 2. If the +array cannot be evenly split, the first segments will contain the extra items. +If `arr` is empty, an empty array is returned. If `arr.length` is less than +`segments`, then the resulting array will have `arr.length` number of +single-element arrays. + +### Example +```js +split([1, 2, 3, 4, 5], 3) // [ [1, 2], [3, 4], [5] ] +split([1, 2, 3, 4, 5]) // [ [1, 2, 3], [4, 5] ] +split([]) // [] +split([1, 2], 3) // [ [1], [2] ] +``` + + + +## toLookup(arr, key):Object + +Create an object that indexes the items in the array by a key. If `key` is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise `key` specifies the property on each value to use as the key. + +### Example + +```js +var foo = [{ name: 'a', thing: 1 }, { name: 'b', thing: 2 }]; +// { a: { name: 'a', thing: 1 }, b: { name: 'b', thing: 2 } } +toLookup(foo, 'name'); +// same as above +toLookup(foo, function (value) { return value.name; }); +``` + + + +## union(...arrs):Array + +Concat multiple arrays removing duplicates. + +```js +var a = ['a', 'b'], + b = ['c', 'a'], + c = [1, 'b', 2, 3, 'a']; + +//note that unique remove from begin to end +union(a, b, c); // ['c', 1, 'b', 2, 3, 'a'] +``` + + + +## unique(arr):Array + +Return a new Array of unique items. + +### Example + +```js +var foo = [1, 2, 3, 4, 2, 2, 3, 4]; +var bar = unique(foo); +console.log(foo); // [1, 2, 3, 4]; +``` + + + +## xor(arr1, arr2):Array + +Exclusive OR. Returns items that are present in a single array. + +Works like [Python set#symmetric_difference](http://docs.python.org/library/stdtypes.html#set.symmetric_difference) renamed for brevity. + +It will remove duplicates. + +See: [`difference()`](#difference), [`intersection()`](#intersection) + +```js +var a = ['a', 'b', 1]; +var b = ['c', 1]; +xor(a, b); // ['a', 'b', 'c'] +``` + + + +## zip(...arrs):Array + +Groups the elements of each array at their corresponding indexes. + +Useful for separate data sources that are coordinated through matching array +indexes. For a matrix of nested arrays, `zip.apply(...)` can transpose the +matrix in a similar fashion. + +```js +// [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] +zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); +``` + + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md new file mode 100644 index 00000000..2ffcab10 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md @@ -0,0 +1,233 @@ +# collection # + +Methods for dealing with collections (Array or Objects). + + + +## contains(list, value):Boolean + +Checks if collection contains value. + +```js +contains({a: 1, b: 2, c: 'bar'}, 2); // true +contains([1, 2, 3], 'foo'); // false +``` + +See: [array/contains](array.html#contains), [object/contains](object.html#contains) + + + +## every(list, callback, [thisObj]):Boolean + +Tests whether all values in the collection pass the test implemented by the +provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +every(obj, isNumber); // false +``` + +See: [array/every](array.html#every), [object/every](object.html#every) + + + +## filter(list, callback, [thisObj]):Array + +Filter collection properties. + +See: [array/filter](array.html#filter), [object/filter](object.html#filter) + + + +## find(list, callback, [thisObj]):* + +Loops through all the values in the collection and returns the first one that +passes a truth test (callback). + +**Important:** loop order over objects properties isn't guaranteed to be the +same on all environments. + +```js +find({a: 'foo', b: 12}, isString); // 'foo' +find(['foo', 12], isNumber); // 12 +``` + +See: [array/find](array.html#find), [object/find](object.html#find) + + + +## forEach(list, callback, [thisObj]) + +Loop through all values of the collection. + +See: [array/forEach](array.html#forEach), [object/forOwn](object.html#forOwn) + + + +## map(list, callback, [thisObj]):Array + +Returns a new collection where the properties values are the result of calling +the callback for each property in the original collection. + +See: [array/map](array.html#map), [object/map](object.html#map) + + + +## max(list, [iterator]):* + +Returns maximum value inside collection or use a custom iterator to define how +items should be compared. + +See: [`min()`](#min), [array/max](array.html#max), [object/max](object.html#max) + +```js +max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 +max(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'lorem' +``` + + + +## min(list, [iterator]):* + +Returns minimum value inside collection or use a custom iterator to define how +items should be compared. + +See: [`max()`](#max), [array/min](array.html#min), [object/min](object.html#min) + +```js +min([10, 2, 7]); // 2 +min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'foo' +``` + + + +## pluck(list, propName):Array + +Extract a list of property values. + +```js +var users = [ + { + name : 'John', + age : 21 + }, + { + name : 'Jane', + age : 27 + } +]; + +pluck(users, 'name'); // ["John", "Jane"] +pluck(users, 'age'); // [21, 27] + +users = { + first: { + name : 'John', + age : 21 + }, + second: { + name : 'Mary', + age : 25 + } +}; + +pluck(users, 'name'); // ['John', 'Mary'] +``` + +See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck) + + + +## reduce(list, callback, initial, [thisObj]):* + +Apply a function against an accumulator and each value in the collection as to +reduce it to a single value. + +```js +var obj = {a: 1, b: 2, c: 3, d: 4}; + +function sum(prev, cur, key, list) { + return prev + cur; +} + +reduce(obj, sum); // 10 +``` + +See: [array/reduce](array.html#reduce), [object/reduce](object.html#reduce) + + + +## reject(list, fn, [thisObj]):Array + +Creates a new array with all the elements that do **not** pass the truth test. +Opposite of [`filter()`](#filter). + +### Example + +```js +var numbers = [1, 2, 3, 4, 5]; +reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4] + +var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; +reject(obj, function(x) { return (x % 2) !== 0; }); // [2, 4] +``` + +See: [array/reject](array.html#reject), [object/reject](object.html#reject) + + + +## size(list):Number + +Returns the number of values in the collection. + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +size(obj); // 3 +size([1,2,3]); // 3 +size(null); // 0 +``` + +See: [object/size](object.html#size) + + + +## some(list, callback, [thisObj]):Boolean + +Tests whether any values in the collection pass the test implemented by the +provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +some(obj, isNumber); // true +some(obj, isString); // true +some([1, 2, 3], isNumber) // true +some([1, 2, 3], isString) // false +``` + +See: [array/some](array.html#some), [object/some](object.html#some) + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md new file mode 100644 index 00000000..b3f7f40e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md @@ -0,0 +1,295 @@ +# date # + +Date utilities. + + +## dayOfTheYear(date):Number + +How many days elapsed since begining of the year (following gregorian +calendar). + +```js +// Jan 1st +dayOfTheYear(new Date(2013, 0, 1)); // 1 +// Dec 31th +dayOfTheYear(new Date(2013, 11, 31)); // 364 +``` + + + +## diff(date1, date2, [unitName]):Number + +Calculate the difference between dates (range). + +The returned value is always positive. The default `unitName` is `"ms"`. + +Available units: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`, +`millisecond`. + +See: [`time/convert()`](time.html#convert) + +```js +var d1 = new Date(2012, 4, 5); +var d2 = new Date(2013, 4, 8); +diff(d1, d2); // 31795200000 +diff(d1, d2, 'hour'); // 8832 +diff(d1, d2, 'week'); // 52.57142857142857 +diff(d1, d2, 'month'); // 12.096774193548388 +diff(d1, d2, 'year'); // 1.0082191780821919 +``` + + + +## isLeapYear(fullYear|date):Boolean + +Checks if it's a [leap year](http://en.wikipedia.org/wiki/Leap_year) according +to the Gregorian calendar. + +see: [`totalDaysInMonth()`](#totalDaysInMonth) + +```js +isLeapYear(2012); // true +isLeapYear(2013); // false +isLeapYear(new Date(2012, 2, 28)); // true +``` + + +## isSame(date1, date2[, period]):Boolean + +Check if both dates are the "same". + +You can pass an optional *period* used to set the comparisson precision. + +Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. + +```js +var date1 = new Date(2013, 1, 3); +var date2 = new Date(2013, 2, 9); +isSame(date1, date2); // false +isSame(date1, date2, 'day'); // false +isSame(date1, date2, 'month'); // false +isSame(date1, date2, 'year'); // true +``` + + + +## parseIso(str):Number + +Parses an [ISO8601](http://en.wikipedia.org/wiki/Iso8601) date and returns the +number of milliseconds since January 1, 1970, 00:00:00 UTC, or `NaN` if it is +not a valid ISO8601 date. + +This parses *all* ISO8601 dates, including dates without times, [ordinal +dates](https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates), and the compact +representation (omitting delimeters). The only exception is [ISO week +dates](https://en.wikipedia.org/wiki/ISO_week_date), which are not parsed. + +If no time zone offset is specified, it assumes UTC time. + +```js +// Jan 01, 1970 00:00 GMT +parseIso('1970-01-01T00:00:00') // 0 +parseIso('1970-001') // 0 +parseIso('1970-01-01') // 0 +parseIso('19700101T000000.00') // 0 +parseIso('1970-01-01T02:00+02:00') // 0 + +// Jan 02, 2000 20:10 GMT+04:00 +parseIso('2000-01-02T20:10+04:00') // 946829400000 +``` + + + +## startOf(date, period):Date + +Get a new Date at the start of the period. + +Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. + +```js +// Apr 05 2013 11:27:43 +var date = new Date(2013, 3, 5, 11, 27, 43, 123); +startOf(date, 'year'); // Jan 01 2013 00:00:00 +startOf(date, 'month'); // Apr 01 2013 00:00:00 +startOf(date, 'day'); // Apr 05 2013 00:00:00 +startOf(date, 'hour'); // Apr 05 2013 11:00:00 +``` + + + +## strftime(date, format, [l10n]):String + +Format date based on strftime format. + +Replaced tokens: + +
+
%a
locale's abbreviated weekday name.
+
%A
locale's full weekday name.
+
%b
locale's abbreviated month name.
+
%B
locale's full month name.
+
%c
locale's appropriate date and time representation.
+
%C
century number (the year divided by 100 and truncated +to an integer) as a decimal number [00..99].
+
%d
day of the month as a decimal number [01..31].
+
%D
same as %m/%d/%y.
+
%e
day of the month as a decimal number [1..31]; +a single digit is preceded by a space.
+
%F
The ISO 8601 date format (%Y-%m-%d)
+
%h
same as %b.
+
%H
hour (24-hour clock) as a decimal number [00..23].
+
%I
hour (12-hour clock) as a decimal number [01..12].
+
%j
day of the year as a decimal number [001..366].
+
%L
zero-padded milliseconds [000..999]
+
%m
month as a decimal number [01..12].
+
%M
minute as a decimal number [00..59].
+
%n
newline character.
+
%p
locale's equivalent of either "am" or "pm"
+
%P
locale's equivalent of either "AM" or "PM"
+
%r
time in a.m. and +p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p.
+
%R
time in 24 hour notation (%H:%M).
+
%s
seconds since Epoch (1970-01-01 00:00:00 UTC)
+
%S
second as a decimal number [00..60].
+
%t
tab character.
+
%T
time (%H:%M:%S).
+
%u
weekday as a decimal number [1..7], with 1 representing +Monday.
+
%U
week number of the year (Sunday as the first day of +the week) as a decimal number [00..53].
+
%V
week number of the year (Monday as the first day of the +week) as a decimal number [01..53]. If the week containing 1 January has +four or more days in the new year, then it is considered week 1. Otherwise, +it is the last week of the previous year, and the next week is week 1.
+
%w
weekday as a decimal number [0..6], with 0 representing +Sunday.
+
%W
week number of the year (Monday as the first day of +the week) as a decimal number [00..53]. All days in a new year preceding +the first Monday are considered to be in week 0.
+
%x
locale's appropriate date representation.
+
%X
locale's appropriate time representation.
+
%y
year without century as a decimal number [00..99].
+
%Y
year with century as a decimal number.
+
%Z
timezone name or abbreviation, or by no bytes +if no timezone information exists.
+
%%
is replaced by %.
+
+ +```js +var date = new Date(2013, 3, 8, 9, 2, 4); +strftime(date, '%Y-%m-%d'); // "2013-04-08" +strftime(date, '%R'); // "09:02" +strftime(date, '%Y-%m-%dT%H:%M:%S%z'); // "2013-04-08T09:02:04+0000" +``` + +You can also set a custom locale: + +```js +var ptBr = require('mout/date/i18n/pt-BR'); +strftime(date, '%a, %d %b', ptBr); // 'Seg, 08 Abr' +strftime(date, '%A, %d %B', ptBr); // 'Segunda, 08 Abril' +``` + +To set it globally: + +```js +require('mout/date/i18n_').set( customLocaleData ); +``` + +See [date/i18n](https://github.com/mout/mout/tree/master/src/date/i18n) +for localization examples. + + + +## timezoneAbbr(date):String + +Return timezone abbreviation or similar data. + +The result will vary based on the OS/browser since some environments doesn't +provide enough info about the current locale. + +```js +// IE 7-8 +timezoneAbbr(new Date()); // "-0500" +// Chrome, FF, V8 +timezoneAbbr(new Date()); // "EST" +``` + + + +## timezoneOffset(date):String + +Return time zone as hour and minute offset from UTC (e.g. +0900). + +It's important to note that JavaScript Date object will use the system locale +info to determinate the [timezone +offset](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) +and that daylight saving time affects the result. + +```js +// if system locale is EST +timezoneOffset(new Date()); // -0500 +``` + + + +## totalDaysInMonth(fullYear, monthIndex):Number + +Returns the amount of days in the month taking into consideration leap years +(following Gregorian calendar). + +see: [`isLeapYear()`](#isLeapYear) + +```js +totalDaysInMonth(2008, 1); // 29 (leap year) +totalDaysInMonth(2009, 1); // 28 + +// you can also pass a Date object as single argument +totalDaysInMonth( new Date(2013, 0, 1) ); // 31 +``` + + +## totalDaysInYear(fullYear):Number + +Returns the amount of days in the year taking into consideration leap years +(following Gregorian calendar). + +see: [`isLeapYear()`](#isLeapYear), [`totalDaysInMonth()`](#totalDaysInMonth) + +```js +totalDaysInYear(2008); // 366 (leap year) +totalDaysInYear(2009); // 365 + +// you can also pass a Date object as single argument +totalDaysInYear( new Date(2013, 0, 1) ); // 365 +``` + + + +## weekOfTheYear(date, [firstDayOfWeek]):Number + +Returns how many weeks elapsed since start of the year (`0..53`). + +`firstDayOfWeek` can be `0` (Sunday) or `1` (Monday). By default weeks start at +Sunday. + +It will return `0` if `date` is before the first `firstDayOfWeek` of the year. + +```js +// Tue Jan 01 2013 +weekOfTheYear( new Date(2013,0,1) ); // 0 +// Wed Jan 09 2013 +weekOfTheYear( new Date(2013,0,9) ); // 1 +// Sun Jan 01 2012 +weekOfTheYear( new Date(2012,0,1) ); // 1 +// Mon Jan 09 2012 +weekOfTheYear( new Date(2012,0,9) ); // 2 +``` + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md new file mode 100644 index 00000000..2695a025 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md @@ -0,0 +1,174 @@ +# function # + +Function*(al)* utilities. + + + +## bind(fn, context, [...args]):Function + +Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + +### Arguments + + 1. `fn` (Function) : Target Function + 2. `context` (Object) : Execution context (object used as `this`) + 3. `[...args]` (*) : Arguments (0...n arguments) + +See: [`partial()`](#partial), [object/bindAll](./object.html#bindAll) + + + +## compose(...fn):Function + +Returns the composition of a list of functions, where each function consumes +the return value of the function that follows. In math terms, composing the +functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + +```js +function add2(x) { return x + 2 } +function multi2(x) { return x * 2 } +map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] + +//same as +map([1, 2, 3], function(x){ + return add2( multi2(x) ); +}); +``` + + + +## debounce(fn, delay[, isAsap]):Function + +Creates a function that will delay the execution of `fn` until after `delay` +milliseconds have elapsed since the last time it was invoked. + +Subsequent calls to the debounced function will return the result of the last +`fn` call. + +```js +// sometimes less is more +var lazyRedraw = debounce(redraw, 300); +foo.on.resize.add(lazyRedraw); +``` + +In this visualization, `|` is a debounced-function call and `X` is the actual +callback execution: + + Default + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X + + Debounced with `isAsap == true`: + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X + +See: [`throttle()`](#throttle) + + +## func(name):Function + +Returns a function that calls a method with given `name` on supplied object. +Useful for iteration methods like `array/map` and `array/forEach`. + +See: [`prop()`](#prop) + +```js +// will call the method `getName()` for each `user` +var names = map(users, func('getName')); +``` + + + +## partial(fn, [...args]):Function + +Return a partially applied function supplying default arguments. + +This method is similar to [`bind`](#bind), except it does not alter the this +binding. + +### Arguments + + 1. `fn` (Function) : Target Function + 3. `[...args]` (*) : Arguments (0...n arguments) + +See: [`bind()`](#bind) + +```js +function add(a, b){ return a + b } +var add10 = partial(add, 10); +console.log( add10(2) ); // 12 +``` + + + +## prop(name):Function + +Returns a function that gets a property with given `name` from supplied object. +Useful for using in conjunction with `array/map` and/or for creating getters. + +See: [`array/pluck()`](array.html#pluck) + +```js +var users = [{name:"John", age:21}, {name:"Jane", age:25}]; +// ["John", "Jane"] +var names = map(users, prop('name')); +``` + + + +## series(...fn):Function + +Returns a function that will execute all the supplied functions in order and +passing the same parameters to all of them. Useful for combining multiple +`array/forEach` into a single one and/or for debugging. + + +```js +// call `console.log()` and `doStuff()` for each item item in the array +forEach(arr, series(console.log, doStuff)); +``` + + + +## throttle(fn, interval):Function + +Creates a function that, when executed, will only call the `fn` function at +most once per every `interval` milliseconds. + +If the throttled function is invoked more than once during the wait timeout, +`fn` will also be called on the trailing edge of the timeout. + +Subsequent calls to the throttled function will return the result of the last +`fn` call. + +```js +// sometimes less is more +var lazyRedraw = throttle(redraw, 300); +foo.on.resize.add(lazyRedraw); +``` + +In this visualization, `|` is a throttled-function call and `X` is the actual +`fn` execution: + + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X X X X X X X X X X X + +See: [`debounce()`](#debounce) + + +## timeout(fn, millis, context, [...args]):Number + +Functions as a wrapper for `setTimeout`. Calls a the function `fn` after a given delay `millis` in milliseconds. +The function is called within the specified context. The return value can be used to clear the timeout using `clearTimeout`. + +```js +var id = timeout(doStuff, 300, this); + +clearTimeout(id); +``` + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md new file mode 100644 index 00000000..56d7879b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md @@ -0,0 +1,385 @@ +# lang # + +Language Utilities. Easier inheritance, scope handling, type checks. + + + +## clone(val):* + +Clone native types like Object, Array, RegExp, Date and primitives. + +This method will not clone values that are referenced within `val`. It will +only copy the value reference to the new value. If the value is not a plain +object but is an object, it will return the value unchanged. + +### Example + +```js +var a = { foo: 'bar' }; +var b = clone(a); +console.log(a === b); // false +console.log(a.foo === b.foo); // true + +var c = [1, 2, 3]; +var d = clone(b); +console.log(c === d); // false +console.log(c); // [1, 2, 3] +``` + +See: [`deepClone()`](#deepClone) + + + +## createObject(parent, [props]):Object + +Create Object using prototypal inheritance and setting custom properties. + +Mix between [Douglas Crockford Prototypal Inheritance](http://javascript.crockford.com/prototypal.html) and the EcmaScript 5 `Object.create()` method. + +### Arguments + + 1. `parent` (Object) : Parent Object + 2. `[props]` (Object) : Object properties + +### Example + +```js +var base = { + trace : function(){ + console.log(this.name); + } +}; + +var myObj = createObject(base, { + name : 'Lorem Ipsum' +}); + +myObject.trace(); // "Lorem Ipsum" +``` + + + +## ctorApply(constructor, args):Object + +Do `Function.prototype.apply()` on a constructor while maintaining prototype +chain. + +```js +function Person(name, surname) { + this.name = name; + this.surname = surname; +} + +Person.prototype.walk = function(){ + console.log(this.name +' is walking'); +}; + +var args = ['John', 'Doe']; + +// "similar" effect as calling `new Person("John", "Doe")` +var john = ctorApply(Person, args); +john.walk(); // "John is walking" +``` + + + +## deepClone(val, [instanceClone]):* + +Deep clone native types like Object, Array, RegExp, Date and primitives. + +The `instanceClone` function will be invoked to clone objects that are not +"plain" objects (as defined by [`isPlainObject`](#isPlainObject)) if it is +provided. If `instanceClone` is not specified, it will not attempt to clone +non-plain objects, and will copy the object reference. + +### Example + +```js +var a = {foo:'bar', obj: {a:1, b:2}}; +var b = deepClone(a); // {foo:'bar', obj: {a:1, b:2}} +console.log( a === b ); // false +console.log( a.obj === b.obj ); // false + +var c = [1, 2, [3, 4]]; +var d = deepClone(c); // [1, 2, [3, 4]] +var e = c.concat(); // [1, 2, [3, 4]] + +console.log( c[2] === d[2] ); // false +// concat doesn't do a deep clone, arrays are passed by reference +console.log( e[2] === d[2] ); // true + +function Custom() { } +function cloneCustom(x) { return new Custom(); } +var f = { test: new Custom() }; +var g = deepClone(f, cloneCustom); +g.test === f.test // false, since new Custom instance will be created +``` + +See: [`clone()`](#clone) + + + +## defaults(val, ...defaults):void + +Return first value that isn't `null` or `undefined`. + + function doSomethingAwesome(foo, bar) { + // default arguments + foo = defaults(foo, 'lorem'); + bar = defaults(bar, 123); + // ... + } + + + +## inheritPrototype(child, parent):void + +Inherit prototype from another Object. + +```js +function Foo(name){ + this.name = name; +} +Foo.prototype = { + getName : function(){ + return this.name; + } +}; + +function Bar(name){ + this.name = name; +} +//should be called before calling constructor +inheritPrototype(Bar, Foo); + +var myObj = new Bar('lorem ipsum'); +myObj.getName(); // "lorem ipsum" +``` + + +## is(x, y):Boolean + +Check if both values are identical/egal. + +```js +// wtfjs +NaN === NaN; // false +-0 === +0; // true + +is(NaN, NaN); // true +is(-0, +0); // false +is('a', 'b'); // false +``` + +See: [`isnt()`](#isnt) + + + +## isnt(x, y):Boolean + +Check if both values are not identical/egal. + +```js +// wtfjs +NaN === NaN; // false +-0 === +0; // true + +isnt(NaN, NaN); // false +isnt(-0, +0); // true +isnt('a', 'b'); // true +``` + +See: [`is()`](#is) + + + + +## isArguments(val):Boolean + +If value is an "Arguments" object. + + + +## isArray(val):Boolean + +If value is an Array. Uses native ES5 `Array.isArray()` if available. + + + +## isBoolean(val):Boolean + +If value is a Boolean. + + + +## isDate(val):Boolean + +If value is a Date. + + + +## isEmpty(val):Boolean + +Checks if Array/Object/String is empty. + + +```js +isEmpty(''); // true +isEmpty('bar'); // false +isEmpty([]); // true +isEmpty([1, 2]); // false +isEmpty({}); // true +isEmpty({a:1, b:2}); // false +``` + + +## isFinite(val):Boolean + +Checks if value is Finite. + +Note: This is not the same as native `isFinite`, which will return `true` for +booleans and empty strings. See http://es5.github.com/#x15.1.2.5. + + + +## isFunction(val):Boolean + +If value is a Function. + + + +## isKind(val, kind):Boolean + +If value is of "kind". (used internally by some of the *isSomething* checks). + +Favor the other methods since strings are commonly mistyped and also because +some "kinds" can only be accurately checked by using other methods (e.g. +`Arguments`), some of the other checks are also faster. + +```js +isKind([1,2], 'Array'); // true +isKind(3, 'Array'); // false +isKind(3, 'Number'); // true +``` + +See: [`kindOf()`](#kindOf) + + + +## isInteger(val):Boolean + +Check if value is an integer. + +```js +isInteger(123); // true +isInteger(123.45); // false +isInteger({}); // false +isInteger('foo'); // false +isInteger('123'); // false +``` + + + +## isNaN(val):Boolean + +Check if value is `NaN`. + +Note: This is not the same as native `isNaN`, which will return `true` for +`undefined` and other values. See [ES5 isNaN](http://es5.github.com/#x15.1.2.4) + + + +## isNull(val):Boolean + +If value is `null`. + + + +## isNumber(val):Boolean + +If value is a Number. + + + +## isObject(val):Boolean + +If value is an Object. + + + +## isPlainObject(val):Boolean + +If the value is an Object created by the Object constructor. + + + +## isRegExp(val):Boolean + +If value is a RegExp. + + + +## isString(val):Boolean + +If value is a String. + + + +## isUndefined(val):Boolean + +If value is `undefined`. + + + +## kindOf(val):String + +Gets kind of value (e.g. "String", "Number", "RegExp", "Null", "Date"). +Used internally by `isKind()` and most of the other *isSomething* checks. + +```js +kindOf([1,2]); // "Array" +kindOf('foo'); // "String" +kindOf(3); // "Number" +``` + +See: [`isKind()`](#isKind) + + +## toArray(val):Array + +Convert array-like object into Array or wrap value into Array. + +```js +toArray({ + "0" : "foo", + "1" : "bar", + "length" : 2 +}); // ["foo", "bar"] + +function foo(){ + return toArray(arguments); +} +foo("lorem", 123); // ["lorem", 123] + +toArray("lorem ipsum"); // ["lorem ipsum"] +toArray(window); // [window] +toArray({foo:"bar", lorem:123}); // [{foo:"bar", lorem:123}] +``` + +See: object/values() + + + +## toString(val):String + +Convert any value to its string representation. + +Will return an empty string for `undefined` or `null`, otherwise will convert +the value to its string representation. + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md new file mode 100644 index 00000000..f45be3ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md @@ -0,0 +1,298 @@ +# math # + +Math utilities. + + +## ceil(val[, step]):Number + +Round value up to full steps. Similar to `Math.ceil()` but can round value +to an arbitrary *radix*. + + ceil(7.2); // 8 + ceil(7.8); // 8 + ceil(7, 5); // 10 + ceil(11, 5); // 15 + ceil(15, 5); // 15 + +### Common use cases + +Round values by increments of 5/10/1000/etc. + +See: [`round()`](#round), [`floor()`](#floor), [`countSteps()`](#countSteps) + + + +## clamp(val, min, max):Number + +Clamps value inside range. + +`clamp()` is extremely useful in cases where you need to limit a value inside +a certain range. So instead of doing a complex `if/else` to filter/process the +value you can restrict it to always be inside the desired range: + + clamp(-5, 0, 10); // 0 + clamp(7, 1, 10); // 7 + clamp(8, 1, 10); // 8 + clamp(10, 1, 10); // 10 + clamp(11, 1, 10); // 10 + +If the value is smaller than `min` it returns the `min`, if `val` is higher +than `max` it returns `max`. + +### Common use cases + +Any situation where you need to limit a number inside a range like: slider +position, image galleries (so user can't skip to an image that doesn't +exist), drag and drop, scroll boundaries, etc. + +See: [`loop()`](#loop) + + + + +## countSteps(val, step[, overflow]):Number + +Count number of full steps. + +### Arguments: + + 1. `val` (Number) : Value. + 2. `step` (Number) : Step size. + 3. `[overflow]` (Number) : Maximum number of steps, nSteps will loop if +`>=` than overflow. + + +Count steps is very useful for cases where you need to know how many "full +steps" the number *completed*. Think of it as a division that only returns +integers and ignore remainders. + + countSteps(3, 5); // 0 + countSteps(6, 5); // 1 + countSteps(12, 5); // 2 + countSteps(18, 5); // 3 + countSteps(21, 5); // 4 + +You can also set an `overflow` which will reset the *counter* before reaching +this number. + + countSteps(3, 5, 3); // 0 + countSteps(6, 5, 3); // 1 + countSteps(12, 5, 3); // 2 + countSteps(18, 5, 3); // 0 + countSteps(21, 5, 3); // 1 + +### Common use cases + +#### How many items fit inside an area: + + var containerWidth = 100; + var itemWidth = 8; + var howManyFit = countSteps(containerWidth, itemWidth); // 12 + +#### Split value into different scales or convert value from one scale to another + +From [mout/time/parseMs](time.html#parseMs): + + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + // {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} + parseMs(2348765454); + + + +## floor(val[, step]):Number + +Round value down to full steps. Similar to `Math.floor()` but can round value +to an arbitrary *radix*. (formerly `snap`) + + floor(7.2); // 7 + floor(7.8); // 7 + floor(7, 5); // 5 + floor(11, 5); // 10 + floor(15, 5); // 15 + +### Common use cases + +Round values by increments of 5/10/1000/etc. + +See: [`round()`](#round), [`ceil()`](#ceil), [`countSteps()`](#countSteps) + + + +## inRange(val, min, max[, threshold]):Boolean + +Checks if value is inside the range. + + inRange(-6, 1, 10); // false + inRange( 5, 1, 10); // true + inRange(12, 1, 10); // false + +The threshold can be useful when you want granular control of what should match +and/or the precision could change at runtime or by some configuration option, +avoids the clutter of adding/subtracting the `threshold` from `mix` and `max`. + + inRange(12, 1, 10, 2); // true + inRange(13, 1, 10, 2); // false + +### Common use cases + +Anything that needs to check if value is inside a range, be it collision +detection, limiting interaction by mouse position, ignoring parts of the logic +that shouldn't happen if value isn't valid, simplify `if/else` conditions, +making code more readable, etc... + + + + +## isNear(val, target, threshold):Boolean + +Check if value is close to target. + +Similar to `inRange()` but used to check if value is close to a certain value +or match the desired value. Basically to simplify `if/else` conditions and to +make code clearer. + + isNear( 10.2, 10, 0.5); // true + isNear( 10.5, 10, 0.5); // true + isNear(10.51, 10, 0.5); // false + +### Common use cases + +Games where a certain action should happen if an *actor* is close to a target, +gravity fields, any numeric check that has some tolerance. + + + + +## lerp(ratio, start, end):Number + +Linear interpolation. + + lerp(0.5, 0, 10); // 5 + lerp(0.75, 0, 10); // 7.5 + +### Common use cases + +Linear interpolation is commonly used to create animations of elements moving +from one point to another, where you simply update the current ratio (which in +this case represents time) and get back the position of the element at that +"frame". + +The core idea of `lerp` is that you are using a number that goes from `0` to +`1` to specify a ratio inside that scale. This concept can be applied to +convert numbers from different scales easily. + +See: [`map()`](#map), [`norm()`](#norm) + + + + +## loop(val, min, max):Number + +Loops value inside range. Will return `min` if `val > max` and `max` if `val +< min`, otherwise it returns `val`. + + loop(-1, 0, 10); // 10 + loop( 1, 0, 10); // 1 + loop( 5, 0, 10); // 5 + loop( 9, 0, 10); // 9 + loop(10, 0, 10); // 10 + loop(11, 0, 10); // 0 + +Similar to [`clamp()`](#clamp) but *loops* the value inside the range when an +overflow occurs. + +### Common use cases + +Image galleries, infinite scroll, any kind of logic that requires that the +first item should be displayed after the last one or the last one should be +displayed after first if going on the opposite direction. + +See: [`clamp()`](#clamp) + + + + +## map(val, min1, max1, min2, max2):Number + +Maps a number from one scale to another. + + map(3, 0, 4, -1, 1) // 0.5 + map(3, 0, 10, 0, 100) // 30 + +### Common use cases + +Very useful to convert values from/to multiple scales. + +Let's suppose we have a slider that needs to go from `2000` to `5000` and that slider +has `300px` of width, here is how we would translate the knob position into the +current value: + + var knobX = 123; + var sliderWid = 300; + var minVal = 2000; + var maxVal = 5000; + + var curVal = map(knobX, 0, sliderWid, minVal, maxVal); // 3230 + +See: [`lerp()`](#lerp), [`norm()`](#norm) + + + + +## norm(val, min, max):Number + +Gets normalized ratio of value inside range. + + norm(50, 0, 100); // 0.5 + norm(75, 0, 100); // 0.75 + +### Common use cases + +Convert values between scales, used by [`map()`](#map) internally. Direct +opposite of [`lerp()`](#lerp). + +See: [`lerp()`](#lerp), [`map()`](#map) + + + +## round(val[, step]):Number + +Round value to full steps. Similar to `Math.round()` but allow setting an +arbitrary *radix*. + + // default + round(0.22); // 0 + round(0.49); // 0 + round(0.51); // 1 + + // custom radix + round(0.22, 0.5); // 0 + round(0.49, 0.5); // 0.5 + round(0.51, 0.5); // 0.5 + round(0.74, 0.5); // 0.5 + round(0.75, 0.5); // 1 + round(1.24, 0.5); // 1 + round(1.25, 0.5); // 1.5 + round(1.74, 0.5); // 1.5 + +### Common use cases + +Round values by increments of 0.5/5/10/1000/etc. + +See: [`floor()`](#floor), [`ceil()`](#ceil), [`countSteps()`](#countSteps) + + + +------------------------------------------------------------------------------- + +For more usage more info check the specs and source code. + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md new file mode 100644 index 00000000..8d93865b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md @@ -0,0 +1,225 @@ +# number # + +Number utilities. + + +## abbreviate(val[, nDecimalDigits, dictionary]):String + +Abbreviate number to thousands (K), millions (M) or billions (B). + +The default value for `nDecimalDigits` is `1`. + +### Example + + abbreviate(123456); // "123.5K" + abbreviate(12345678); // "12.3M" + abbreviate(1234567890); // "1.2B" + +You can set the amount of decimal digits (default is `1`): + + abbreviate(543); // "0.5K" + abbreviate(543, 1); // "0.5K" + abbreviate(543, 2); // "0.54K" + abbreviate(543, 3); // "0.543K" + +You can customize the abbreviation by passing a custom "dictionary": + + var _ptbrDict = { + thousands : ' mil', + millions : ' Mi', + billions : ' Bi' + }; + function customAbbr(val) { + return abbreviate(val, 1, _ptbrDict); + } + + customAbbr(123456); // "123.5 mil" + customAbbr(12345678); // "12.3 Mi" + customAbbr(1234567890); // "1.2 Bi" + + + +## currencyFormat(val[, nDecimalDigits, decimalSeparator, thousandsSeparator]):String + +Format a number as currency. + +### Example: + + currencyFormat(1000); // "1,000.00" + currencyFormat(1000, 1); // "1,000.0" + currencyFormat(1000, 2, ',', '.'); // "1.000,00" + + + +## enforcePrecision(val, nDecimalDigits):Number + +Enforce a specific amount of decimal digits and also fix floating point +rounding issues. + +### Example: + +```js +enforcePrecision(0.615, 2); // 0.62 +enforcePrecision(0.625, 2); // 0.63 +//floating point rounding "error" (rounds to odd number) ++(0.615).toFixed(2); // 0.61 ++(0.625).toFixed(2); // 0.63 +``` + + + +## MAX_INT:Number + +Maximum 32-bit signed integer value. `Math.pow(2, 31) - 1` + +### Example: + +```js +console.log( MAX_INT ); // 2147483647 +``` + + +## MAX_UINT:Number + +Maximum 32-bit unsigned integer value. `Math.pow(2, 32) - 1` + +### Example: + +```js +console.log( MAX_UINT ); // 4294967295 +``` + + +## MIN_INT:Number + +Minimum 32-bit signed integer value. `Math.pow(2, 31) * -1`. + +### Example: + +```js +console.log( MIN_INT ); // -2147483648 +``` + + +## pad(n, minLength[, char]):String + +Add padding zeros if `n.length` < `minLength`. + +### Example: + +```js +pad(1, 5); // "00001" +pad(12, 5); // "00012" +pad(123, 5); // "00123" +pad(1234, 5); // "01234" +pad(12345, 5); // "12345" +pad(123456, 5); // "123456" + +// you can also specify the "char" used for padding +pad(12, 5, '_'); // "___12" +``` + +see: [string/lpad](./string.html#lpad) + + + +## rol(val, shift):Number + +Bitwise circular shift left. + +More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) + + + +## ror(val, shift):Number + +Bitwise circular shift right. + +More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) + + + +## sign(val):Number + +Returns `-1` if value is negative, `0` if the value is `0` and `1` if value is positive. Useful for +multiplications. + +```js +sign(-123); // -1 +sign(123); // 1 +sign(0); // 0 +``` + + + +## toInt(val):Number + +"Convert" value into an 32-bit integer. Works like `Math.floor` if `val > 0` and +`Math.ceil` if `val < 0`. + +**IMPORTANT:** val will wrap at [number/MIN_INT](#MIN_INT) and +[number/MAX_INT](#MAX_INT). + +Created because most people don't know bitwise operations and also because this +feature is commonly needed. + +[Perf tests](http://jsperf.com/vs-vs-parseint-bitwise-operators/7) + +### Example: + +```js +toInt(1.25); // 1 +toInt(0.75); // 0 +toInt(-0.55); // 0 +toInt(-5.0001) // -5 +``` + + + +## toUInt(val):Number + +"Convert" value into an 32-bit unsigned integer. + +Works like AS3#uint(). + +**IMPORTANT:** val will wrap at 2^32. + +### Example: + +```js +toUInt(1.25); // 1 +toUInt(0.75); // 0 +toUInt(-0.55); // 0 +toUInt(-5.0001); // 4294967291 +toUInt(Math.pow(2,32) - 0.5); // 4294967295 +toUInt(Math.pow(2,32) + 0.5); // 0 +``` + + +## toUInt31(val):Number + +"Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + +Useful since all bitwise operators besides `>>>` treat numbers as signed +integers. + +**IMPORTANT:** val will wrap at 2^31 and negative numbers will be treated as +`zero`. + +### Example: + +```js +toUInt31(1.25); // 1 +toUInt31(0.75); // 0 +toUInt31(-0.55); // 0 +toUInt31(-5.0001); // 0 +toUInt31(Math.pow(2,31) - 0.5); // 21474836470 +toUInt31(Math.pow(2,31) + 0.5); // 0 +``` + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md new file mode 100644 index 00000000..b4d5e483 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md @@ -0,0 +1,780 @@ +# object # + +Object utilities. + + + +## bindAll(obj, [...methodNames]):void + +Bind methods of the target object to always execute on its own context +(ovewritting the original function). + +See: [function/bind](./function.html#bind) + +```js +var view = { + name: 'Lorem Ipsum', + logNameOnClick: function() { + console.log(this.name); + } +}; + +// binds all methods by default +bindAll(view); +jQuery('#docs').on('click', view.logNameOnClick); +``` + +You can also specify the list of methods that you want to bind (in case you +just want to bind a few of them). + +```js +// only the listed methods will be bound to `obj` context +bindAll(obj, 'logNameOnClick', 'doAwesomeStuffOnDrag'); +``` + + + +## contains(obj, value):Boolean + +Similar to [Array/contains](array.html#contains). Checks if Object contains +value. + +```js +var obj = { + a: 1, + b: 2, + c: 'bar' +}; +contains(obj, 2); // true +contains(obj, 'foo'); // false +``` + + + +## deepEquals(a, b, [callback]):Boolean + +Recursively tests whether two objects contain the same keys and equal values. + +`callback` specifies the equality comparison function used to compare +non-object values. It defaults to using the strict equals (`===`) operator. + +If the values are both an object, it will recurse into the objects, checking if +their keys/values are equal. It will only check the keys and values contained +by the objects; it will not check the objects' prototypes. If the either of +the values are not objects, they will be checked using the `callback` function. + +Example: + +```js +deepEquals({ a: 1 }, { a: 1 }); // true +deepEquals({ value: { a: 1 } }, { value: { a: 1 } }); // true +deepEquals({ value: { a: 1 } }, { value: { a: 2 } }); // false +deepEquals({ value: { a: 1 } }, { value: { a: 1, b: 2 } }); // false +deepEquals({}, null); // false +deepEquals(null, null); // true +deepEquals( + { a: { b: 1 } }, + { a: { b: '1' } }, + function(a, b) { return a == b; }); // true +``` + +See: [`equals()`](#equals) + + + +## deepFillIn(target, ...objects):Object + +Fill missing properties recursively. + +It's different from `deepMixIn` since it won't override any existing property. +It's also different from `merge` since it won't clone child objects during the +process. + +It returns the target object and mutates it in place. + +See: [`fillIn()`](#fillIn), [`deepMixIn()`](#deepMixIn), [`merge()`](#merge) + +```js +var base = { + foo : { + bar : 123 + }, + lorem : 'ipsum' +}; +var options = deepFillIn({foo : { baz : 45 }, lorem : 'amet'}, base); +// > {foo: {bar:123, baz : 45}, lorem : 'amet'} +``` + + + +## deepMatches(target, pattern):Boolean + +Recursively checks if object contains all properties/value pairs. When both +the target and pattern values are arrays, it checks that the target value +contain matches for all the items in the pattern array (independent of order). + +```js +var john = { + name: 'John', + age: 22, + pets: [ + { type: 'cat', name: 'Grumpy Cat' }, + { type: 'dog', name: 'Hawk' } + ] +}; + +deepMatches(john, { name: 'John' }); // true +deepMatches(john, { age: 21 }); // false +deepMatches(john, { pets: [ { type: 'cat' } ] }); // true +deepMatches(john, { pets: [ { name: 'Hawk' } ] }); // true +deepMatches(john, { pets: [ { name: 'Hairball' } ] }); // false +``` + +See [`matches()`](#matches) + + + +## deepMixIn(target, ...objects):Object + +Mixes objects into the target object, recursively mixing existing child objects +as well. + +It will only recursively mix objects if both (existing and new) values are +plain objects. + +Returns the target object. Like [`merge()`](#merge), but mutates the target +object, and does not clone child objects. + +```js +var target = { + foo: { + name: "foo", + id: 1 + } +}; + +deepMixIn(target, { foo: { id: 2 } }); +console.log(target); // { foo: { name: "foo", id: 2 } } +``` + +See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) + + + +## equals(a, b, [callback]):Boolean + +Tests whether two objects contain the same keys and values. + +`callback` specifies the equality comparison function used to compare the +values. It defaults to using the strict equals (`===`) operator. + +It will only check the keys and values contained by the objects; it will not +check the objects' prototypes. If either of the values are not objects, they +will be compared using the `callback` function. + +```js +equals({}, {}); // true +equals({ a: 1 }, { a: 1 }); // true +equals({ a: 1 }, { a: 2 }); // false +equals({ a: 1, b: 2 }, { a: 1 }); // false +equals({ a: 1 }, { a: 1, b: 2 }); // false +equals(null, null); // true +equals(null, {}); // false +equals({ a: 1 }, { a: '1' }, function(a, b) { return a == b; }); // true +``` + + + +## every(obj, callback, [thisObj]):Boolean + +Similar to [Array/every](array.html#every). Tests whether all properties in the +object pass the test implemented by the provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +every(obj, isNumber); // false +``` + + + +## fillIn(obj, ...default):Object + +Fill in missing properties in object with values from the *defaults* objects. + + var base = { + foo : 'bar', + num : 123 + }; + + fillIn({foo:'ipsum'}, base); // {foo:'ipsum', num:123} + +PS: it allows merging multiple objects at once, the first ones will take +precedence. + +See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) + + + +## filter(obj, callback, [thisObj]) + +Returns a new object containing all properties where `callback` returns true, +similar to Array/filter. It does not use properties from the object's +prototype. + +Callback receives the same arguments as `forOwn()`. + +See: [`forOwn()`](#forOwn), [`forIn()`](#forIn), [`pick()`](#pick) + +```js +var obj = { + foo: 'value', + bar: 'bar value' +}; + +// returns { bar: 'bar value' } +filter(obj, function(v) { return value.length > 5; }); + +// returns { foo: 'value' } +filter(obj, function(v, k) { return k === 'foo'; }); +``` + + + +## find(obj, callback, [thisObj]) + +Loops through all the properties in the Object and returns the first one that +passes a truth test (callback), similar to [Array/find](array.html#find). +Unlike Array/find, order of iteration is not guaranteed. + +```js +var obj = { + a: 'foo', + b: 12 +}; + +find(obj, isString); // 'foo' +find(obj, isNumber); // 12 +``` + + + +## forIn(obj, callback[, thisObj]) + +Iterate over all properties of an Object, similar to +[Array/forEach](array.html#forEach). + +It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). +It **will** iterate over inherited (enumerable) properties from the prototype. + +It allows exiting the iteration early by returning `false` on the callback. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys), [`values()`](#values) + +### Callback arguments + +Callback will receive the following arguments: + + 1. Property Value (*) + 2. Key name (String) + 3. Target object (Object) + +### Example + +```js +function Foo(){ + this.foo = 1; + this.bar = 2; +} + +Foo.prototype.lorem = 4; + +var obj = new Foo(); + +var result = 0; +var keys = []; + +forIn(obj, function(val, key, o){ + result += val; + keys.push(key); +}); + +console.log(result); // 7 +console.log(keys); // ['foo', 'bar', 'lorem'] +``` + + + +## forOwn(obj, callback[, thisObj]) + +Iterate over all own properties from an Object, similar to +[Array/forEach](array.html#forEach). + +It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). +Notice that it **won't** iterate over properties from the prototype. + +It allows exiting the iteration early by returning `false` on the callback. + +See: [`forIn()`](#forIn), [`keys()`](#keys), [`values()`](#values) + +### Callback arguments + +Callback will receive the following arguments: + + 1. Property Value (*) + 2. Key name (String) + 3. Target object (Object) + +### Example + +```js +function Foo(){ + this.foo = 1; + this.bar = 2; +} + +// will be ignored +Foo.prototype.lorem = 4; + +var obj = new Foo(); + +var result = 0; +var keys = []; + +forOwn(obj, function(val, key, o){ + result += val; + keys.push(key); +}); + +console.log(result); // 3 +console.log(keys); // ['foo', 'bar'] +``` + + + +## functions(obj):Array + +Returns a sorted list of all enumerable properties that have function values +(including inherited properties). + +```js +var obj = { + foo : function(){}, + bar : 'baz' +}; +functions(obj); // ['foo'] +``` + + + +## get(obj, propName):* + +Returns nested property value. Will return `undefined` if property doesn't +exist. + +See: [`set()`](#set), [`namespace()`](#namespace), [`has()`](#has) + +```js +var lorem = { + ipsum : { + dolor : { + sit : 'amet' + } + } + }; + +get(lorem, 'ipsum.dolor.sit'); // "amet" +get(lorem, 'foo.bar'); // undefined +``` + + + +## has(obj, propName):Boolean + +Checks if object contains a child property. Useful for cases where you need to +check if an object contain a *nested* property. It will get properties +inherited by the prototype. + +see: [`hasOwn()`](#hasOwn), [`get()`](#get) + +```js +var a = { + b : { + c : 123 + } + }; + +has(a, 'b.c'); // true +has(a, 'foo.c'); // false +``` + +### Common use case + +```js +if( has(a, 'foo.c') ){ // false + // ... +} + +if( a.foo.c ){ // ReferenceError: `foo` is not defined + // ... +} +``` + + + +## hasOwn(obj, propName):Boolean + +Safer `Object.hasOwnProperty`. Returns a boolean indicating whether the object +has the specified property. + +see: [`has()`](#has) + +```js +var obj = { + foo: 1, + hasOwnProperty : 'bar' +}; + +obj.hasOwnProperty('foo'); // ERROR! hasOwnProperty is not a function + +hasOwn(obj, 'foo'); // true +hasOwn(obj, 'hasOwnProperty'); // true +hasOwn(obj, 'toString'); // false +``` + + + +## keys(obj):Array + +Returns an array of all own enumerable properties found upon a given object. +It will use the native `Object.keys` if present. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`values()`](#values) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +keys(obj); // ['foo', 'bar', 'lorem'] +``` + + + +## map(obj, callback, [thisObj]):Object + +Returns a new object where the property values are the result of calling the +callback for each property in the original object, similar to Array/map. + +The callback function receives the same arguments as in `forOwn()`. + +See: [`forOwn()`](#forOwn) + +```js +var obj = { foo: 1, bar: 2 }, + data = { foo: 0, bar: 1 }; + +map(obj, function(v) { return v + 1; }); // { foo: 2, bar: 3 } +map(obj, function(v, k) { return k; }); // { foo: "foo", bar: "bar" } +map(obj, function(v, k) { return this[k]; }, data); // { foo: 0, bar: 1 } +``` + + + +## matches(obj, props):Boolean + +Checks if object contains all properties/values pairs. Useful for validation +and filtering. + +```js +var john = {age:25, hair:'long', beard:true}; +var mark = {age:27, hair:'short', beard:false}; +var hippie = {hair:'long', beard:true}; +matches(john, hippie); // true +matches(mark, hippie); // false +``` + +See [`deepMatches()`](#deepMatches) + + + +## merge(...objects):Object + +Deep merges objects. Note that objects and properties will be cloned during the +process to avoid undesired side effects. It return a new object and won't +affect source objects. + +```js +var obj1 = {a: {b: 1, c: 1, d: {e: 1, f: 1}}}; +var obj2 = {a: {b: 2, d : {f : 'yeah'} }}; + +merge(obj1, obj2); // {a: {b : 2, c : 1, d : {e : 1, f : 'yeah'}}} +``` + +See: [`deepMixIn()`](#deppMixIn), [`deepFillIn()`](#deepFillIn) + + + +## max(obj[, iterator]):* + +Returns maximum value inside object or use a custom iterator to define how +items should be compared. Similar to [Array/max](array.html#max). + +See: [`min()`](#min) + +```js +max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 +max({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'lorem' +``` + + + +## min(obj[, iterator]):* + +Returns minimum value inside object or use a custom iterator to define how +items should be compared. Similar to [Array/min](array.html#min). + +See: [`max()`](#max) + +```js +min({a: 100, b: 2, c: 1, d: 3, e: 200}); // 1 +min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'foo' +``` + + + +## mixIn(target, ...objects):Object + +Combine properties from all the objects into first one. + +This method affects target object in place, if you want to create a new Object +pass an empty object as first parameter. + +### Arguments + + 1. `target` (Object) : Target Object. + 2. `...objects` (...Object) : Objects to be combined (0...n objects). + +### Example + +```js +var a = {foo: "bar"}; +var b = {lorem: 123}; + +mixIn({}, a, b); // {foo: "bar", lorem: 123} +console.log(a); // {foo: "bar"} + +mixIn(a, b); // {foo: "bar", lorem: 123} +console.log(a); // {foo: "bar", lorem: 123} +``` + +See: [`fillIn()`](#fillIn), [`merge()`](#merge) + + + + +## namespace(obj, propName):Object + +Creates an empty object inside namespace if not existent. Will return created +object or existing object. + +See: [`get()`](#get), [`set()`](#set) + +```js +var obj = {}; +namespace(obj, 'foo.bar'); // {} +console.log(obj); // {foo:{bar:{}}} +``` + + + +## pick(obj, ...keys):Object + +Return a copy of the object that contains only the whitelisted keys. + +See: [`filter()`](#filter) + +```js +var user = { + firstName : 'John', + lastName : 'Doe', + dob : '1985/07/23', + gender : 'male' +}; + +// can pass an array of keys as second argument +var keys = ['firstName', 'dob'] +pick(user, keys); // {firstName:"John", dob: "1985/07/23"} + +// or multiple arguments +pick(user, 'firstName', 'lastName'); // {firstName:"John", lastName: "Doe"} +``` + + + +## pluck(obj, propName):Object + +Extract an object containing property values with keys as they appear in the +passed object. + +```js +var users = { + first: { + name : 'John', + age : 21 + }, + second: { + name : 'Mary', + age : 25 + } +}; + +pluck(users, 'name'); // {first: 'John', second: 'Mary'} ); +pluck(users, 'age'); // {first: 21, second: 25} ); +``` + + + +## reduce(obj, callback, initial, [thisObj]):* + +Similar to [Array/reduce](array.html#reduce). + +Apply a function against an accumulator and each property of the object (order +is undefined) as to reduce it to a single value. + +```js +var obj = {a: 1, b: 2, c: 3, d: 4}; + +function sum(prev, cur, key, list) { + compare1.push(prev); + return prev + cur; +} + +reduce(obj, sum); // 10 +``` + + + +## reject(obj, callback, thisObj):Object + +Returns a new object containing all properties where `callback` returns true, +similar to [Array/reject](array.html#reject). It does not use properties from +the object's prototype. Opposite of [`filter()`](#filter). + +See [`filter()`](#filter) + +### Example + +```js +var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; +reject(obj, function(x) { return (x % 2) !== 0; }); // {b: 2, d: 4} +``` + + + +## values(obj):Array + +Returns an array of all own enumerable properties values found upon a given object. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +values(obj); // [1, 2, 3] +``` + + + +## set(obj, propName, value) + +Sets a nested property value. + +See: [`get()`](#get), [`namespace()`](#namespace) + +```js +var obj = {}; +set(obj, 'foo.bar', 123); +console.log(obj.foo.bar); // 123 +console.log(obj); // {foo:{bar:123}} +``` + + + +## size(obj):Number + +Returns the count of own enumerable properties found upon a given object. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +size(obj); // 3 +``` + + + +## some(obj, callback, [thisObj]):Boolean + +Similar to [Array/some](array.html#some). Tests whether any properties in the +object pass the test implemented by the provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +some(obj, isNumber); // true +``` + + + +## unset(obj, propName):Boolean + +Delete object property if existent and returns a boolean indicating succes. It +will also return `true` if property doesn't exist. + +Some properties can't be deleted, to understand why [check this +article](http://perfectionkills.com/understanding-delete/). + +See: [`set()`](#set) + +```js +var lorem = { + ipsum : { + dolor : { + sit : 'amet' + } + } + }; + +unset(lorem, 'ipsum.dolor.sit'); // true +console.log(lorem.ipsum.dolor); // {} +unset(lorem, 'foo.bar'); // true +``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md new file mode 100644 index 00000000..1be3c102 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md @@ -0,0 +1,115 @@ +# queryString # + +Utilities for query string manipulation. + + + +## contains(url, paramName):Boolen + +Checks if query string contains parameter. + +### Arguments: + + 1. `url` (String) : URL or query string. + 2. `paramName` (String) : Parameter name. + +### Example: + +```js +var url = 'example.com/?lorem=ipsum'; +contains(url, 'lorem'); // true +contains(url, 'foo'); //false +``` + + + +## decode(queryStr[, shouldTypecast]):Object + +Parses query string and creates an object of keys => vals. + +Will typecast value with [`string/typecast`](string.html#typecast) by default +and decode string parameters using `decodeURIComponent()`. + +```js +var query = '?foo=bar&lorem=123'; +decode(query); // {foo: "bar", lorem: 123} +decode(query, false); // {foo: "bar", lorem: "123"} +``` + + +## encode(obj):String + +Encode object into a query string. + +Will encode parameters with `encodeURIComponent()`. + +```js +encode({foo: "bar", lorem: 123}); // "?foo=bar&lorem=123" +``` + + +## getParam(url, param[, shouldTypecast]):* + +Get query parameter value. + +Will typecast value with [`string/typecast`](string.html#typecast) by default. + +See: [`setParam()`](#setParam) + +### Arguments: + + 1. `url` (String) : Url. + 2. `param` (String) : Parameter name. + 3. `[shouldTypecast]` (Boolean) : If it should typecast value. + +### Example: + +```js +var url = 'example.com/?foo=bar&lorem=123&ipsum=false'; +getParam(url, 'dolor'); // "amet" +getParam(url, 'lorem'); // 123 +getParam(url, 'lorem', false); // "123" +``` + + +## parse(url[, shouldTypecast]):Object + +Parses URL, extracts query string and decodes it. + +It will typecast all properties of the query object unless second argument is +`false`. + +Alias to: `decode(getQuery(url))`. + +```js +var url = 'example.com/?lorem=ipsum&a=123'; +parse(url); // {lorem: "ipsum", a: 123} +parse(url, false); // {lorem: "ipsum", a: "123"} +``` + + +## getQuery(url):String + +Gets full query as string with all special chars decoded. + +```js +getQuery('example.com/?lorem=ipsum'); // "?lorem=ipsum" +``` + + +## setParam(url, paramName, value):String + +Add new query string parameter to URL or update existing value. + +See: [`getParam()`](#getParam) + +```js +setParam('?foo=bar&lorem=0', 'lorem', 'ipsum'); // '?foo=bar&lorem=ipsum' +setParam('?lorem=1', 'foo', 123); // '?lorem=1&foo=123' +``` + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md new file mode 100644 index 00000000..b058b4e0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md @@ -0,0 +1,218 @@ +# random # + +Pseudo-random generators. + +mout uses `Math.random` by default on all the pseudo-random generators, if +you need a seeded random or a better algorithm see the [`random()`](#random) +documentation for instructions. + + + +## choice(...items):* + +Returns a random element from the supplied arguments or from an array if single +argument is an array. + +### Example: + +```js +choice(1, 2, 3, 4, 5); // 3 + +var arr = ['lorem', 'ipsum', 'dolor']; +choice(arr); // 'dolor' +``` + + + +## guid():String + +Generates a pseudo-random [Globally Unique Identifier](http://en.wikipedia.org/wiki/Globally_unique_identifier) (v4). + +Since the total number of GUIDs is 2122 the chance of generating the +same value twice is negligible. + +**Important:** this method uses `Math.random` by default so the UUID isn't +*safe* (sequence of outputs can be predicted in some cases), check the +[`random()`](#random) documentation for more info on how to replace the default +PRNG if you need extra safety or need *seeded* results. + +See: [`randHex()`](#randHex), [`random()`](#random) + +### Example: + +```js +guid(); // 830e9f50-ac7f-4369-a14f-ed0e62b2fa0b +guid(); // 5de3d09b-e79c-4727-932b-48c49228d508 +``` + + + +## rand([min], [max]):Number + +Gets a random number inside range or snap to min/max values. + +### Arguments: + + 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. + 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. + + +### Example: + +```js +rand(); // 448740433.55274725 +rand(); // -31797596.097682 +rand(0, 10); // 7.369723 +rand(0, 10); // 5.987042 +``` + +See: [`random()`](#random) + + + +## randBit():Number + +Returns a random "bit" (0 or 1). Useful for addition/subtraction. + +It's slightly faster than `choice(0, 1)` since implementation is simpler (not +that it will make a huge difference in most cases). + +See: [`choice()`](#choice) + +### Example: + +```js +randBit(); // 1 +randBit(); // 0 + +//same effect as +choice(0, 1); +``` + + + +## randHex([size]):String + +Returns a random hexadecimal string. + +The default `size` is `6`. + +### Example: + +```js +randHex(); // "dd8575" +randHex(); // "e6baeb" +randHex(2); // "a2" +randHex(30); // "effd7e2ad9a4a3067e30525fab983a" +``` + + + +## randInt([min], [max]):Number + +Gets a random integer inside range or snap to min/max values. + +### Arguments: + + 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. + 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. + + +### Example: + +```js +randInt(); // 448740433 +randInt(); // -31797596 +randInt(0, 10); // 7 +randInt(0, 10); // 5 +``` + + + +## randSign():Number + +Returns a random "sign" (-1 or 1). Useful for multiplications. + +It's slightly faster than `choice(-1, 1)` since implementation is simpler (not +that it will make a huge difference in most cases). + +See: [`choice()`](#choice) + +### Example: + +```js +randSign(); // -1 +randSign(); // 1 + +//same effect as +choice(-1, 1); +``` + + + +## random():Number + +Returns a random number between `0` and `1`. Same as `Math.random()`. + +```js +random(); // 0.35435103671625257 +random(); // 0.8768321881070733 +``` + +**Important:** No methods inside mout should call `Math.random()` +directly, they all use `random/random` as a proxy, that way we can +inject/replace the pseudo-random number generator if needed (ie. in case we +need a seeded random or a better algorithm than the native one). + +### Replacing the PRNG + +In some cases we might need better/different algorithms than the one provided +by `Math.random` (ie. safer, seeded). + +Because of licensing issues, file size limitations and different needs we +decided to **not** implement a custom PRNG and instead provide a easy way to +override the default behavior. - [issue #99](https://github.com/millermedeiros/amd-utils/issues/99) + +If you are using mout with a loader that supports the [AMD map +config](https://github.com/amdjs/amdjs-api/wiki/Common-Config), such as +[RequireJS](http://requirejs.org/), you can use it to replace the PRNG +(recommended approach): + +```js +requirejs.config({ + map : { + // all modules will load "my_custom_prng" instead of + // "mout/random/random" + '*' : { + 'mout/random/random' : 'my_custom_prng' + } + } +}); +``` + +You also have the option to override `random.get` in case you are using +mout on node.js or with a loader which doesn't support the map config: + +```js +// replace the PRNG +var n = 0; +random.get = function(){ + return ++n % 2? 0 : 1; // not so random :P +}; +random(); // 0 +random(); // 1 +random(); // 0 +random(); // 1 +``` + +See this [detailed explanation about PRNG in +JavaScript](http://baagoe.org/en/w/index.php/Better_random_numbers_for_javascript) +to understand the issues with the native `Math.random` and also for a list of +algorithms that could be used instead. + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md new file mode 100644 index 00000000..2b282315 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md @@ -0,0 +1,594 @@ +# string # + +String utilities. + + +## camelCase(str):String + +Convert string to "camelCase" text. + +See: [`pascalCase()`](#pascalCase), [`unCamelCase()`](#unCamelCase) + +### Example + +```js +camelCase('lorem-ipsum-dolor'); // "loremIpsumDolor" +camelCase('lorem ipsum dolor'); // "loremIpsumDolor" +``` + + + +## contains(str, substring, [fromIndex]):Boolean + +Checks if string contains the given substring. + +See: [`startsWith()`](#startsWith), [`endsWith()`](#endsWith) + +### Example + +```js +contains('lorem', 'or'); // true +contains('lorem', 'bar'); // false +``` + + + +## crop(str, maxChars, [append]):String + +Truncate string at full words. Alias to `truncate(str, maxChars, append, true);`. + +See: [`truncate()`](#truncate) + +### Example + +```js +crop('lorem ipsum dolor', 10); // "lorem..." +crop('lorem ipsum dolor', 10, '+'); // "lorem+" +``` + + + +## endsWith(str, suffix):Boolean + +Checks if string ends with specified suffix. + +See: [`startsWith()`](#startsWith), [`contains()`](#contains) + +### Example + +```js +endsWith('lorem ipsum', 'lorem'); // false +endsWith('lorem ipsum', 'ipsum'); // true +``` + + + +## escapeHtml(str):String + +Escapes HTML special chars (`>`, `<`, `&`, `"`, `'`). + +See: [`unescapeHtml()`](#unescapeHtml) + +### Example + +```js +escapeHtml('lorem & "ipsum"'); // "lorem &amp; &quot;ipsum&quot;" +``` + + + +## escapeRegExp(str):String + +Escape special chars to be used as literals in RegExp constructors. + +### Example + +```js +str = escapeRegExp('[lorem.ipsum]'); // "\\[lorem\\.ipsum\\]" +reg = new RegExp(str); // /\[lorem\.ipsum\]/ +``` + + + +## escapeUnicode(str[, shouldEscapePrintable]):String + +Unicode escape chars. + +It will only escape non-printable ASCII chars unless `shouldEscapePrintable` is +set to `true`. + +See: [`unescapeUnicode()`](#unescapeUnicode) + +```js +escapeUnicode('føo bår'); +// > "f\u00f8o b\u00e5r" +escapeUnicode('føo bår', true); +// > "\u0066\u00f8\u006f\u0020\u0062\u00e5\u0072" +``` + + + +## hyphenate(str):String + +Replaces spaces with hyphens, split camelCase text, remove non-word chars, +remove accents and convert to lower case. + +See: [`slugify()`](#slugify), [`underscore()`](#underscore), +[`unhyphenate`](#unhyphenate) + +```js +hyphenate(' %# lorem ipsum ? $ dolor'); // "lorem-ipsum-dolor" +hyphenate('spéçïãl çhârs'); // "special-chars" +hyphenate('loremIpsum'); // "lorem-ipsum" +``` + + + +## interpolate(str, replacements[, syntax]):String + +String interpolation. Format/replace tokens with object properties. + +```js +var tmpl = 'Hello {{name}}!'; +interpolate(tmpl, {name: 'World'}); // "Hello World!" +interpolate(tmpl, {name: 'Lorem Ipsum'}); // "Hello Lorem Ipsum!" +``` + +It uses a mustache-like syntax by default but you can set your own format if +needed. You can also use Arrays for the replacements (since Arrays are +objects as well): + +```js +// matches everything inside "${}" +var syntax = /\$\{([^}]+)\}/g; +var tmpl = "Hello ${0}!"; +interpolate(tmpl, ['Foo Bar'], syntax); // "Hello Foo Bar!" +``` + + + +## lowerCase(str):String + +"Safer" `String.toLowerCase()`. (Used internally) + +### Example + +```js +(null).toLowerCase(); // Error! +(undefined).toLowerCase(); // Error! +lowerCase(null); // "" +lowerCase(undefined); // "" +``` + + + +## lpad(str, minLength[, char]):String + +Pad string from left with `char` if its' length is smaller than `minLen`. + +See: [`rpad()`](#rpad) + +### Example + +```js +lpad('a', 5); // " a" +lpad('a', 5, '-'); // "----a" +lpad('abc', 3, '-'); // "abc" +lpad('abc', 4, '-'); // "-abc" +``` + + + +## ltrim(str, [chars]):String + +Remove chars or white-spaces from beginning of string. + +`chars` is an array of chars to remove from the beginning of the string. If +`chars` is not specified, Unicode whitespace chars will be used instead. + +See: [`rtrim()`](#rtrim), [`trim()`](#trim) + +### Example + +```js +ltrim(' lorem ipsum '); // "lorem ipsum " +ltrim('--lorem ipsum--', ['-']); // "lorem ipsum--" +``` + + + +## makePath(...args):String + +Group arguments as path segments, if any of the args is `null` or `undefined` +it will be ignored from resulting path. It will also remove duplicate "/". + +See: [`array/join()`](array.html#join) + +### Example + +```js +makePath('lorem', 'ipsum', null, 'dolor'); // "lorem/ipsum/dolor" +makePath('foo///bar/'); // "foo/bar/" +``` + + + +## normalizeLineBreaks(str, [lineBreak]):String + +Normalize line breaks to a single format. Defaults to Unix `\n`. + +It handles DOS (`\r\n`), Mac (`\r`) and Unix (`\n`) formats. + +### Example + +```js +// "foo\nbar\nlorem\nipsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum'); + +// "foo\rbar\rlorem\ripsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', '\r'); + +// "foo bar lorem ipsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', ' '); +``` + + + +## pascalCase(str):String + +Convert string to "PascalCase" text. + +See: [`camelCase()`](#camelCase) + +### Example + +```js +pascalCase('lorem-ipsum-dolor'); // "LoremIpsumDolor" +pascalCase('lorem ipsum dolor'); // "LoremIpsumDolor" +``` + + + +## properCase(str):String + +UPPERCASE first char of each word, lowercase other chars. + +### Example + +```js +properCase('loRem iPSum'); // "Lorem Ipsum" +``` + + + +## removeNonASCII(str):String + +Remove [non-printable ASCII +chars](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). + +### Example + +```js +removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'); // "lorem-ipsum" +``` + + + +## removeNonWord(str):String + +Remove non-word chars. + +### Example + +```js +var str = 'lorem ~!@#$%^&*()_+`-={}[]|\\:";\'/?><., ipsum'; +removeNonWord(str); // "lorem - ipsum" +``` + + + +## repeat(str, n):String + +Repeat string n-times. + +### Example + +```js +repeat('a', 3); // "aaa" +repeat('bc', 2); // "bcbc" +repeat('a', 0); // "" +``` + + + +## replace(str, search, replacements):String + +Replace string(s) with the replacement(s) in the source. + +`search` and `replacements` can be an array, or a single item. For every item +in `search`, it will call `str.replace` with the search item and the matching +replacement in `replacements`. If `replacements` only contains one replacement, +it will be used for all the searches, otherwise it will use the replacement at +the same index as the search. + +### Example + +```js +replace('foo bar', 'foo', 'test'); // "test bar" +replace('test 1 2', ['1', '2'], 'n'); // "test n n" +replace('test 1 2', ['1', '2'], ['one', 'two']); // "test one two" +replace('123abc', [/\d/g, /[a-z]/g], ['0', '.']); // "000..." +``` + + + +## replaceAccents(str):String + +Replaces all accented chars with regular ones. + +**Important:** Only covers **Basic Latin** and **Latin-1** unicode chars. + +### Example + +```js +replaceAccents('spéçïãl çhârs'); // "special chars" +``` + + + +## rpad(str, minLength[, char]):String + +Pad string from right with `char` if its' length is smaller than `minLen`. + +See: [`lpad()`](#lpad) + +### Example + +```js +rpad('a', 5); // "a " +rpad('a', 5, '-'); // "a----" +rpad('abc', 3, '-'); // "abc" +rpad('abc', 4, '-'); // "abc-" +``` + + + +## rtrim(str, [chars]):String + +Remove chars or white-spaces from end of string. + +`chars` is an array of chars to remove from the end of the string. If +`chars` is not specified, Unicode whitespace chars will be used instead. + +See: [`trim()`](#trim), [`ltrim()`](#ltrim) + +### Example + +```js +rtrim(' lorem ipsum '); // " lorem ipsum" +rtrim('--lorem ipsum--', ['-']); // "--lorem ipsum" +``` + + + +## sentenceCase(str):String + +UPPERCASE first char of each sentence and lowercase other chars. + +### Example + +```js +var str = 'Lorem IpSum DoLOr. maeCeNnas Ullamcor.'; +sentenceCase(str); // "Lorem ipsum dolor. Maecennas ullamcor." +``` + + + +## stripHtmlTags(str):String + +Remove HTML/XML tags from string. + +### Example + +```js +var str = '

lorem ipsum

'; +stripHtmlTags(str); // "lorem ipsum" +``` + + + +## startsWith(str, prefix):Boolean + +Checks if string starts with specified prefix. + +See: [`endsWith()`](#endsWith), [`contains()`](#contains) + +### Example + +```js +startsWith('lorem ipsum', 'lorem'); // true +startsWith('lorem ipsum', 'ipsum'); // false +``` + + + +## slugify(str[, delimeter]):String + +Convert to lower case, remove accents, remove non-word chars and replace spaces +with the delimeter. The default delimeter is a hyphen. + +Note that this does not split camelCase text. + +See: [`hyphenate()`](#hyphenate) and [`underscore()`](#underscore) + +### Example + +```js +var str = 'loremIpsum dolor spéçïãl chârs'; +slugify(str); // "loremipsum-dolor-special-chars" +slugify(str, '_'); // "loremipsum_dolor_special_chars" +``` + + + +## trim(str, [chars]):String + +Remove chars or white-spaces from beginning and end of string. + +`chars` is an array of chars to remove from the beginning and end of the +string. If `chars` is not specified, Unicode whitespace chars will be used +instead. + +See: [`rtrim()`](#rtrim), [`ltrim()`](#ltrim) + +### Example + +```js +trim(' lorem ipsum '); // "lorem ipsum" +trim('-+-lorem ipsum-+-', ['-', '+']); // "lorem ipsum" +``` + + + +## truncate(str, maxChars, [append], [onlyFullWords]):String + +Limit number of chars. Returned string `length` will be `<= maxChars`. + +See: [`crop()`](#crop) + +### Arguments + + 1. `str` (String) : String + 2. `maxChars` (Number) : Maximum number of characters including `append.length`. + 3. `[append]` (String) : Value that should be added to the end of string. + Defaults to "...". + 4. `[onlyFullWords]` (Boolean) : If it shouldn't break words. Default is + `false`. (favor [`crop()`](#crop) since code will be clearer). + +### Example + +```js +truncate('lorem ipsum dolor', 11); // "lorem ip..." +truncate('lorem ipsum dolor', 11, '+'); // "lorem ipsu+" +truncate('lorem ipsum dolor', 11, null, true); // "lorem..." +``` + + + +## typecast(str):* + +Parses string and convert it into a native value. + +### Example + +```js +typecast('lorem ipsum'); // "lorem ipsum" +typecast('123'); // 123 +typecast('123.45'); // 123.45 +typecast('false'); // false +typecast('true'); // true +typecast('null'); // null +typecast('undefined'); // undefined +``` + + + +## unCamelCase(str, [delimiter]):String + +Add the delimiter between camelCase text and convert first char of each word to +lower case. + +The delimiter defaults to a space character. + +See: [`camelCase()`][#camelCase] + +### Example + +```js +unCamelCase('loremIpsumDolor'); // "lorem ipsum dolor" +unCamelCase('loremIpsumDolor', '-'); // "lorem-ipsum-color" +``` + + +## underscore(str):String + +Replaces spaces with underscores, split camelCase text, remove non-word chars, +remove accents and convert to lower case. + +See: [`slugify()`](#slugify), [`hyphenate()`](#hyphenate) + +```js +underscore(' %# lorem ipsum ? $ dolor'); // "lorem_ipsum_dolor" +underscore('spéçïãl çhârs'); // "special_chars" +underscore('loremIpsum'); // "lorem_ipsum" +``` + + + +## unescapeHtml(str):String + +Unescapes HTML special chars (`>`, `<`, `&`, `"`, `'`). + +See: [`escapeHtml()`](#escapeHtml) + +### Example + +```js +unescapeHtml('lorem &amp; &quot;ipsum&quot;'); // 'lorem & "ipsum"' +``` + + + +## unescapeUnicode(str):String + +Unescapes unicode char sequences. + +See: [`escapeUnicode()`](#escapeUnicode) + +```js +unescapeUnicode('\\u0066\\u00f8\\u006f\\u0020\\u0062\\u00e5\\u0072'); +// > 'føo bår' +``` + + + +## unhyphenate(str):String + +Replaces hyphens with spaces. (only hyphens between word chars) + +See : [`hyphenate()`](#hyphenate) + +### Example + +```js +unhyphenate('lorem-ipsum-dolor'); // "lorem ipsum dolor" +``` + + +## upperCase(str):String + +"Safer" `String.toUpperCase()`. (Used internally) + +### Example + +```js +(null).toUpperCase(); // Error! +(undefined).toUpperCase(); // Error! +upperCase(null); // "" +upperCase(undefined); // "" +``` + + + +## WHITE_SPACES:Array + +Constant array of all [Unicode white-space +characters](http://en.wikipedia.org/wiki/Whitespace_character). + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md new file mode 100644 index 00000000..628c2a9b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md @@ -0,0 +1,64 @@ +# time # + +Utilities for time manipulation. + + +## convert(value, sourceUnit, [destinationUnit]):Number + +Converts time between units. + +Available units: `millisecond`, `second`, `minute`, `hour`, `day`, `week`. +Abbreviations: `ms`, `s`, `m`, `h`, `d`, `w`. + +We do **not** support year and month as a time unit since their values are not +fixed. + +The default `destinationUnit` is `ms`. + +```js +convert(1, 'minute'); // 60000 +convert(2.5, 's', 'ms'); // 2500 +convert(2, 'm', 's'); // 120 +convert(500, 'ms', 's'); // 0.5 +``` + + + +## now():Number + +Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. +Uses `Date.now()` if available. + +### Example + +```js +now(); // 1335449614650 +``` + + + +## parseMs(ms):Object + +Parse timestamp (milliseconds) into an object `{milliseconds:number, +seconds:number, minutes:number, hours:number, days:number}`. + +### Example + +```js +// {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} +parseMs(2348765454); +``` + + + +## toTimeString(ms):String + +Convert timestamp (milliseconds) into a time string in the format "[H:]MM:SS". + +### Example + +```js +toTimeString(12513); // "00:12" +toTimeString(951233); // "15:51" +toTimeString(8765235); // "2:26:05" +``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function.js new file mode 100644 index 00000000..43a16ef4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function.js @@ -0,0 +1,18 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'bind' : require('./function/bind'), + 'compose' : require('./function/compose'), + 'debounce' : require('./function/debounce'), + 'func' : require('./function/func'), + 'makeIterator_' : require('./function/makeIterator_'), + 'partial' : require('./function/partial'), + 'prop' : require('./function/prop'), + 'series' : require('./function/series'), + 'throttle' : require('./function/throttle'), + 'timeout' : require('./function/timeout') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js new file mode 100644 index 00000000..71bc1257 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js @@ -0,0 +1,23 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + * @param {Function} fn Function. + * @param {object} context Execution context. + * @param {rest} args Arguments (0...n arguments). + * @return {Function} Wrapped Function. + */ + function bind(fn, context, args){ + var argsArr = slice(arguments, 2); //curried args + return function(){ + return fn.apply(context, argsArr.concat(slice(arguments))); + }; + } + + module.exports = bind; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js new file mode 100644 index 00000000..8cd5c5f3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js @@ -0,0 +1,23 @@ + + + /** + * Returns a function that composes multiple functions, passing results to + * each other. + */ + function compose() { + var fns = arguments; + return function(arg){ + // only cares about the first argument since the chain can only + // deal with a single return value anyway. It should start from + // the last fn. + var n = fns.length; + while (n--) { + arg = fns[n].call(this, arg); + } + return arg; + }; + } + + module.exports = compose; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js new file mode 100644 index 00000000..a0ed07f5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js @@ -0,0 +1,29 @@ + + + /** + * Debounce callback execution + */ + function debounce(fn, threshold, isAsap){ + var timeout, result; + function debounced(){ + var args = arguments, context = this; + function delayed(){ + if (! isAsap) { + result = fn.apply(context, args); + } + timeout = null; + } + if (timeout) { + clearTimeout(timeout); + } else if (isAsap) { + result = fn.apply(context, args); + } + timeout = setTimeout(delayed, threshold); + return result; + } + return debounced; + } + + module.exports = debounce; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js new file mode 100644 index 00000000..b81bf0a8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js @@ -0,0 +1,14 @@ + + + /** + * Returns a function that call a method on the passed object + */ + function func(name){ + return function(obj){ + return obj[name](); + }; + } + + module.exports = func; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js new file mode 100644 index 00000000..767610a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js @@ -0,0 +1,34 @@ +var prop = require('./prop'); +var deepMatches = require('../object/deepMatches'); + + /** + * Converts argument into a valid iterator. + * Used internally on most array/object/collection methods that receives a + * callback/iterator providing a shortcut syntax. + */ + function makeIterator(src, thisObj){ + switch(typeof src) { + case 'object': + // typeof null == "object" + return (src != null)? function(val, key, target){ + return deepMatches(val, src); + } : src; + case 'string': + case 'number': + return prop(src); + case 'function': + if (typeof thisObj === 'undefined') { + return src; + } else { + return function(val, i, arr){ + return src.call(thisObj, val, i, arr); + }; + } + default: + return src; + } + } + + module.exports = makeIterator; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js new file mode 100644 index 00000000..d63ff1be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js @@ -0,0 +1,19 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Creates a partially applied function. + */ + function partial(fn, var_args){ + var argsArr = slice(arguments, 1); //curried args + return function(){ + return fn.apply(this, argsArr.concat(slice(arguments))); + }; + } + + module.exports = partial; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js new file mode 100644 index 00000000..734acb7a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js @@ -0,0 +1,14 @@ + + + /** + * Returns a function that gets a property of the passed object + */ + function prop(name){ + return function(obj){ + return obj[name]; + }; + } + + module.exports = prop; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js new file mode 100644 index 00000000..25159c2c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js @@ -0,0 +1,22 @@ + + + /** + * Returns a function that will execute a list of functions in sequence + * passing the same arguments to each one. (useful for batch processing + * items during a forEach loop) + */ + function series(){ + var fns = arguments; + return function(){ + var i = 0, + n = fns.length; + while (i < n) { + fns[i].apply(this, arguments); + i += 1; + } + }; + } + + module.exports = series; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js new file mode 100644 index 00000000..619dc540 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js @@ -0,0 +1,32 @@ +var now = require('../time/now'); + + /** + */ + function throttle(fn, delay){ + var context, timeout, result, args, + cur, diff, prev = 0; + function delayed(){ + prev = now(); + timeout = null; + result = fn.apply(context, args); + } + function throttled(){ + context = this; + args = arguments; + cur = now(); + diff = delay - (cur - prev); + if (diff <= 0) { + clearTimeout(timeout); + prev = cur; + result = fn.apply(context, args); + } else if (! timeout) { + timeout = setTimeout(delayed, diff); + } + return result; + } + return throttled; + } + + module.exports = throttle; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js new file mode 100644 index 00000000..e0d21a66 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js @@ -0,0 +1,21 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Delays the call of a function within a given context. + */ + function timeout(fn, millis, context){ + + var args = slice(arguments, 3); + + return setTimeout(function() { + fn.apply(context, args); + }, millis); + } + + module.exports = timeout; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/index.js new file mode 100644 index 00000000..32a1c639 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/index.js @@ -0,0 +1,24 @@ +/**@license + * mout v0.6.0 | http://moutjs.com | MIT license + */ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'VERSION' : '0.6.0', + 'array' : require('./array'), + 'collection' : require('./collection'), + 'date' : require('./date'), + 'function' : require('./function'), + 'lang' : require('./lang'), + 'math' : require('./math'), + 'number' : require('./number'), + 'object' : require('./object'), + 'queryString' : require('./queryString'), + 'random' : require('./random'), + 'string' : require('./string'), + 'time' : require('./time') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang.js new file mode 100644 index 00000000..b9816218 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang.js @@ -0,0 +1,36 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'clone' : require('./lang/clone'), + 'createObject' : require('./lang/createObject'), + 'ctorApply' : require('./lang/ctorApply'), + 'deepClone' : require('./lang/deepClone'), + 'defaults' : require('./lang/defaults'), + 'inheritPrototype' : require('./lang/inheritPrototype'), + 'is' : require('./lang/is'), + 'isArguments' : require('./lang/isArguments'), + 'isArray' : require('./lang/isArray'), + 'isBoolean' : require('./lang/isBoolean'), + 'isDate' : require('./lang/isDate'), + 'isEmpty' : require('./lang/isEmpty'), + 'isFinite' : require('./lang/isFinite'), + 'isFunction' : require('./lang/isFunction'), + 'isInteger' : require('./lang/isInteger'), + 'isKind' : require('./lang/isKind'), + 'isNaN' : require('./lang/isNaN'), + 'isNull' : require('./lang/isNull'), + 'isNumber' : require('./lang/isNumber'), + 'isObject' : require('./lang/isObject'), + 'isPlainObject' : require('./lang/isPlainObject'), + 'isRegExp' : require('./lang/isRegExp'), + 'isString' : require('./lang/isString'), + 'isUndefined' : require('./lang/isUndefined'), + 'isnt' : require('./lang/isnt'), + 'kindOf' : require('./lang/kindOf'), + 'toArray' : require('./lang/toArray'), + 'toString' : require('./lang/toString') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js new file mode 100644 index 00000000..33c4e949 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js @@ -0,0 +1,49 @@ +var kindOf = require('./kindOf'); +var isPlainObject = require('./isPlainObject'); +var mixIn = require('../object/mixIn'); + + /** + * Clone native types. + */ + function clone(val){ + switch (kindOf(val)) { + case 'Object': + return cloneObject(val); + case 'Array': + return cloneArray(val); + case 'RegExp': + return cloneRegExp(val); + case 'Date': + return cloneDate(val); + default: + return val; + } + } + + function cloneObject(source) { + if (isPlainObject(source)) { + return mixIn({}, source); + } else { + return source; + } + } + + function cloneRegExp(r) { + var flags = ''; + flags += r.multiline ? 'm' : ''; + flags += r.global ? 'g' : ''; + flags += r.ignorecase ? 'i' : ''; + return new RegExp(r.source, flags); + } + + function cloneDate(date) { + return new Date(+date); + } + + function cloneArray(arr) { + return arr.slice(); + } + + module.exports = clone; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js new file mode 100644 index 00000000..bbc14c1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js @@ -0,0 +1,18 @@ +var mixIn = require('../object/mixIn'); + + /** + * Create Object using prototypal inheritance and setting custom properties. + * - Mix between Douglas Crockford Prototypal Inheritance and the EcmaScript 5 `Object.create()` method. + * @param {object} parent Parent Object. + * @param {object} [props] Object properties. + * @return {object} Created object. + */ + function createObject(parent, props){ + function F(){} + F.prototype = parent; + return mixIn(new F(), props); + + } + module.exports = createObject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js new file mode 100644 index 00000000..d68dc506 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js @@ -0,0 +1,17 @@ + + + function F(){} + + /** + * Do fn.apply on a constructor. + */ + function ctorApply(ctor, args) { + F.prototype = ctor.prototype; + var instance = new F(); + ctor.apply(instance, args); + return instance; + } + + module.exports = ctorApply; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js new file mode 100644 index 00000000..25fd95f1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js @@ -0,0 +1,48 @@ +var clone = require('./clone'); +var forOwn = require('../object/forOwn'); +var kindOf = require('./kindOf'); +var isPlainObject = require('./isPlainObject'); + + /** + * Recursively clone native types. + */ + function deepClone(val, instanceClone) { + switch ( kindOf(val) ) { + case 'Object': + return cloneObject(val, instanceClone); + case 'Array': + return cloneArray(val, instanceClone); + default: + return clone(val); + } + } + + function cloneObject(source, instanceClone) { + if (isPlainObject(source)) { + var out = {}; + forOwn(source, function(val, key) { + this[key] = deepClone(val, instanceClone); + }, out); + return out; + } else if (instanceClone) { + return instanceClone(source); + } else { + return source; + } + } + + function cloneArray(arr, instanceClone) { + var out = [], + i = -1, + n = arr.length, + val; + while (++i < n) { + out[i] = deepClone(arr[i], instanceClone); + } + return out; + } + + module.exports = deepClone; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js new file mode 100644 index 00000000..1111b2ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js @@ -0,0 +1,17 @@ +var toArray = require('./toArray'); +var find = require('../array/find'); + + /** + * Return first non void argument + */ + function defaults(var_args){ + return find(toArray(arguments), nonVoid); + } + + function nonVoid(val){ + return val != null; + } + + module.exports = defaults; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js new file mode 100644 index 00000000..cd8a379e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js @@ -0,0 +1,16 @@ +var createObject = require('./createObject'); + + /** + * Inherit prototype from another Object. + * - inspired by Nicholas Zackas Solution + * @param {object} child Child object + * @param {object} parent Parent Object + */ + function inheritPrototype(child, parent){ + var p = createObject(parent.prototype); + p.constructor = child; + child.prototype = p; + } + + module.exports = inheritPrototype; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js new file mode 100644 index 00000000..4a835739 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js @@ -0,0 +1,23 @@ + + + /** + * Check if both arguments are egal. + */ + function is(x, y){ + // implementation borrowed from harmony:egal spec + if (x === y) { + // 0 === -0, but they are not identical + return x !== 0 || 1 / x === 1 / y; + } + + // NaN !== NaN, but they are identical. + // NaNs are the only non-reflexive value, i.e., if x !== x, + // then x is a NaN. + // isNaN is broken: it converts its argument to number, so + // isNaN("foo") => true + return x !== x && y !== y; + } + + module.exports = is; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js new file mode 100644 index 00000000..f7b08ba4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js @@ -0,0 +1,15 @@ +var isKind = require('./isKind'); + + /** + */ + var isArgs = isKind(arguments, 'Arguments')? + function(val){ + return isKind(val, 'Arguments'); + } : + function(val){ + // Arguments is an Object on IE7 + return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); + }; + + module.exports = isArgs; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js new file mode 100644 index 00000000..262ee400 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + var isArray = Array.isArray || function (val) { + return isKind(val, 'Array'); + }; + module.exports = isArray; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js new file mode 100644 index 00000000..86557cb9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isBoolean(val) { + return isKind(val, 'Boolean'); + } + module.exports = isBoolean; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js new file mode 100644 index 00000000..4a5130f2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isDate(val) { + return isKind(val, 'Date'); + } + module.exports = isDate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js new file mode 100644 index 00000000..0e9f77da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js @@ -0,0 +1,24 @@ +var forOwn = require('../object/forOwn'); +var isArray = require('./isArray'); + + function isEmpty(val){ + if (val == null) { + // typeof null == 'object' so we check it first + return false; + } else if ( typeof val === 'string' || isArray(val) ) { + return !val.length; + } else if ( typeof val === 'object' || typeof val === 'function' ) { + var result = true; + forOwn(val, function(){ + result = false; + return false; // break loop + }); + return result; + } else { + return false; + } + } + + module.exports = isEmpty; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js new file mode 100644 index 00000000..6d4006f9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js @@ -0,0 +1,21 @@ +var isNumber = require('./isNumber'); + + var global = this; + + /** + * Check if value is finite + */ + function isFinite(val){ + var is = false; + if (typeof val === 'string' && val !== '') { + is = global.isFinite( parseFloat(val) ); + } else if (isNumber(val)){ + // need to use isNumber because of Number constructor + is = global.isFinite( val ); + } + return is; + } + + module.exports = isFinite; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js new file mode 100644 index 00000000..216879f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isFunction(val) { + return isKind(val, 'Function'); + } + module.exports = isFunction; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js new file mode 100644 index 00000000..29f95d96 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js @@ -0,0 +1,12 @@ +var isNumber = require('./isNumber'); + + /** + * Check if value is an integer + */ + function isInteger(val){ + return isNumber(val) && (val % 1 === 0); + } + + module.exports = isInteger; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js new file mode 100644 index 00000000..02301e04 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js @@ -0,0 +1,9 @@ +var kindOf = require('./kindOf'); + /** + * Check if value is from a specific "kind". + */ + function isKind(val, kind){ + return kindOf(val) === kind; + } + module.exports = isKind; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js new file mode 100644 index 00000000..f6efeb1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js @@ -0,0 +1,15 @@ +var isNumber = require('./isNumber'); + + /** + * Check if value is NaN for realz + */ + function isNaN(val){ + // based on the fact that NaN !== NaN + // need to check if it's a number to avoid conflicts with host objects + // also need to coerce ToNumber to avoid edge case `new Number(NaN)` + return !isNumber(val) || val != +val; + } + + module.exports = isNaN; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js new file mode 100644 index 00000000..6252f9ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js @@ -0,0 +1,9 @@ + + /** + */ + function isNull(val){ + return val === null; + } + module.exports = isNull; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js new file mode 100644 index 00000000..126c1cce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isNumber(val) { + return isKind(val, 'Number'); + } + module.exports = isNumber; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js new file mode 100644 index 00000000..7350c891 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isObject(val) { + return isKind(val, 'Object'); + } + module.exports = isObject; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js new file mode 100644 index 00000000..0d2d7b65 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js @@ -0,0 +1,14 @@ + + + /** + * Checks if the value is created by the `Object` constructor. + */ + function isPlainObject(value) { + return (!!value + && typeof value === 'object' + && value.constructor === Object); + } + + module.exports = isPlainObject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js new file mode 100644 index 00000000..fc5459a9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isRegExp(val) { + return isKind(val, 'RegExp'); + } + module.exports = isRegExp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js new file mode 100644 index 00000000..f8906584 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isString(val) { + return isKind(val, 'String'); + } + module.exports = isString; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js new file mode 100644 index 00000000..fb2261df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js @@ -0,0 +1,10 @@ + + var UNDEF; + + /** + */ + function isUndef(val){ + return val === UNDEF; + } + module.exports = isUndef; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js new file mode 100644 index 00000000..9dad58ce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js @@ -0,0 +1,12 @@ +var is = require('./is'); + + /** + * Check if both values are not identical/egal + */ + function isnt(x, y){ + return !is(x, y); + } + + module.exports = isnt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js new file mode 100644 index 00000000..663464d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js @@ -0,0 +1,20 @@ + + + var _rKind = /^\[object (.*)\]$/, + _toString = Object.prototype.toString, + UNDEF; + + /** + * Gets the "kind" of value. (e.g. "String", "Number", etc) + */ + function kindOf(val) { + if (val === null) { + return 'Null'; + } else if (val === UNDEF) { + return 'Undefined'; + } else { + return _rKind.exec( _toString.call(val) )[1]; + } + } + module.exports = kindOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js new file mode 100644 index 00000000..e39b8734 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js @@ -0,0 +1,31 @@ +var kindOf = require('./kindOf'); + + var _win = this; + + /** + * Convert array-like object into array + */ + function toArray(val){ + var ret = [], + kind = kindOf(val), + n; + + if (val != null) { + if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { + //string, regexp, function have .length but user probably just want + //to wrap value into an array.. + ret[ret.length] = val; + } else { + //window returns true on isObject in IE7 and may have length + //property. `typeof NodeList` returns `function` on Safari so + //we can't use it (#58) + n = val.length; + while (n--) { + ret[n] = val[n]; + } + } + } + return ret; + } + module.exports = toArray; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js new file mode 100644 index 00000000..ae5c2b0f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js @@ -0,0 +1,13 @@ + + + /** + * Typecast a value to a String, using an empty string value for null or + * undefined. + */ + function toString(val){ + return val == null ? '' : val.toString(); + } + + module.exports = toString; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math.js new file mode 100644 index 00000000..c6ee889b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math.js @@ -0,0 +1,19 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'ceil' : require('./math/ceil'), + 'clamp' : require('./math/clamp'), + 'countSteps' : require('./math/countSteps'), + 'floor' : require('./math/floor'), + 'inRange' : require('./math/inRange'), + 'isNear' : require('./math/isNear'), + 'lerp' : require('./math/lerp'), + 'loop' : require('./math/loop'), + 'map' : require('./math/map'), + 'norm' : require('./math/norm'), + 'round' : require('./math/round') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js new file mode 100644 index 00000000..a279e158 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js @@ -0,0 +1,11 @@ + + /** + * Round value up with a custom radix. + */ + function ceil(val, step){ + step = Math.abs(step || 1); + return Math.ceil(val / step) * step; + } + + module.exports = ceil; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js new file mode 100644 index 00000000..e929a9a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js @@ -0,0 +1,9 @@ + + /** + * Clamps value inside range. + */ + function clamp(val, min, max){ + return val < min? min : (val > max? max : val); + } + module.exports = clamp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js new file mode 100644 index 00000000..60ac90c3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js @@ -0,0 +1,16 @@ + + /** + * Count number of full steps. + */ + function countSteps(val, step, overflow){ + val = Math.floor(val / step); + + if (overflow) { + return val % overflow; + } + + return val; + } + + module.exports = countSteps; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js new file mode 100644 index 00000000..9de50531 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js @@ -0,0 +1,10 @@ + + /** + * Floor value to full steps. + */ + function floor(val, step){ + step = Math.abs(step || 1); + return Math.floor(val / step) * step; + } + module.exports = floor; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js new file mode 100644 index 00000000..763218f8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js @@ -0,0 +1,11 @@ + + /** + * Checks if value is inside the range. + */ + function inRange(val, min, max, threshold){ + threshold = threshold || 0; + return (val + threshold >= min && val - threshold <= max); + } + + module.exports = inRange; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js new file mode 100644 index 00000000..45486b6d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js @@ -0,0 +1,9 @@ + + /** + * Check if value is close to target. + */ + function isNear(val, target, threshold){ + return (Math.abs(val - target) <= threshold); + } + module.exports = isNear; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js new file mode 100644 index 00000000..111e2717 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js @@ -0,0 +1,11 @@ + + /** + * Linear interpolation. + * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE + */ + function lerp(ratio, start, end){ + return start + (end - start) * ratio; + } + + module.exports = lerp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js new file mode 100644 index 00000000..35207c1a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js @@ -0,0 +1,10 @@ + + /** + * Loops value inside range. + */ + function loop(val, min, max){ + return val < min? max : (val > max? min : val); + } + + module.exports = loop; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js new file mode 100644 index 00000000..96c4b787 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js @@ -0,0 +1,11 @@ +var lerp = require('./lerp'); +var norm = require('./norm'); + /** + * Maps a number from one scale to another. + * @example map(3, 0, 4, -1, 1) -> 0.5 + */ + function map(val, min1, max1, min2, max2){ + return lerp( norm(val, min1, max1), min2, max2 ); + } + module.exports = map; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js new file mode 100644 index 00000000..54caf78a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js @@ -0,0 +1,9 @@ + + /** + * Gets normalized ratio of value inside range. + */ + function norm(val, min, max){ + return (val - min) / (max - min); + } + module.exports = norm; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js new file mode 100644 index 00000000..d108e6cd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js @@ -0,0 +1,12 @@ + + /** + * Round number to a specific radix + */ + function round(value, radix){ + radix = radix || 1; // default round 1 + return Math.round(value / radix) * radix; + } + + module.exports = round; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number.js new file mode 100644 index 00000000..0b6186cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number.js @@ -0,0 +1,21 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'MAX_INT' : require('./number/MAX_INT'), + 'MAX_UINT' : require('./number/MAX_UINT'), + 'MIN_INT' : require('./number/MIN_INT'), + 'abbreviate' : require('./number/abbreviate'), + 'currencyFormat' : require('./number/currencyFormat'), + 'enforcePrecision' : require('./number/enforcePrecision'), + 'pad' : require('./number/pad'), + 'rol' : require('./number/rol'), + 'ror' : require('./number/ror'), + 'sign' : require('./number/sign'), + 'toInt' : require('./number/toInt'), + 'toUInt' : require('./number/toUInt'), + 'toUInt31' : require('./number/toUInt31') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js new file mode 100644 index 00000000..1d6f0e48 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit signed integer value. (2^31 - 1) + */ + + module.exports = 2147483647; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js new file mode 100644 index 00000000..700da0f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit unsigned integet value (2^32 - 1) + */ + + module.exports = 4294967295; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js new file mode 100644 index 00000000..b34ab2ce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Minimum 32-bit signed integer value (-2^31). + */ + + module.exports = -2147483648; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js new file mode 100644 index 00000000..dd6716b9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js @@ -0,0 +1,35 @@ +var enforcePrecision = require('./enforcePrecision'); + + var _defaultDict = { + thousand : 'K', + million : 'M', + billion : 'B' + }; + + /** + * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) + */ + function abbreviateNumber(val, nDecimals, dict){ + nDecimals = nDecimals != null? nDecimals : 1; + dict = dict || _defaultDict; + val = enforcePrecision(val, nDecimals); + + var str, mod; + + if (val < 1000000) { + mod = enforcePrecision(val / 1000, nDecimals); + // might overflow to next scale during rounding + str = mod < 1000? mod + dict.thousand : 1 + dict.million; + } else if (val < 1000000000) { + mod = enforcePrecision(val / 1000000, nDecimals); + str = mod < 1000? mod + dict.million : 1 + dict.billion; + } else { + str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; + } + + return str; + } + + module.exports = abbreviateNumber; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js new file mode 100644 index 00000000..1cf02497 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js @@ -0,0 +1,26 @@ + + + /** + * Converts number into currency format + */ + function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { + nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; + decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; + thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; + + //can't use enforce precision since it returns a number and we are + //doing a RegExp over the string + var fixed = val.toFixed(nDecimalDigits), + //separate begin [$1], middle [$2] and decimal digits [$4] + parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); + + if(parts){ //val >= 1000 || val <= -1000 + return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); + }else{ + return fixed.replace('.', decimalSeparator); + } + } + + module.exports = currencyFormat; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js new file mode 100644 index 00000000..f73a92d7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js @@ -0,0 +1,13 @@ + + /** + * Enforce a specific amount of decimal digits and also fix floating + * point rounding issues. + * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> + * 0.61` + */ + function enforcePrecision(val, nDecimalDigits){ + var pow = Math.pow(10, nDecimalDigits); + return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); + } + module.exports = enforcePrecision; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js new file mode 100644 index 00000000..da752706 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js @@ -0,0 +1,12 @@ +var lpad = require('../string/lpad'); + + /** + * Add padding zeros if n.length < minLength. + */ + function pad(n, minLength, char){ + return lpad(''+ n, minLength, char || '0'); + } + + module.exports = pad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js new file mode 100644 index 00000000..ecd58da4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js @@ -0,0 +1,10 @@ + + /** + * Bitwise circular shift left + * http://en.wikipedia.org/wiki/Circular_shift + */ + function rol(val, shift){ + return (val << shift) | (val >> (32 - shift)); + } + module.exports = rol; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js new file mode 100644 index 00000000..2eda81da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js @@ -0,0 +1,10 @@ + + /** + * Bitwise circular shift right + * http://en.wikipedia.org/wiki/Circular_shift + */ + function ror(val, shift){ + return (val >> shift) | (val << (32 - shift)); + } + module.exports = ror; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js new file mode 100644 index 00000000..b854a4ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js @@ -0,0 +1,15 @@ + + + /** + * Get sign of the value. + */ + function sign(val) { + var num = Number(val); + if (num === 0) return num; // +0 and +0 === 0 + if (isNaN(num)) return num; // NaN + return num < 0? -1 : 1; + } + + module.exports = sign; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js new file mode 100644 index 00000000..bcefae0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js @@ -0,0 +1,15 @@ + + + /** + * "Convert" value into an 32-bit integer. + * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. + * IMPORTANT: val will wrap at 2^31 and -2^31. + * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 + */ + function toInt(val){ + return ~~val; + } + + module.exports = toInt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js new file mode 100644 index 00000000..5290b627 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js @@ -0,0 +1,13 @@ + + + /** + * "Convert" value into a 32-bit unsigned integer. + * IMPORTANT: Value will wrap at 2^32. + */ + function toUInt(val){ + return val >>> 0; + } + + module.exports = toUInt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js new file mode 100644 index 00000000..fcc5a97c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js @@ -0,0 +1,13 @@ +var MAX_INT = require('./MAX_INT'); + + /** + * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + * IMPORTANT: value wil wrap at 2^31, if negative will return 0. + */ + function toUInt31(val){ + return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); + } + + module.exports = toUInt31; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object.js new file mode 100644 index 00000000..76c06424 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object.js @@ -0,0 +1,42 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'bindAll' : require('./object/bindAll'), + 'contains' : require('./object/contains'), + 'deepEquals' : require('./object/deepEquals'), + 'deepFillIn' : require('./object/deepFillIn'), + 'deepMatches' : require('./object/deepMatches'), + 'deepMixIn' : require('./object/deepMixIn'), + 'equals' : require('./object/equals'), + 'every' : require('./object/every'), + 'fillIn' : require('./object/fillIn'), + 'filter' : require('./object/filter'), + 'find' : require('./object/find'), + 'forIn' : require('./object/forIn'), + 'forOwn' : require('./object/forOwn'), + 'functions' : require('./object/functions'), + 'get' : require('./object/get'), + 'has' : require('./object/has'), + 'hasOwn' : require('./object/hasOwn'), + 'keys' : require('./object/keys'), + 'map' : require('./object/map'), + 'matches' : require('./object/matches'), + 'max' : require('./object/max'), + 'merge' : require('./object/merge'), + 'min' : require('./object/min'), + 'mixIn' : require('./object/mixIn'), + 'namespace' : require('./object/namespace'), + 'pick' : require('./object/pick'), + 'pluck' : require('./object/pluck'), + 'reduce' : require('./object/reduce'), + 'reject' : require('./object/reject'), + 'set' : require('./object/set'), + 'size' : require('./object/size'), + 'some' : require('./object/some'), + 'unset' : require('./object/unset'), + 'values' : require('./object/values') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js new file mode 100644 index 00000000..b2f27d08 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js @@ -0,0 +1,18 @@ +var functions = require('./functions'); +var bind = require('../function/bind'); +var forEach = require('../array/forEach'); + + /** + * Binds methods of the object to be run in it's own context. + */ + function bindAll(obj, rest_methodNames){ + var keys = arguments.length > 1? + Array.prototype.slice.call(arguments, 1) : functions(obj); + forEach(keys, function(key){ + obj[key] = bind(obj[key], obj); + }); + } + + module.exports = bindAll; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js new file mode 100644 index 00000000..8076e2c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js @@ -0,0 +1,13 @@ +var some = require('./some'); + + /** + * Check if object contains value + */ + function contains(obj, needle) { + return some(obj, function(val) { + return (val === needle); + }); + } + module.exports = contains; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js new file mode 100644 index 00000000..fcde9449 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js @@ -0,0 +1,27 @@ +var isObject = require('../lang/isObject'); +var equals = require('./equals'); + + function defaultCompare(a, b) { + return a === b; + } + + /** + * Recursively checks for same properties and values. + */ + function deepEquals(a, b, callback){ + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + function compare(a, b){ + return deepEquals(a, b, callback); + } + + return equals(a, b, compare); + } + + module.exports = deepEquals; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js new file mode 100644 index 00000000..d27db44d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js @@ -0,0 +1,32 @@ +var forOwn = require('./forOwn'); +var isPlainObject = require('../lang/isPlainObject'); + + /** + * Deeply copy missing properties in the target from the defaults. + */ + function deepFillIn(target, defaults){ + var i = 0, + n = arguments.length, + obj; + + while(++i < n) { + obj = arguments[i]; + if (obj) { + forOwn(obj, function(newValue, key) { + var curValue = target[key]; + if (curValue == null) { + target[key] = newValue; + } else if (isPlainObject(curValue) + && isPlainObject(newValue)) { + deepFillIn(curValue, newValue); + } + }); + } + } + + return target; + } + + module.exports = deepFillIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js new file mode 100644 index 00000000..3366c52d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js @@ -0,0 +1,55 @@ +var forOwn = require('./forOwn'); +var isArray = require('../lang/isArray'); + + function containsMatch(array, pattern) { + var i = -1, length = array.length; + while (++i < length) { + if (deepMatches(array[i], pattern)) { + return true; + } + } + + return false; + } + + function matchArray(target, pattern) { + var i = -1, patternLength = pattern.length; + while (++i < patternLength) { + if (!containsMatch(target, pattern[i])) { + return false; + } + } + + return true; + } + + function matchObject(target, pattern) { + var result = true; + forOwn(pattern, function(val, key) { + if (!deepMatches(target[key], val)) { + // Return false to break out of forOwn early + return (result = false); + } + }); + + return result; + } + + /** + * Recursively check if the objects match. + */ + function deepMatches(target, pattern){ + if (target && typeof target === 'object') { + if (isArray(target) && isArray(pattern)) { + return matchArray(target, pattern); + } else { + return matchObject(target, pattern); + } + } else { + return target === pattern; + } + } + + module.exports = deepMatches; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js new file mode 100644 index 00000000..a97e98d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js @@ -0,0 +1,34 @@ +var forOwn = require('./forOwn'); +var isPlainObject = require('../lang/isPlainObject'); + + /** + * Mixes objects into the target object, recursively mixing existing child + * objects. + */ + function deepMixIn(target, objects) { + var i = 0, + n = arguments.length, + obj; + + while(++i < n){ + obj = arguments[i]; + if (obj) { + forOwn(obj, copyProp, target); + } + } + + return target; + } + + function copyProp(val, key) { + var existing = this[key]; + if (isPlainObject(val) && isPlainObject(existing)) { + deepMixIn(existing, val); + } else { + this[key] = val; + } + } + + module.exports = deepMixIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js new file mode 100644 index 00000000..f50cbe4e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js @@ -0,0 +1,36 @@ +var hasOwn = require('./hasOwn'); +var every = require('./every'); +var isObject = require('../lang/isObject'); + + function defaultCompare(a, b) { + return a === b; + } + + // Makes a function to compare the object values from the specified compare + // operation callback. + function makeCompare(callback) { + return function(value, key) { + return hasOwn(this, key) && callback(value, this[key]); + }; + } + + function checkProperties(value, key) { + return hasOwn(this, key); + } + + /** + * Checks if two objects have the same keys and values. + */ + function equals(a, b, callback) { + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + return (every(a, makeCompare(callback), b) && + every(b, checkProperties, a)); + } + + module.exports = equals; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js new file mode 100644 index 00000000..01106e5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js @@ -0,0 +1,23 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object every + */ + function every(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + forOwn(obj, function(val, key) { + // we consider any falsy values as "false" on purpose so shorthand + // syntax can be used to check property existence + if (!callback(val, key, obj)) { + result = false; + return false; // break + } + }); + return result; + } + + module.exports = every; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js new file mode 100644 index 00000000..80dcdf07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js @@ -0,0 +1,20 @@ +var forEach = require('../array/forEach'); +var forOwn = require('./forOwn'); + + /** + * Copy missing properties in the obj from the defaults. + */ + function fillIn(obj, var_defaults){ + forEach(Array.prototype.slice.call(arguments, 1), function(base){ + forOwn(base, function(val, key){ + if (obj[key] == null) { + obj[key] = val; + } + }); + }); + return obj; + } + + module.exports = fillIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js new file mode 100644 index 00000000..3a83a92f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js @@ -0,0 +1,20 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Creates a new object with all the properties where the callback returns + * true. + */ + function filterValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + output[key] = value; + } + }); + + return output; + } + module.exports = filterValues; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js new file mode 100644 index 00000000..d39c0706 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js @@ -0,0 +1,21 @@ +var some = require('./some'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Returns first item that matches criteria + */ + function find(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result; + some(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + result = value; + return true; //break + } + }); + return result; + } + + module.exports = find; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js new file mode 100644 index 00000000..367f08ca --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js @@ -0,0 +1,62 @@ + + + var _hasDontEnumBug, + _dontEnums; + + function checkDontEnum(){ + _dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + + _hasDontEnumBug = true; + + for (var key in {'toString': null}) { + _hasDontEnumBug = false; + } + } + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forIn(obj, fn, thisObj){ + var key, i = 0; + // no need to check if argument is a real object that way we can use + // it for arrays, functions, date, etc. + + //post-pone check till needed + if (_hasDontEnumBug == null) checkDontEnum(); + + for (key in obj) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + + if (_hasDontEnumBug) { + while (key = _dontEnums[i++]) { + // since we aren't using hasOwn check we need to make sure the + // property was overwritten + if (obj[key] !== Object.prototype[key]) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + } + } + } + + function exec(fn, obj, key, thisObj){ + return fn.call(thisObj, obj[key], key, obj); + } + + module.exports = forIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js new file mode 100644 index 00000000..5f2dfbfc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js @@ -0,0 +1,19 @@ +var hasOwn = require('./hasOwn'); +var forIn = require('./forIn'); + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forOwn(obj, fn, thisObj){ + forIn(obj, function(val, key){ + if (hasOwn(obj, key)) { + return fn.call(thisObj, obj[key], key, obj); + } + }); + } + + module.exports = forOwn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js new file mode 100644 index 00000000..f5717979 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js @@ -0,0 +1,18 @@ +var forIn = require('./forIn'); + + /** + * return a list of all enumerable properties that have function values + */ + function functions(obj){ + var keys = []; + forIn(obj, function(val, key){ + if (typeof val === 'function'){ + keys.push(key); + } + }); + return keys.sort(); + } + + module.exports = functions; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js new file mode 100644 index 00000000..6673561e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js @@ -0,0 +1,20 @@ + + + /** + * get "nested" object property + */ + function get(obj, prop){ + var parts = prop.split('.'), + last = parts.pop(); + + while (prop = parts.shift()) { + obj = obj[prop]; + if (typeof obj !== 'object') return; + } + + return obj[last]; + } + + module.exports = get; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js new file mode 100644 index 00000000..ca9f2289 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js @@ -0,0 +1,15 @@ +var get = require('./get'); + + var UNDEF; + + /** + * Check if object has nested property. + */ + function has(obj, prop){ + return get(obj, prop) !== UNDEF; + } + + module.exports = has; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js new file mode 100644 index 00000000..7e3c82ae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js @@ -0,0 +1,12 @@ + + + /** + * Safer Object.hasOwnProperty + */ + function hasOwn(obj, prop){ + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + module.exports = hasOwn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js new file mode 100644 index 00000000..dd2f4f55 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object keys + */ + var keys = Object.keys || function (obj) { + var keys = []; + forOwn(obj, function(val, key){ + keys.push(key); + }); + return keys; + }; + + module.exports = keys; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js new file mode 100644 index 00000000..dd449a78 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js @@ -0,0 +1,18 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Creates a new object where all the values are the result of calling + * `callback`. + */ + function mapValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(val, key, obj) { + output[key] = callback(val, key, obj); + }); + + return output; + } + module.exports = mapValues; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js new file mode 100644 index 00000000..6074faa2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js @@ -0,0 +1,20 @@ +var forOwn = require('./forOwn'); + + /** + * checks if a object contains all given properties/values + */ + function matches(target, props){ + // can't use "object/every" because of circular dependency + var result = true; + forOwn(props, function(val, key){ + if (target[key] !== val) { + // break loop at first difference + return (result = false); + } + }); + return result; + } + + module.exports = matches; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js new file mode 100644 index 00000000..3e8e92c7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js @@ -0,0 +1,12 @@ +var arrMax = require('../array/max'); +var values = require('./values'); + + /** + * Returns maximum value inside object. + */ + function max(obj, compareFn) { + return arrMax(values(obj), compareFn); + } + + module.exports = max; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js new file mode 100644 index 00000000..6961f608 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js @@ -0,0 +1,40 @@ +var hasOwn = require('./hasOwn'); +var deepClone = require('../lang/deepClone'); +var isObject = require('../lang/isObject'); + + /** + * Deep merge objects. + */ + function merge() { + var i = 1, + key, val, obj, target; + + // make sure we don't modify source element and it's properties + // objects are passed by reference + target = deepClone( arguments[0] ); + + while (obj = arguments[i++]) { + for (key in obj) { + if ( ! hasOwn(obj, key) ) { + continue; + } + + val = obj[key]; + + if ( isObject(val) && isObject(target[key]) ){ + // inception, deep merge objects + target[key] = merge(target[key], val); + } else { + // make sure arrays, regexp, date, objects are cloned + target[key] = deepClone(val); + } + + } + } + + return target; + } + + module.exports = merge; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js new file mode 100644 index 00000000..e1e66976 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js @@ -0,0 +1,12 @@ +var arrMin = require('../array/min'); +var values = require('./values'); + + /** + * Returns minimum value inside object. + */ + function min(obj, iterator) { + return arrMin(values(obj), iterator); + } + + module.exports = min; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js new file mode 100644 index 00000000..55ec8fd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js @@ -0,0 +1,28 @@ +var forOwn = require('./forOwn'); + + /** + * Combine properties from all the objects into first one. + * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. + * @param {object} target Target Object + * @param {...object} objects Objects to be combined (0...n objects). + * @return {object} Target Object. + */ + function mixIn(target, objects){ + var i = 0, + n = arguments.length, + obj; + while(++i < n){ + obj = arguments[i]; + if (obj != null) { + forOwn(obj, copyProp, target); + } + } + return target; + } + + function copyProp(val, key){ + this[key] = val; + } + + module.exports = mixIn; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js new file mode 100644 index 00000000..c6e79f63 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js @@ -0,0 +1,19 @@ +var forEach = require('../array/forEach'); + + /** + * Create nested object if non-existent + */ + function namespace(obj, path){ + if (!path) return obj; + forEach(path.split('.'), function(key){ + if (!obj[key]) { + obj[key] = {}; + } + obj = obj[key]; + }); + return obj; + } + + module.exports = namespace; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js new file mode 100644 index 00000000..74e56f98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js @@ -0,0 +1,18 @@ + + + /** + * Return a copy of the object, filtered to only have values for the whitelisted keys. + */ + function pick(obj, var_keys){ + var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), + out = {}, + i = 0, key; + while (key = keys[i++]) { + out[key] = obj[key]; + } + return out; + } + + module.exports = pick; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js new file mode 100644 index 00000000..e844df47 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js @@ -0,0 +1,13 @@ +var map = require('./map'); +var prop = require('../function/prop'); + + /** + * Extract a list of property values. + */ + function pluck(obj, propName){ + return map(obj, prop(propName)); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js new file mode 100644 index 00000000..6f19a3a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js @@ -0,0 +1,29 @@ +var forOwn = require('./forOwn'); +var size = require('./size'); + + /** + * Object reduce + */ + function reduce(obj, callback, memo, thisObj) { + var initial = arguments.length > 2; + + if (!size(obj) && !initial) { + throw new Error('reduce of empty object with no initial value'); + } + + forOwn(obj, function(value, key, list) { + if (!initial) { + memo = value; + initial = true; + } + else { + memo = callback.call(thisObj, memo, value, key, list); + } + }); + + return memo; + } + + module.exports = reduce; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js new file mode 100644 index 00000000..74643795 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js @@ -0,0 +1,16 @@ +var filter = require('./filter'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object reject + */ + function reject(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + return filter(obj, function(value, index, obj) { + return !callback(value, index, obj); + }, thisObj); + } + + module.exports = reject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js new file mode 100644 index 00000000..9b3cdc48 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js @@ -0,0 +1,17 @@ +var namespace = require('./namespace'); + + /** + * set "nested" object property + */ + function set(obj, prop, val){ + var parts = (/^(.+)\.(.+)$/).exec(prop); + if (parts){ + namespace(obj, parts[1])[parts[2]] = val; + } else { + obj[prop] = val; + } + } + + module.exports = set; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js new file mode 100644 index 00000000..97885953 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object size + */ + function size(obj) { + var count = 0; + forOwn(obj, function(){ + count++; + }); + return count; + } + + module.exports = size; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js new file mode 100644 index 00000000..384c6f3c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js @@ -0,0 +1,21 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object some + */ + function some(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + forOwn(obj, function(val, key) { + if (callback(val, key, obj)) { + result = true; + return false; // break + } + }); + return result; + } + + module.exports = some; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js new file mode 100644 index 00000000..343bca0a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js @@ -0,0 +1,23 @@ +var has = require('./has'); + + /** + * Unset object property. + */ + function unset(obj, prop){ + if (has(obj, prop)) { + var parts = prop.split('.'), + last = parts.pop(); + while (prop = parts.shift()) { + obj = obj[prop]; + } + return (delete obj[last]); + + } else { + // if property doesn't exist treat as deleted + return true; + } + } + + module.exports = unset; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js new file mode 100644 index 00000000..265a6938 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object values + */ + function values(obj) { + var vals = []; + forOwn(obj, function(val, key){ + vals.push(val); + }); + return vals; + } + + module.exports = values; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/package.json new file mode 100644 index 00000000..76eadf21 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/package.json @@ -0,0 +1,123 @@ +{ + "name": "mout", + "description": "Modular Utilities", + "version": "0.6.0", + "homepage": "http://moutjs.com/", + "contributors": [ + { + "name": "Adam Nowotny" + }, + { + "name": "André Cruz", + "email": "amdfcruz@gmail.com" + }, + { + "name": "Conrad Zimmerman", + "url": "http://www.conradz.com" + }, + { + "name": "Friedemann Altrock", + "email": "frodenius@gmail.com" + }, + { + "name": "Jarrod Overson", + "url": "http://jarrodoverson.com" + }, + { + "name": "Miller Medeiros", + "email": "contact@millermedeiros.com", + "url": "http://blog.millermedeiros.com" + }, + { + "name": "Zach Shipley" + } + ], + "keywords": [ + "utilities", + "functional", + "amd-utils", + "stdlib" + ], + "repository": { + "type": "git", + "url": "git://github.com/mout/mout.git" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/mit-license.php" + } + ], + "bugs": { + "url": "https://github.com/mout/mout/issues/" + }, + "main": "./index.js", + "scripts": { + "prepublish": "node build cjs .", + "pretest": "node build pkg", + "test": "node node_modules/istanbul/lib/cli test tests/runner.js --hook-run-in-context" + }, + "directories": { + "doc": "./doc" + }, + "devDependencies": { + "istanbul": "~0.1.27", + "jasmine-node": "~1.2.2", + "requirejs": "2.x", + "nodefy": "*", + "mdoc": "~0.3.2", + "handlebars": "~1.0.6", + "commander": "~1.0.5", + "rocambole": "~0.2.3" + }, + "testling": { + "preprocess": "node build testling", + "browsers": { + "ie": [ + 7, + 8, + 9, + 10 + ], + "firefox": [ + 17, + "nightly" + ], + "chrome": [ + 23, + "canary" + ], + "opera": [ + 12, + "next" + ], + "safari": [ + 5.1, + 6 + ], + "iphone": [ + 6 + ], + "ipad": [ + 6 + ] + }, + "scripts": [ + "tests/lib/jasmine/jasmine.js", + "tests/lib/jasmine/jasmine.async.js", + "tests/lib/jasmine/jasmine-tap.js", + "tests/lib/requirejs/require.js", + "tests/testling/src.js", + "tests/testling/specs.js", + "tests/runner.js" + ] + }, + "readme": "![mout](http://moutjs.com/logo.png \"Modular JavaScript Utilties\")\n\nhttp://moutjs.com/\n\n[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout)\n\nAll code is library agnostic and consist mostly of helper methods that aren't\ndirectly related with the DOM, the purpose of this library isn't to replace\nDojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common\nproblems that aren't solved by most of them. Consider it as a crossbrowser\nJavaScript standard library.\n\n\n\n## Main goals ##\n\n - increase code reuse;\n - be clear (code should be clean/readable);\n - be easy to debug;\n - be easy to maintain;\n - follow best practices;\n - follow standards when possible;\n - **don't convert JavaScript into another language!**\n - be compatible with other frameworks;\n - be modular;\n - have unit tests for all modules;\n - work on multiple environments (IE7+, modern browsers, node.js);\n\n\n\n## What shouldn't be here ##\n\n - UI components;\n - CSS selector engine;\n - Event system - pub/sub;\n - Template engine;\n - Anything that isn't generic enough to be on a standard library;\n - Anything that could be a separate library and/or isn't a modular utility...\n\n\n\n## API Documentation ##\n\nOnline documentation can be found at http://moutjs.com/ or inside the\n`doc` folder.\n\n\n\n## FAQ / Wiki / IRC ##\n\nFor more info about project structure, design decisions, tips, how to\ncontribute, build system, etc, please check the [project\nwiki](https://github.com/mout/mout/wiki).\n\nWe also have an IRC channel [#moutjs on\nirc.freenode.net](http://webchat.freenode.net/?channels=moutjs)\n\n\n\n## License ##\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n\n", + "readmeFilename": "README.md", + "_id": "mout@0.6.0", + "dist": { + "shasum": "d2f7a6e5a796040bf7b6259a41b46705f49d271d" + }, + "_from": "mout@~0.6.0", + "_resolved": "https://registry.npmjs.org/mout/-/mout-0.6.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js new file mode 100644 index 00000000..22685a7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js @@ -0,0 +1,15 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'contains' : require('./queryString/contains'), + 'decode' : require('./queryString/decode'), + 'encode' : require('./queryString/encode'), + 'getParam' : require('./queryString/getParam'), + 'getQuery' : require('./queryString/getQuery'), + 'parse' : require('./queryString/parse'), + 'setParam' : require('./queryString/setParam') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js new file mode 100644 index 00000000..da678cf4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js @@ -0,0 +1,12 @@ +var getQuery = require('./getQuery'); + + /** + * Checks if query string contains parameter. + */ + function contains(url, paramName) { + var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` + return regex.test(getQuery(url)); + } + + module.exports = contains; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js new file mode 100644 index 00000000..7e689990 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js @@ -0,0 +1,21 @@ +var typecast = require('../string/typecast'); +var isString = require('../lang/isString'); + + /** + * Decode query string into an object of keys => vals. + */ + function decode(queryStr, shouldTypecast) { + var queryArr = (queryStr || '').replace('?', '').split('&'), + n = queryArr.length, + obj = {}, + item, val; + while (n--) { + item = queryArr[n].split('='); + val = shouldTypecast === false? item[1] : typecast(item[1]); + obj[item[0]] = isString(val)? decodeURIComponent(val) : val; + } + return obj; + } + + module.exports = decode; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js new file mode 100644 index 00000000..6d2b12f8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js @@ -0,0 +1,15 @@ +var forOwn = require('../object/forOwn'); + + /** + * Encode object into a query string. + */ + function encode(obj){ + var query = []; + forOwn(obj, function(val, key){ + query.push( key +'='+ encodeURIComponent(val) ); + }); + return (query.length)? '?'+ query.join('&') : ''; + } + + module.exports = encode; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js new file mode 100644 index 00000000..f149c3ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js @@ -0,0 +1,15 @@ +var typecast = require('../string/typecast'); +var getQuery = require('./getQuery'); + + /** + * Get query parameter value. + */ + function getParam(url, param, shouldTypecast){ + var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 + result = regexp.exec( getQuery(url) ), + val = (result && result[2])? result[2] : null; + return shouldTypecast === false? val : typecast(val); + } + + module.exports = getParam; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js new file mode 100644 index 00000000..5194af2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js @@ -0,0 +1,13 @@ + + + /** + * Gets full query as string with all special chars decoded. + */ + function getQuery(url) { + url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) + var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt + return (queryString)? decodeURIComponent(queryString[0]) : ''; + } + + module.exports = getQuery; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js new file mode 100644 index 00000000..532906c0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js @@ -0,0 +1,13 @@ +var decode = require('./decode'); +var getQuery = require('./getQuery'); + + /** + * Get query string, parses and decodes it. + */ + function parse(url, shouldTypecast) { + return decode(getQuery(url), shouldTypecast); + } + + module.exports = parse; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js new file mode 100644 index 00000000..052a9ba6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js @@ -0,0 +1,28 @@ + + + /** + * Set query string parameter value + */ + function setParam(url, paramName, value){ + url = url || ''; + + var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); + var param = paramName +'='+ encodeURIComponent( value ); + + if ( re.test(url) ) { + return url.replace(re, '$1'+ param); + } else { + if (url.indexOf('?') === -1) { + url += '?'; + } + if (url.indexOf('=') !== -1) { + url += '&'; + } + return url + param; + } + + } + + module.exports = setParam; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random.js new file mode 100644 index 00000000..d9267f01 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random.js @@ -0,0 +1,16 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'choice' : require('./random/choice'), + 'guid' : require('./random/guid'), + 'rand' : require('./random/rand'), + 'randBit' : require('./random/randBit'), + 'randHex' : require('./random/randHex'), + 'randInt' : require('./random/randInt'), + 'randSign' : require('./random/randSign'), + 'random' : require('./random/random') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js new file mode 100644 index 00000000..51aa82a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js @@ -0,0 +1,15 @@ +var randInt = require('./randInt'); +var isArray = require('../lang/isArray'); + + /** + * Returns a random element from the supplied arguments + * or from the array (if single argument is an array). + */ + function choice(items) { + var target = (arguments.length === 1 && isArray(items))? items : arguments; + return target[ randInt(0, target.length - 1) ]; + } + + module.exports = choice; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js new file mode 100644 index 00000000..41f6eddc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js @@ -0,0 +1,24 @@ +var randHex = require('./randHex'); +var choice = require('./choice'); + + /** + * Returns pseudo-random guid (UUID v4) + * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random + * by default and sequences can be predicted in some cases. See the + * "random/random" documentation for more info about it and how to replace + * the default PRNG. + */ + function guid() { + return ( + randHex(8)+'-'+ + randHex(4)+'-'+ + // v4 UUID always contain "4" at this position to specify it was + // randomly generated + '4' + randHex(3) +'-'+ + // v4 UUID always contain chars [a,b,8,9] at this position + choice(8, 9, 'a', 'b') + randHex(3)+'-'+ + randHex(12) + ); + } + module.exports = guid; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js new file mode 100644 index 00000000..782dec88 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js @@ -0,0 +1,15 @@ +var random = require('./random'); +var MIN_INT = require('../number/MIN_INT'); +var MAX_INT = require('../number/MAX_INT'); + + /** + * Returns random number inside range + */ + function rand(min, max){ + min = min == null? MIN_INT : min; + max = max == null? MAX_INT : max; + return min + (max - min) * random(); + } + + module.exports = rand; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js new file mode 100644 index 00000000..bd20b4a0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js @@ -0,0 +1,11 @@ +var random = require('./random'); + + /** + * Returns random bit (0 or 1) + */ + function randomBit() { + return random() > 0.5? 1 : 0; + } + + module.exports = randomBit; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js new file mode 100644 index 00000000..d8d711c3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js @@ -0,0 +1,19 @@ +var choice = require('./choice'); + + var _chars = '0123456789abcdef'.split(''); + + /** + * Returns a random hexadecimal string + */ + function randHex(size){ + size = size && size > 0? size : 6; + var str = ''; + while (size--) { + str += choice(_chars); + } + return str; + } + + module.exports = randHex; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js new file mode 100644 index 00000000..e237d964 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js @@ -0,0 +1,18 @@ +var MIN_INT = require('../number/MIN_INT'); +var MAX_INT = require('../number/MAX_INT'); +var rand = require('./rand'); + + /** + * Gets random integer inside range or snap to min/max values. + */ + function randInt(min, max){ + min = min == null? MIN_INT : ~~min; + max = max == null? MAX_INT : ~~max; + // can't be max + 0.5 otherwise it will round up if `rand` + // returns `max` causing it to overflow range. + // -0.5 and + 0.49 are required to avoid bias caused by rounding + return Math.round( rand(min - 0.5, max + 0.499999999999) ); + } + + module.exports = randInt; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js new file mode 100644 index 00000000..5a9fed76 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js @@ -0,0 +1,11 @@ +var random = require('./random'); + + /** + * Returns random sign (-1 or 1) + */ + function randomSign() { + return random() > 0.5? 1 : -1; + } + + module.exports = randomSign; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js new file mode 100644 index 00000000..670a3cc4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js @@ -0,0 +1,18 @@ + + + /** + * Just a wrapper to Math.random. No methods inside mout/random should call + * Math.random() directly so we can inject the pseudo-random number + * generator if needed (ie. in case we need a seeded random or a better + * algorithm than the native one) + */ + function random(){ + return random.get(); + } + + // we expose the method so it can be swapped if needed + random.get = Math.random; + + module.exports = random; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js new file mode 100644 index 00000000..7bcc961b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js @@ -0,0 +1,46 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'append' : require('./array/append'), + 'collect' : require('./array/collect'), + 'combine' : require('./array/combine'), + 'compact' : require('./array/compact'), + 'contains' : require('./array/contains'), + 'difference' : require('./array/difference'), + 'every' : require('./array/every'), + 'filter' : require('./array/filter'), + 'find' : require('./array/find'), + 'findIndex' : require('./array/findIndex'), + 'flatten' : require('./array/flatten'), + 'forEach' : require('./array/forEach'), + 'indexOf' : require('./array/indexOf'), + 'insert' : require('./array/insert'), + 'intersection' : require('./array/intersection'), + 'invoke' : require('./array/invoke'), + 'join' : require('./array/join'), + 'lastIndexOf' : require('./array/lastIndexOf'), + 'map' : require('./array/map'), + 'max' : require('./array/max'), + 'min' : require('./array/min'), + 'pick' : require('./array/pick'), + 'pluck' : require('./array/pluck'), + 'range' : require('./array/range'), + 'reduce' : require('./array/reduce'), + 'reduceRight' : require('./array/reduceRight'), + 'reject' : require('./array/reject'), + 'remove' : require('./array/remove'), + 'removeAll' : require('./array/removeAll'), + 'shuffle' : require('./array/shuffle'), + 'some' : require('./array/some'), + 'sort' : require('./array/sort'), + 'split' : require('./array/split'), + 'toLookup' : require('./array/toLookup'), + 'union' : require('./array/union'), + 'unique' : require('./array/unique'), + 'xor' : require('./array/xor'), + 'zip' : require('./array/zip') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js new file mode 100644 index 00000000..549d8754 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js @@ -0,0 +1,21 @@ +define(function () { + + /** + * Appends an array to the end of another. + * The first array will be modified. + */ + function append(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var pad = arr1.length, + i = -1, + len = arr2.length; + while (++i < len) { + arr1[pad + i] = arr2[i]; + } + return arr1; + } + return append; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js new file mode 100644 index 00000000..8f60cda2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js @@ -0,0 +1,26 @@ +define(['./append', '../function/makeIterator_'], function (append, makeIterator) { + + /** + * Maps the items in the array and concatenates the result arrays. + */ + function collect(arr, callback, thisObj){ + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + var value = callback(arr[i], i, arr); + if (value != null) { + append(results, value); + } + } + + return results; + } + + return collect; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js new file mode 100644 index 00000000..22efb860 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js @@ -0,0 +1,22 @@ +define(['./indexOf'], function (indexOf) { + + /** + * Combines an array with all the items of another. + * Does not allow duplicates and is case and type sensitive. + */ + function combine(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var i = -1, len = arr2.length; + while (++i < len) { + if (indexOf(arr1, arr2[i]) === -1) { + arr1.push(arr2[i]); + } + } + + return arr1; + } + return combine; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js new file mode 100644 index 00000000..02a81098 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js @@ -0,0 +1,13 @@ +define(['./filter'], function (filter) { + + /** + * Remove all null/undefined items from array. + */ + function compact(arr) { + return filter(arr, function(val){ + return (val != null); + }); + } + + return compact; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js new file mode 100644 index 00000000..fca4f7cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js @@ -0,0 +1,10 @@ +define(['./indexOf'], function (indexOf) { + + /** + * If array contains values. + */ + function contains(arr, val) { + return indexOf(arr, val) !== -1; + } + return contains; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js new file mode 100644 index 00000000..819bda3e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js @@ -0,0 +1,19 @@ +define(['./unique', './filter', './some', './contains'], function (unique, filter, some, contains) { + + + /** + * Return a new Array with elements that aren't present in the other Arrays. + */ + function difference(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return !some(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + return difference; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js new file mode 100644 index 00000000..78ba46d3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js @@ -0,0 +1,27 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Array every + */ + function every(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (!callback(arr[i], i, arr) ) { + result = false; + break; + } + } + + return result; + } + + return every; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js new file mode 100644 index 00000000..52cf685a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js @@ -0,0 +1,26 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Array filter + */ + function filter(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + return filter; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js new file mode 100644 index 00000000..3957dcd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js @@ -0,0 +1,13 @@ +define(['./findIndex'], function (findIndex) { + + /** + * Returns first item that matches criteria + */ + function find(arr, iterator, thisObj){ + var idx = findIndex(arr, iterator, thisObj); + return idx >= 0? arr[idx] : void(0); + } + + return find; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js new file mode 100644 index 00000000..59dfeeb9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js @@ -0,0 +1,23 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Returns the index of the first item that matches criteria + */ + function findIndex(arr, iterator, thisObj){ + iterator = makeIterator(iterator, thisObj); + if (arr == null) { + return -1; + } + + var i = -1, len = arr.length; + while (++i < len) { + if (iterator(arr[i], i, arr)) { + return i; + } + } + + return -1; + } + + return findIndex; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js new file mode 100644 index 00000000..42e87f43 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js @@ -0,0 +1,42 @@ +define(['../lang/isArray', './append'], function (isArray, append) { + + /* + * Helper function to flatten to a destination array. + * Used to remove the need to create intermediate arrays while flattening. + */ + function flattenTo(arr, result, level) { + if (arr == null) { + return result; + } else if (level === 0) { + append(result, arr); + return result; + } + + var value, + i = -1, + len = arr.length; + while (++i < len) { + value = arr[i]; + if (isArray(value)) { + flattenTo(value, result, level - 1); + } else { + result.push(value); + } + } + return result; + } + + /** + * Recursively flattens an array. + * A new array containing all the elements is returned. + * If `shallow` is true, it will only flatten one level. + */ + function flatten(arr, level) { + level = level == null? -1 : level; + return flattenTo(arr, [], level); + } + + return flatten; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js new file mode 100644 index 00000000..0e045868 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Array forEach + */ + function forEach(arr, callback, thisObj) { + if (arr == null) { + return; + } + var i = -1, + len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback.call(thisObj, arr[i], i, arr) === false ) { + break; + } + } + } + + return forEach; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js new file mode 100644 index 00000000..0e75f99b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Array.indexOf + */ + function indexOf(arr, item, fromIndex) { + fromIndex = fromIndex || 0; + if (arr == null) { + return -1; + } + + var len = arr.length, + i = fromIndex < 0 ? len + fromIndex : fromIndex; + while (i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[i] === item) { + return i; + } + + i++; + } + + return -1; + } + + return indexOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js new file mode 100644 index 00000000..d8d831f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js @@ -0,0 +1,14 @@ +define(['./difference', '../lang/toArray'], function (difference, toArray) { + + /** + * Insert item into array if not already present. + */ + function insert(arr, rest_items) { + var diff = difference(toArray(arguments).slice(1), arr); + if (diff.length) { + Array.prototype.push.apply(arr, diff); + } + return arr.length; + } + return insert; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js new file mode 100644 index 00000000..64e6ee97 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js @@ -0,0 +1,20 @@ +define(['./unique', './filter', './every', './contains'], function (unique, filter, every, contains) { + + + /** + * Return a new Array with elements common to all Arrays. + * - based on underscore.js implementation + */ + function intersection(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return every(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + return intersection; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js new file mode 100644 index 00000000..a2e78b39 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js @@ -0,0 +1,23 @@ +define(['./forEach'], function (forEach) { + + /** + * Call `methodName` on each item of the array passing custom arguments if + * needed. + */ + function invoke(arr, methodName, var_args){ + if (arr == null) { + return arr; + } + + var args = Array.prototype.slice.call(arguments, 2); + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + value[methodName].apply(value, args); + } + + return arr; + } + + return invoke; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js new file mode 100644 index 00000000..2c618d29 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js @@ -0,0 +1,17 @@ +define(['./filter'], function(filter) { + + function isValidString(val) { + return (val != null && val !== ''); + } + + /** + * Joins strings with the specified separator inserted between each value. + * Null values and empty strings will be excluded. + */ + function join(items, separator) { + separator = separator || ''; + return filter(items, isValidString).join(separator); + } + + return join; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js new file mode 100644 index 00000000..931235f4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Array lastIndexOf + */ + function lastIndexOf(arr, item, fromIndex) { + if (arr == null) { + return -1; + } + + var len = arr.length; + fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; + fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; + + while (fromIndex >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[fromIndex] === item) { + return fromIndex; + } + fromIndex--; + } + + return -1; + } + + return lastIndexOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js new file mode 100644 index 00000000..1580b481 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js @@ -0,0 +1,22 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Array map + */ + function map(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null){ + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + results[i] = callback(arr[i], i, arr); + } + + return results; + } + + return map; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js new file mode 100644 index 00000000..a7326c89 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js @@ -0,0 +1,34 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Return maximum value inside array + */ + function max(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return Infinity; + } else if (arr.length && !iterator) { + return Math.max.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = -Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp > compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + return max; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js new file mode 100644 index 00000000..41644480 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js @@ -0,0 +1,34 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Return minimum value inside array + */ + function min(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return -Infinity; + } else if (arr.length && !iterator) { + return Math.min.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp < compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + return min; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js new file mode 100644 index 00000000..97d7f595 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js @@ -0,0 +1,14 @@ +define(['../random/randInt'], function (randInt) { + + /** + * Remove a random item from the Array and return it + */ + function pick(arr){ + if (arr == null || !arr.length) return; + var idx = randInt(0, arr.length - 1); + return arr.splice(idx, 1)[0]; + } + + return pick; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js new file mode 100644 index 00000000..c908856e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js @@ -0,0 +1,12 @@ +define(['./map'], function (map) { + + /** + * Extract a list of property values. + */ + function pluck(arr, propName){ + return map(arr, propName); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js new file mode 100644 index 00000000..148ebf96 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js @@ -0,0 +1,27 @@ +define(['../math/countSteps'], function (countSteps) { + + /** + * Returns an Array of numbers inside range. + */ + function range(start, stop, step) { + if (stop == null) { + stop = start; + start = 0; + } + step = step || 1; + + var result = [], + nSteps = countSteps(stop - start, step), + i = start; + + while (i <= stop) { + result.push(i); + i += step; + } + + return result; + } + + return range; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js new file mode 100644 index 00000000..88aacfd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js @@ -0,0 +1,33 @@ +define(['./forEach'], function (forEach) { + + /** + * Array reduce + */ + function reduce(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2, + result = initVal; + + if (arr == null || !arr.length) { + if (!hasInit) { + throw new Error('reduce of empty array with no initial value'); + } else { + return initVal; + } + } + + var i = -1, len = arr.length; + while (++i < len) { + if (!hasInit) { + result = arr[i]; + hasInit = true; + } else { + result = fn(result, arr[i], i, arr); + } + } + + return result; + } + + return reduce; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js new file mode 100644 index 00000000..ddae0e7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js @@ -0,0 +1,34 @@ +define(function () { + + /** + * Array reduceRight + */ + function reduceRight(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2; + + if (arr == null || !arr.length) { + if (hasInit) { + return initVal; + } else { + throw new Error('reduce of empty array with no initial value'); + } + } + + var i = arr.length, result = initVal, value; + while (--i >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + value = arr[i]; + if (!hasInit) { + result = value; + hasInit = true; + } else { + result = fn(result, value, i, arr); + } + } + return result; + } + + return reduceRight; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js new file mode 100644 index 00000000..db105dde --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js @@ -0,0 +1,25 @@ +define(['./forEach', '../function/makeIterator_'], function(forEach, makeIterator) { + + /** + * Array reject + */ + function reject(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (!callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + return reject; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js new file mode 100644 index 00000000..dec9134d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js @@ -0,0 +1,13 @@ +define(['./indexOf'], function(indexOf){ + + /** + * Remove a single item from the array. + * (it won't remove duplicates, just a single item) + */ + function remove(arr, item){ + var idx = indexOf(arr, item); + if (idx !== -1) arr.splice(idx, 1); + } + + return remove; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js new file mode 100644 index 00000000..e81022b8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js @@ -0,0 +1,15 @@ +define(['./indexOf'], function(indexOf){ + + /** + * Remove all instances of an item from array. + */ + function removeAll(arr, item){ + var idx = indexOf(arr, item); + while (idx !== -1) { + arr.splice(idx, 1); + idx = indexOf(arr, item, idx); + } + } + + return removeAll; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js new file mode 100644 index 00000000..f5a60972 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js @@ -0,0 +1,28 @@ +define(['../random/randInt', './forEach'], function (randInt, forEach) { + + /** + * Shuffle array items. + */ + function shuffle(arr) { + var results = [], + rnd; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + if (!i) { + results[0] = arr[0]; + } else { + rnd = randInt(0, i); + results[i] = results[rnd]; + results[rnd] = arr[i]; + } + } + + return results; + } + + return shuffle; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js new file mode 100644 index 00000000..e46a9781 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js @@ -0,0 +1,27 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Array some + */ + function some(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback(arr[i], i, arr) ) { + result = true; + break; + } + } + + return result; + } + + return some; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js new file mode 100644 index 00000000..4c194042 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js @@ -0,0 +1,55 @@ +define(function () { + + /** + * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) + */ + function mergeSort(arr, compareFn) { + if (arr == null) { + return []; + } else if (arr.length < 2) { + return arr; + } + + if (compareFn == null) { + compareFn = defaultCompare; + } + + var mid, left, right; + + mid = ~~(arr.length / 2); + left = mergeSort( arr.slice(0, mid), compareFn ); + right = mergeSort( arr.slice(mid, arr.length), compareFn ); + + return merge(left, right, compareFn); + } + + function defaultCompare(a, b) { + return a < b ? -1 : (a > b? 1 : 0); + } + + function merge(left, right, compareFn) { + var result = []; + + while (left.length && right.length) { + if (compareFn(left[0], right[0]) <= 0) { + // if 0 it should preserve same order (stable) + result.push(left.shift()); + } else { + result.push(right.shift()); + } + } + + if (left.length) { + result.push.apply(result, left); + } + + if (right.length) { + result.push.apply(result, right); + } + + return result; + } + + return mergeSort; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js new file mode 100644 index 00000000..a17275eb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js @@ -0,0 +1,35 @@ +define(function() { + + /** + * Split array into a fixed number of segments. + */ + function split(array, segments) { + segments = segments || 2; + var results = []; + if (array == null) { + return results; + } + + var minLength = Math.floor(array.length / segments), + remainder = array.length % segments, + i = 0, + len = array.length, + segmentIndex = 0, + segmentLength; + + while (i < len) { + segmentLength = minLength; + if (segmentIndex < remainder) { + segmentLength++; + } + + results.push(array.slice(i, i + segmentLength)); + + segmentIndex++; + i += segmentLength; + } + + return results; + } + return split; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js new file mode 100644 index 00000000..aac8fd1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js @@ -0,0 +1,28 @@ +define(['../lang/isFunction'], function (isFunction) { + + /** + * Creates an object that holds a lookup for the objects in the array. + */ + function toLookup(arr, key) { + var result = {}; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length, value; + if (isFunction(key)) { + while (++i < len) { + value = arr[i]; + result[key(value)] = value; + } + } else { + while (++i < len) { + value = arr[i]; + result[value[key]] = value; + } + } + + return result; + } + return toLookup; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js new file mode 100644 index 00000000..5f9922e5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js @@ -0,0 +1,18 @@ +define(['./unique', './append'], function (unique, append) { + + /** + * Concat multiple arrays and remove duplicates + */ + function union(arrs) { + var results = []; + var i = -1, len = arguments.length; + while (++i < len) { + append(results, arguments[i]); + } + + return unique(results); + } + + return union; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js new file mode 100644 index 00000000..c4bd23b4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js @@ -0,0 +1,16 @@ +define(['./indexOf', './filter'], function(indexOf, filter){ + + /** + * @return {array} Array of unique items + */ + function unique(arr){ + return filter(arr, isUnique); + } + + function isUnique(item, i, arr){ + return indexOf(arr, item, i+1) === -1; + } + + return unique; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js new file mode 100644 index 00000000..7df89d9c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js @@ -0,0 +1,24 @@ +define(['./unique', './filter', './contains'], function (unique, filter, contains) { + + + /** + * Exclusive OR. Returns items that are present in a single array. + * - like ptyhon's `symmetric_difference` + */ + function xor(arr1, arr2) { + arr1 = unique(arr1); + arr2 = unique(arr2); + + var a1 = filter(arr1, function(item){ + return !contains(arr2, item); + }), + a2 = filter(arr2, function(item){ + return !contains(arr1, item); + }); + + return a1.concat(a2); + } + + return xor; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js new file mode 100644 index 00000000..374cd282 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js @@ -0,0 +1,27 @@ +define(['./max', './pluck', './map'], function (max, pluck, map) { + + function getLength(arr) { + return arr == null ? 0 : arr.length; + } + + /** + * Merges together the values of each of the arrays with the values at the + * corresponding position. + */ + function zip(arr){ + var len = arr ? max(map(arguments, getLength)) : 0, + results = [], + i = -1, + item; + while (++i < len) { + results.push(map(arguments, function(item) { + return item == null ? undefined : item[i]; + })); + } + + return results; + } + + return zip; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js new file mode 100644 index 00000000..386e6da9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js @@ -0,0 +1,22 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'contains' : require('./collection/contains'), + 'every' : require('./collection/every'), + 'filter' : require('./collection/filter'), + 'find' : require('./collection/find'), + 'forEach' : require('./collection/forEach'), + 'make_' : require('./collection/make_'), + 'map' : require('./collection/map'), + 'max' : require('./collection/max'), + 'min' : require('./collection/min'), + 'pluck' : require('./collection/pluck'), + 'reduce' : require('./collection/reduce'), + 'reject' : require('./collection/reject'), + 'size' : require('./collection/size'), + 'some' : require('./collection/some') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js new file mode 100644 index 00000000..192167e8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { + + /** + */ + return make(arrContains, objContains); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js new file mode 100644 index 00000000..6317f503 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { + + /** + */ + return make(arrEvery, objEvery); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js new file mode 100644 index 00000000..4e7fadc8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js @@ -0,0 +1,22 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * filter collection values, returns array. + */ + function filter(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + var results = []; + if (!list) { + return results; + } + forEach(list, function(value, index, list) { + if (iterator(value, index, list)) { + results[results.length] = value; + } + }); + return results; + } + + return filter; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js new file mode 100644 index 00000000..681f9414 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { + + /** + * Find value that returns true on iterator check. + */ + return make(arrFind, objFind); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js new file mode 100644 index 00000000..3b39d3ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { + + /** + */ + return make(arrForEach, objForEach); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js new file mode 100644 index 00000000..312e0564 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js @@ -0,0 +1,19 @@ +define(function(){ + + /** + * internal method used to create other collection modules. + */ + function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { + return function(){ + var args = Array.prototype.slice.call(arguments); + if (args[0] == null) { + return defaultReturn; + } + // array-like is treated as array + return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); + }; + } + + return makeCollectionMethod; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js new file mode 100644 index 00000000..96e24987 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js @@ -0,0 +1,20 @@ +define(['../lang/isObject', '../object/values', '../array/map', '../function/makeIterator_'], function (isObject, values, arrMap, makeIterator) { + + /** + * Map collection values, returns Array. + */ + function map(list, callback, thisObj) { + callback = makeIterator(callback, thisObj); + // list.length to check array-like object, if not array-like + // we simply map all the object values + if( isObject(list) && list.length == null ){ + list = values(list); + } + return arrMap(list, function (val, key, list) { + return callback(val, key, list); + }); + } + + return map; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js new file mode 100644 index 00000000..de9a6da5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { + + /** + * Get maximum value inside collection + */ + return make(arrMax, objMax); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js new file mode 100644 index 00000000..f0c239a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { + + /** + * Get minimum value inside collection. + */ + return make(arrMin, objMin); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js new file mode 100644 index 00000000..ef784a7a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js @@ -0,0 +1,14 @@ +define(['./map'], function (map) { + + /** + * Extract a list of property values. + */ + function pluck(list, key) { + return map(list, function(value) { + return value[key]; + }); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js new file mode 100644 index 00000000..bd05d43d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { + + /** + */ + return make(arrReduce, objReduce); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js new file mode 100644 index 00000000..581adfdc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js @@ -0,0 +1,15 @@ +define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { + + /** + * Inverse or collection/filter + */ + function reject(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + return filter(list, function(value, index, list) { + return !iterator(value, index, list); + }, thisObj); + } + + return reject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js new file mode 100644 index 00000000..4e5ab419 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js @@ -0,0 +1,18 @@ +define(['../lang/isArray', '../object/size'], function (isArray, objSize) { + + /** + * Get collection size + */ + function size(list) { + if (!list) { + return 0; + } + if (isArray(list)) { + return list.length; + } + return objSize(list); + } + + return size; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js new file mode 100644 index 00000000..c0aebee2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { + + /** + */ + return make(arrSome, objSome); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js new file mode 100644 index 00000000..4d449150 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js @@ -0,0 +1,21 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'dayOfTheYear' : require('./date/dayOfTheYear'), + 'diff' : require('./date/diff'), + 'i18n_' : require('./date/i18n_'), + 'isLeapYear' : require('./date/isLeapYear'), + 'isSame' : require('./date/isSame'), + 'parseIso' : require('./date/parseIso'), + 'startOf' : require('./date/startOf'), + 'strftime' : require('./date/strftime'), + 'timezoneAbbr' : require('./date/timezoneAbbr'), + 'timezoneOffset' : require('./date/timezoneOffset'), + 'totalDaysInMonth' : require('./date/totalDaysInMonth'), + 'totalDaysInYear' : require('./date/totalDaysInYear'), + 'weekOfTheYear' : require('./date/weekOfTheYear') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js new file mode 100644 index 00000000..dc77ae1b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js @@ -0,0 +1,13 @@ +define(['../lang/isDate'], function (isDate) { + + /** + * return the day of the year (1..366) + */ + function dayOfTheYear(date){ + return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - + Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; + } + + return dayOfTheYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js new file mode 100644 index 00000000..667165fe --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js @@ -0,0 +1,128 @@ +define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){ + + /** + * calculate the difference between dates (range) + */ + function diff(start, end, unitName){ + // sort the dates to make it easier to process (specially year/month) + if (start > end) { + var swap = start; + start = end; + end = swap; + } + + var output; + + if (unitName === 'month') { + output = getMonthsDiff(start, end); + } else if (unitName === 'year'){ + output = getYearsDiff(start, end); + } else if (unitName != null) { + if (unitName === 'day') { + // ignore timezone difference because of daylight savings time + start = toUtc(start); + end = toUtc(end); + } + output = convert(end - start, 'ms', unitName); + } else { + output = end - start; + } + + return output; + } + + + function toUtc(d){ + // we ignore timezone differences on purpose because of daylight + // savings time, otherwise it would return fractional days/weeks even + // if a full day elapsed. eg: + // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) + // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) + // diff should be 4 days and not 4.041666666666667 + return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getHours(), d.getMinutes(), d.getSeconds(), + d.getMilliseconds()); + } + + + function getMonthsDiff(start, end){ + return getElapsedMonths(start, end) + + getElapsedYears(start, end) * 12 + + getFractionalMonth(start, end); + } + + + function getYearsDiff(start, end){ + var elapsedYears = getElapsedYears(start, end); + return elapsedYears + getFractionalYear(start, end, elapsedYears); + } + + + function getElapsedMonths(start, end){ + var monthDiff = end.getMonth() - start.getMonth(); + if (monthDiff < 0) { + monthDiff += 12; + } + // less than a full month + if (start.getDate() > end.getDate()) { + monthDiff -= 1; + } + return monthDiff; + } + + + function getElapsedYears(start, end){ + var yearDiff = end.getFullYear() - start.getFullYear(); + // less than a full year + if (start.getMonth() > end.getMonth()) { + yearDiff -= 1; + } + return yearDiff; + } + + + function getFractionalMonth(start, end){ + var fractionalDiff = 0; + var startDay = start.getDate(); + var endDay = end.getDate(); + + if (startDay !== endDay) { + var startTotalDays = totalDaysInMonth(start); + var endTotalDays = totalDaysInMonth(end); + var totalDays; + var daysElapsed; + + if (startDay > endDay) { + // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) + var baseDay = startTotalDays - startDay; + daysElapsed = endDay + baseDay; + // total days should be relative to 1st day of next month if + // startDay > endTotalDays + totalDays = (startDay > endTotalDays)? + endTotalDays + baseDay + 1 : startDay + baseDay; + } else { + // fractional is only based on endMonth eg: Jan 12 - Feb 18 + // (6 fractional days, 28 days until next full month) + daysElapsed = endDay - startDay; + totalDays = endTotalDays; + } + + fractionalDiff = daysElapsed / totalDays; + } + + return fractionalDiff; + } + + + function getFractionalYear(start, end, elapsedYears){ + var base = elapsedYears? + new Date(end.getFullYear(), start.getMonth(), start.getDate()) : + start; + var elapsedDays = diff(base, end, 'day'); + return elapsedDays / totalDaysInYear(end); + } + + + return diff; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js new file mode 100644 index 00000000..5e640c22 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js @@ -0,0 +1,61 @@ +define(function(){ + // en-US (English, United States) + return { + "am" : "AM", + "pm" : "PM", + + "x": "%m/%d/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %I:%M:%S %p %Z", + + "months" : [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + + "months_abbr" : [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + + "days" : [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + + "days_abbr" : [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ] + }; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js new file mode 100644 index 00000000..47256dd2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js @@ -0,0 +1,61 @@ +define(function(){ + // pt-BR (Brazillian Portuguese) + return { + "am" : "", + "pm" : "", + + "x": "%d/%m/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %H:%M:%S %Z", + + "months" : [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + + "months_abbr" : [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Out", + "Nov", + "Dez" + ], + + "days" : [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" + ], + + "days_abbr" : [ + "Dom", + "Seg", + "Ter", + "Qua", + "Qui", + "Sex", + "Sáb" + ] + }; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js new file mode 100644 index 00000000..c04ce885 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js @@ -0,0 +1,13 @@ +define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ + + // we also use mixIn to make sure we don't affect the original locale + var activeLocale = mixIn({}, enUS, { + // we expose a "set" method to allow overriding the global locale + set : function(localeData){ + mixIn(activeLocale, localeData); + } + }); + + return activeLocale; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js new file mode 100644 index 00000000..e400b43d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js @@ -0,0 +1,15 @@ +define(['../lang/isDate'], function (isDate) { + + /** + * checks if it's a leap year + */ + function isLeapYear(fullYear){ + if (isDate(fullYear)) { + fullYear = fullYear.getFullYear(); + } + return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); + } + + return isLeapYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js new file mode 100644 index 00000000..f30531fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js @@ -0,0 +1,16 @@ +define(['./startOf'], function (startOf) { + + /** + * Check if date is "same" with optional period + */ + function isSame(date1, date2, period){ + if (period) { + date1 = startOf(date1, period); + date2 = startOf(date2, period); + } + return Number(date1) === Number(date2); + } + + return isSame; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js new file mode 100644 index 00000000..9a2aacb0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js @@ -0,0 +1,146 @@ +define(['../array/some'], function (some) { + + var datePatterns = [ + /^([0-9]{4})$/, // YYYY + /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) + /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD + ]; + var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD + + var timePatterns = [ + /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh + /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm + /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss + ]; + + var DATE_TIME = /^(.+)T(.+)$/; + var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; + + function matchAll(str, patterns) { + var match; + var found = some(patterns, function(pattern) { + return !!(match = pattern.exec(str)); + }); + + return found ? match : null; + } + + function getDate(year, month, day) { + var date = new Date(Date.UTC(year, month, day)); + + // Explicitly set year to avoid Date.UTC making dates < 100 relative to + // 1900 + date.setUTCFullYear(year); + + var valid = + date.getUTCFullYear() === year && + date.getUTCMonth() === month && + date.getUTCDate() === day; + return valid ? +date : NaN; + } + + function parseOrdinalDate(str) { + var match = ORD_DATE.exec(str); + if (match ) { + var year = +match[1], + day = +match[2], + date = new Date(Date.UTC(year, 0, day)); + + if (date.getUTCFullYear() === year) { + return +date; + } + } + + return NaN; + } + + function parseDate(str) { + var match, year, month, day; + + var match = matchAll(str, datePatterns); + if (match === null) { + // Ordinal dates are verified differently. + return parseOrdinalDate(str); + } + + year = (match[1] === void 0) ? 0 : +match[1]; + month = (match[2] === void 0) ? 0 : +match[2] - 1; + day = (match[3] === void 0) ? 1 : +match[3]; + + return getDate(year, month, day); + } + + function getTime(hr, min, sec) { + var valid = + (hr < 24 && hr >= 0 && + min < 60 && min >= 0 && + sec < 60 && min >= 0) || + (hr === 24 && min === 0 && sec === 0); + if (!valid) { + return NaN; + } + + return ((hr * 60 + min) * 60 + sec) * 1000; + } + + function parseOffset(str) { + var match; + if (str.charAt(str.length - 1) === 'Z') { + str = str.substring(0, str.length - 1); + } else if ((match = TIME_ZONE.exec(str))) { + var match = TIME_ZONE.exec(str); + if (match) { + var hours = +match[3], + minutes = (match[4] === void 0) ? 0 : +match[4], + offset = getTime(hours, minutes, 0); + + if (match[2] === '-') { + offset *= -1; + } + + return { offset: offset, time: match[1] }; + } + } + + // No time zone specified, assume UTC + return { offset: 0, time: str }; + } + + function parseTime(str) { + var match; + var offset = parseOffset(str); + + str = offset.time; + offset = offset.offset; + if (isNaN(offset)) { + return NaN; + } + + match = matchAll(str, timePatterns); + if (match === null) { + return NaN; + } + + var hours = (match[1] === void 0) ? 0 : +match[1], + minutes = (match[2] === void 0) ? 0 : +match[2], + seconds = (match[3] === void 0) ? 0 : +match[3]; + + return getTime(hours, minutes, seconds) - offset; + } + + /** + * Parse an ISO8601 formatted date string, and return a Date object. + */ + function parseISO8601(str){ + var match = DATE_TIME.exec(str); + if (!match) { + // No time specified + return parseDate(str); + } + + return parseDate(match[1]) + parseTime(match[2]); + } + + return parseISO8601; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js new file mode 100644 index 00000000..747f114d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js @@ -0,0 +1,54 @@ +define(['../lang/clone'], function (clone) { + + /** + * get a new Date object representing start of period + */ + function startOf(date, period){ + date = clone(date); + + // intentionally removed "break" from switch since start of + // month/year/etc should also reset the following periods + switch (period) { + case 'year': + date.setMonth(0); + /* falls through */ + case 'month': + date.setDate(1); + /* falls through */ + case 'week': + case 'day': + date.setHours(0); + /* falls through */ + case 'hour': + date.setMinutes(0); + /* falls through */ + case 'minute': + date.setSeconds(0); + /* falls through */ + case 'second': + date.setMilliseconds(0); + break; + default: + throw new Error('"'+ period +'" is not a valid period'); + } + + // week is the only case that should reset the weekDay and maybe even + // overflow to previous month + if (period === 'week') { + var weekDay = date.getDay(); + var baseDate = date.getDate(); + if (weekDay) { + if (weekDay >= baseDate) { + //start of the week is on previous month + date.setDate(0); + } + date.setDate(date.getDate() - date.getDay()); + } + } + + return date; + } + + return startOf; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js new file mode 100644 index 00000000..dd782505 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js @@ -0,0 +1,113 @@ +define(['../number/pad', './i18n_', './dayOfTheYear', './timezoneOffset', './timezoneAbbr', './weekOfTheYear'], function (pad, i18n, dayOfTheYear, timezoneOffset, timezoneAbbr, weekOfTheYear) { + + var _combinations = { + 'D': '%m/%d/%y', + 'F': '%Y-%m-%d', + 'r': '%I:%M:%S %p', + 'R': '%H:%M', + 'T': '%H:%M:%S', + 'x': 'locale', + 'X': 'locale', + 'c': 'locale' + }; + + + /** + * format date based on strftime format + */ + function strftime(date, format, localeData){ + localeData = localeData || i18n; + var reToken = /%([a-z%])/gi; + + function makeIterator(fn) { + return function(match, token){ + return fn(date, token, localeData); + }; + } + + return format + .replace(reToken, makeIterator(expandCombinations)) + .replace(reToken, makeIterator(convertToken)); + } + + + function expandCombinations(date, token, l10n){ + if (token in _combinations) { + var expanded = _combinations[token]; + return expanded === 'locale'? l10n[token] : expanded; + } else { + return '%'+ token; + } + } + + + function convertToken(date, token, l10n){ + switch (token){ + case 'a': + return l10n.days_abbr[date.getDay()]; + case 'A': + return l10n.days[date.getDay()]; + case 'h': + case 'b': + return l10n.months_abbr[date.getMonth()]; + case 'B': + return l10n.months[date.getMonth()]; + case 'C': + return pad(Math.floor(date.getFullYear() / 100), 2); + case 'd': + return pad(date.getDate(), 2); + case 'e': + return pad(date.getDate(), 2, ' '); + case 'H': + return pad(date.getHours(), 2); + case 'I': + return pad(date.getHours() % 12, 2); + case 'j': + return pad(dayOfTheYear(date), 3); + case 'L': + return pad(date.getMilliseconds(), 3); + case 'm': + return pad(date.getMonth() + 1, 2); + case 'M': + return pad(date.getMinutes(), 2); + case 'n': + return '\n'; + case 'p': + return date.getHours() >= 12? l10n.pm : l10n.am; + case 'P': + return convertToken(date, 'p', l10n).toLowerCase(); + case 's': + return date.getTime() / 1000; + case 'S': + return pad(date.getSeconds(), 2); + case 't': + return '\t'; + case 'u': + var day = date.getDay(); + return day === 0? 7 : day; + case 'U': + return pad(weekOfTheYear(date), 2); + case 'w': + return date.getDay(); + case 'W': + return pad(weekOfTheYear(date, 1), 2); + case 'y': + return pad(date.getFullYear() % 100, 2); + case 'Y': + return pad(date.getFullYear(), 4); + case 'z': + return timezoneOffset(date); + case 'Z': + return timezoneAbbr(date); + case '%': + return '%'; + default: + // keep unrecognized tokens + return '%'+ token; + } + } + + + return strftime; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js new file mode 100644 index 00000000..225a6856 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js @@ -0,0 +1,17 @@ +define(['./timezoneOffset'], function(timezoneOffset) { + + /** + * Abbreviated time zone name or similar information. + */ + function timezoneAbbr(date){ + // Date.toString gives different results depending on the + // browser/system so we fallback to timezone offset + // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' + // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' + var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); + return tz? tz[1] : timezoneOffset(date); + } + + return timezoneAbbr; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js new file mode 100644 index 00000000..ca06705d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js @@ -0,0 +1,16 @@ +define(['../number/pad'], function (pad) { + + /** + * time zone as hour and minute offset from UTC (e.g. +0900) + */ + function timezoneOffset(date){ + var offset = date.getTimezoneOffset(); + var abs = Math.abs(offset); + var h = pad(Math.floor(abs / 60), 2); + var m = pad(abs % 60, 2); + return (offset > 0? '-' : '+') + h + m; + } + + return timezoneOffset; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js new file mode 100644 index 00000000..98f7e9d1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js @@ -0,0 +1,24 @@ +define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) { + + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + + /** + * returns the total amount of days in the month (considering leap years) + */ + function totalDaysInMonth(fullYear, monthIndex){ + if (isDate(fullYear)) { + var date = fullYear; + year = date.getFullYear(); + monthIndex = date.getMonth(); + } + + if (monthIndex === 1 && isLeapYear(fullYear)) { + return 29; + } else { + return DAYS_IN_MONTH[monthIndex]; + } + } + + return totalDaysInMonth; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js new file mode 100644 index 00000000..e9036b42 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js @@ -0,0 +1,13 @@ +define(['./isLeapYear'], function (isLeapYear) { + + /** + * return the amount of days in the year following the gregorian calendar + * and leap years + */ + function totalDaysInYear(fullYear){ + return isLeapYear(fullYear)? 366 : 365; + } + + return totalDaysInYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js new file mode 100644 index 00000000..8dabc458 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js @@ -0,0 +1,16 @@ +define(['./dayOfTheYear'], function (dayOfTheYear) { + + /** + * Return the week of the year based on given firstDayOfWeek + */ + function weekOfTheYear(date, firstDayOfWeek){ + firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; + var doy = dayOfTheYear(date); + var dow = (7 + date.getDay() - firstDayOfWeek) % 7; + var relativeWeekDay = 6 - firstDayOfWeek - dow; + return Math.floor((doy + relativeWeekDay) / 7); + } + + return weekOfTheYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js new file mode 100644 index 00000000..23f4fd74 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js @@ -0,0 +1,18 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'bind' : require('./function/bind'), + 'compose' : require('./function/compose'), + 'debounce' : require('./function/debounce'), + 'func' : require('./function/func'), + 'makeIterator_' : require('./function/makeIterator_'), + 'partial' : require('./function/partial'), + 'prop' : require('./function/prop'), + 'series' : require('./function/series'), + 'throttle' : require('./function/throttle'), + 'timeout' : require('./function/timeout') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js new file mode 100644 index 00000000..09e5e20a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js @@ -0,0 +1,23 @@ +define(function(){ + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + * @param {Function} fn Function. + * @param {object} context Execution context. + * @param {rest} args Arguments (0...n arguments). + * @return {Function} Wrapped Function. + */ + function bind(fn, context, args){ + var argsArr = slice(arguments, 2); //curried args + return function(){ + return fn.apply(context, argsArr.concat(slice(arguments))); + }; + } + + return bind; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js new file mode 100644 index 00000000..d8b228fa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Returns a function that composes multiple functions, passing results to + * each other. + */ + function compose() { + var fns = arguments; + return function(arg){ + // only cares about the first argument since the chain can only + // deal with a single return value anyway. It should start from + // the last fn. + var n = fns.length; + while (n--) { + arg = fns[n].call(this, arg); + } + return arg; + }; + } + + return compose; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js new file mode 100644 index 00000000..21644ecc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js @@ -0,0 +1,29 @@ +define(function () { + + /** + * Debounce callback execution + */ + function debounce(fn, threshold, isAsap){ + var timeout, result; + function debounced(){ + var args = arguments, context = this; + function delayed(){ + if (! isAsap) { + result = fn.apply(context, args); + } + timeout = null; + } + if (timeout) { + clearTimeout(timeout); + } else if (isAsap) { + result = fn.apply(context, args); + } + timeout = setTimeout(delayed, threshold); + return result; + } + return debounced; + } + + return debounce; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js new file mode 100644 index 00000000..b920e00e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Returns a function that call a method on the passed object + */ + function func(name){ + return function(obj){ + return obj[name](); + }; + } + + return func; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js new file mode 100644 index 00000000..deb6e137 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js @@ -0,0 +1,33 @@ +define(['./prop', '../object/deepMatches'], function(prop, deepMatches) { + + /** + * Converts argument into a valid iterator. + * Used internally on most array/object/collection methods that receives a + * callback/iterator providing a shortcut syntax. + */ + function makeIterator(src, thisObj){ + switch(typeof src) { + case 'object': + // typeof null == "object" + return (src != null)? function(val, key, target){ + return deepMatches(val, src); + } : src; + case 'string': + case 'number': + return prop(src); + case 'function': + if (typeof thisObj === 'undefined') { + return src; + } else { + return function(val, i, arr){ + return src.call(thisObj, val, i, arr); + }; + } + default: + return src; + } + } + + return makeIterator; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js new file mode 100644 index 00000000..ad730746 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js @@ -0,0 +1,19 @@ +define(function () { + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Creates a partially applied function. + */ + function partial(fn, var_args){ + var argsArr = slice(arguments, 1); //curried args + return function(){ + return fn.apply(this, argsArr.concat(slice(arguments))); + }; + } + + return partial; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js new file mode 100644 index 00000000..c9df78ca --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Returns a function that gets a property of the passed object + */ + function prop(name){ + return function(obj){ + return obj[name]; + }; + } + + return prop; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js new file mode 100644 index 00000000..c8856a27 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js @@ -0,0 +1,22 @@ +define(function () { + + /** + * Returns a function that will execute a list of functions in sequence + * passing the same arguments to each one. (useful for batch processing + * items during a forEach loop) + */ + function series(){ + var fns = arguments; + return function(){ + var i = 0, + n = fns.length; + while (i < n) { + fns[i].apply(this, arguments); + i += 1; + } + }; + } + + return series; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js new file mode 100644 index 00000000..8ce3929a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js @@ -0,0 +1,32 @@ +define(['../time/now'], function (now) { + + /** + */ + function throttle(fn, delay){ + var context, timeout, result, args, + cur, diff, prev = 0; + function delayed(){ + prev = now(); + timeout = null; + result = fn.apply(context, args); + } + function throttled(){ + context = this; + args = arguments; + cur = now(); + diff = delay - (cur - prev); + if (diff <= 0) { + clearTimeout(timeout); + prev = cur; + result = fn.apply(context, args); + } else if (! timeout) { + timeout = setTimeout(delayed, diff); + } + return result; + } + return throttled; + } + + return throttle; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js new file mode 100644 index 00000000..15388bdd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js @@ -0,0 +1,21 @@ +define(function () { + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Delays the call of a function within a given context. + */ + function timeout(fn, millis, context){ + + var args = slice(arguments, 3); + + return setTimeout(function() { + fn.apply(context, args); + }, millis); + } + + return timeout; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js new file mode 100644 index 00000000..744bb119 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js @@ -0,0 +1,24 @@ +/**@license + * mout v0.6.0 | http://moutjs.com | MIT license + */ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'VERSION' : '0.6.0', + 'array' : require('./array'), + 'collection' : require('./collection'), + 'date' : require('./date'), + 'function' : require('./function'), + 'lang' : require('./lang'), + 'math' : require('./math'), + 'number' : require('./number'), + 'object' : require('./object'), + 'queryString' : require('./queryString'), + 'random' : require('./random'), + 'string' : require('./string'), + 'time' : require('./time') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js new file mode 100644 index 00000000..de16b597 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js @@ -0,0 +1,36 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'clone' : require('./lang/clone'), + 'createObject' : require('./lang/createObject'), + 'ctorApply' : require('./lang/ctorApply'), + 'deepClone' : require('./lang/deepClone'), + 'defaults' : require('./lang/defaults'), + 'inheritPrototype' : require('./lang/inheritPrototype'), + 'is' : require('./lang/is'), + 'isArguments' : require('./lang/isArguments'), + 'isArray' : require('./lang/isArray'), + 'isBoolean' : require('./lang/isBoolean'), + 'isDate' : require('./lang/isDate'), + 'isEmpty' : require('./lang/isEmpty'), + 'isFinite' : require('./lang/isFinite'), + 'isFunction' : require('./lang/isFunction'), + 'isInteger' : require('./lang/isInteger'), + 'isKind' : require('./lang/isKind'), + 'isNaN' : require('./lang/isNaN'), + 'isNull' : require('./lang/isNull'), + 'isNumber' : require('./lang/isNumber'), + 'isObject' : require('./lang/isObject'), + 'isPlainObject' : require('./lang/isPlainObject'), + 'isRegExp' : require('./lang/isRegExp'), + 'isString' : require('./lang/isString'), + 'isUndefined' : require('./lang/isUndefined'), + 'isnt' : require('./lang/isnt'), + 'kindOf' : require('./lang/kindOf'), + 'toArray' : require('./lang/toArray'), + 'toString' : require('./lang/toString') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js new file mode 100644 index 00000000..468489a1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js @@ -0,0 +1,47 @@ +define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { + + /** + * Clone native types. + */ + function clone(val){ + switch (kindOf(val)) { + case 'Object': + return cloneObject(val); + case 'Array': + return cloneArray(val); + case 'RegExp': + return cloneRegExp(val); + case 'Date': + return cloneDate(val); + default: + return val; + } + } + + function cloneObject(source) { + if (isPlainObject(source)) { + return mixIn({}, source); + } else { + return source; + } + } + + function cloneRegExp(r) { + var flags = ''; + flags += r.multiline ? 'm' : ''; + flags += r.global ? 'g' : ''; + flags += r.ignorecase ? 'i' : ''; + return new RegExp(r.source, flags); + } + + function cloneDate(date) { + return new Date(+date); + } + + function cloneArray(arr) { + return arr.slice(); + } + + return clone; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js new file mode 100644 index 00000000..f7661500 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js @@ -0,0 +1,18 @@ +define(['../object/mixIn'], function(mixIn){ + + /** + * Create Object using prototypal inheritance and setting custom properties. + * - Mix between Douglas Crockford Prototypal Inheritance and the EcmaScript 5 `Object.create()` method. + * @param {object} parent Parent Object. + * @param {object} [props] Object properties. + * @return {object} Created object. + */ + function createObject(parent, props){ + function F(){} + F.prototype = parent; + return mixIn(new F(), props); + + } + return createObject; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js new file mode 100644 index 00000000..a9ac1c54 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js @@ -0,0 +1,17 @@ +define(function () { + + function F(){} + + /** + * Do fn.apply on a constructor. + */ + function ctorApply(ctor, args) { + F.prototype = ctor.prototype; + var instance = new F(); + ctor.apply(instance, args); + return instance; + } + + return ctorApply; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js new file mode 100644 index 00000000..d45c10aa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js @@ -0,0 +1,45 @@ +define(['./clone', '../object/forOwn', './kindOf', './isPlainObject'], function (clone, forOwn, kindOf, isPlainObject) { + + /** + * Recursively clone native types. + */ + function deepClone(val, instanceClone) { + switch ( kindOf(val) ) { + case 'Object': + return cloneObject(val, instanceClone); + case 'Array': + return cloneArray(val, instanceClone); + default: + return clone(val); + } + } + + function cloneObject(source, instanceClone) { + if (isPlainObject(source)) { + var out = {}; + forOwn(source, function(val, key) { + this[key] = deepClone(val, instanceClone); + }, out); + return out; + } else if (instanceClone) { + return instanceClone(source); + } else { + return source; + } + } + + function cloneArray(arr, instanceClone) { + var out = [], + i = -1, + n = arr.length, + val; + while (++i < n) { + out[i] = deepClone(arr[i], instanceClone); + } + return out; + } + + return deepClone; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js new file mode 100644 index 00000000..5156b1bb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js @@ -0,0 +1,16 @@ +define(['./toArray', '../array/find'], function (toArray, find) { + + /** + * Return first non void argument + */ + function defaults(var_args){ + return find(toArray(arguments), nonVoid); + } + + function nonVoid(val){ + return val != null; + } + + return defaults; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js new file mode 100644 index 00000000..c1fda3a7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js @@ -0,0 +1,16 @@ +define(['./createObject'], function(createObject){ + + /** + * Inherit prototype from another Object. + * - inspired by Nicholas Zackas Solution + * @param {object} child Child object + * @param {object} parent Parent Object + */ + function inheritPrototype(child, parent){ + var p = createObject(parent.prototype); + p.constructor = child; + child.prototype = p; + } + + return inheritPrototype; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js new file mode 100644 index 00000000..261a2077 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Check if both arguments are egal. + */ + function is(x, y){ + // implementation borrowed from harmony:egal spec + if (x === y) { + // 0 === -0, but they are not identical + return x !== 0 || 1 / x === 1 / y; + } + + // NaN !== NaN, but they are identical. + // NaNs are the only non-reflexive value, i.e., if x !== x, + // then x is a NaN. + // isNaN is broken: it converts its argument to number, so + // isNaN("foo") => true + return x !== x && y !== y; + } + + return is; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js new file mode 100644 index 00000000..f889ee8e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js @@ -0,0 +1,15 @@ +define(['./isKind'], function (isKind) { + + /** + */ + var isArgs = isKind(arguments, 'Arguments')? + function(val){ + return isKind(val, 'Arguments'); + } : + function(val){ + // Arguments is an Object on IE7 + return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); + }; + + return isArgs; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js new file mode 100644 index 00000000..886e2aa5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + var isArray = Array.isArray || function (val) { + return isKind(val, 'Array'); + }; + return isArray; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js new file mode 100644 index 00000000..1ca27a69 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isBoolean(val) { + return isKind(val, 'Boolean'); + } + return isBoolean; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js new file mode 100644 index 00000000..2708d676 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isDate(val) { + return isKind(val, 'Date'); + } + return isDate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js new file mode 100644 index 00000000..4cc3d2db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js @@ -0,0 +1,23 @@ +define(['../object/forOwn', './isArray'], function (forOwn, isArray) { + + function isEmpty(val){ + if (val == null) { + // typeof null == 'object' so we check it first + return false; + } else if ( typeof val === 'string' || isArray(val) ) { + return !val.length; + } else if ( typeof val === 'object' || typeof val === 'function' ) { + var result = true; + forOwn(val, function(){ + result = false; + return false; // break loop + }); + return result; + } else { + return false; + } + } + + return isEmpty; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js new file mode 100644 index 00000000..5a982f4b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js @@ -0,0 +1,21 @@ +define(['./isNumber'], function (isNumber) { + + var global = this; + + /** + * Check if value is finite + */ + function isFinite(val){ + var is = false; + if (typeof val === 'string' && val !== '') { + is = global.isFinite( parseFloat(val) ); + } else if (isNumber(val)){ + // need to use isNumber because of Number constructor + is = global.isFinite( val ); + } + return is; + } + + return isFinite; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js new file mode 100644 index 00000000..ff5df7f0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isFunction(val) { + return isKind(val, 'Function'); + } + return isFunction; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js new file mode 100644 index 00000000..1931f516 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js @@ -0,0 +1,12 @@ +define(['./isNumber'], function (isNumber) { + + /** + * Check if value is an integer + */ + function isInteger(val){ + return isNumber(val) && (val % 1 === 0); + } + + return isInteger; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js new file mode 100644 index 00000000..6937a12f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js @@ -0,0 +1,9 @@ +define(['./kindOf'], function (kindOf) { + /** + * Check if value is from a specific "kind". + */ + function isKind(val, kind){ + return kindOf(val) === kind; + } + return isKind; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js new file mode 100644 index 00000000..9467a3c8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js @@ -0,0 +1,15 @@ +define(['./isNumber'], function (isNumber) { + + /** + * Check if value is NaN for realz + */ + function isNaN(val){ + // based on the fact that NaN !== NaN + // need to check if it's a number to avoid conflicts with host objects + // also need to coerce ToNumber to avoid edge case `new Number(NaN)` + return !isNumber(val) || val != +val; + } + + return isNaN; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js new file mode 100644 index 00000000..506e05ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js @@ -0,0 +1,9 @@ +define(function () { + /** + */ + function isNull(val){ + return val === null; + } + return isNull; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js new file mode 100644 index 00000000..9a832c5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isNumber(val) { + return isKind(val, 'Number'); + } + return isNumber; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js new file mode 100644 index 00000000..0befb063 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isObject(val) { + return isKind(val, 'Object'); + } + return isObject; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js new file mode 100644 index 00000000..6c5854fd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Checks if the value is created by the `Object` constructor. + */ + function isPlainObject(value) { + return (!!value + && typeof value === 'object' + && value.constructor === Object); + } + + return isPlainObject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js new file mode 100644 index 00000000..d78a03da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isRegExp(val) { + return isKind(val, 'RegExp'); + } + return isRegExp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js new file mode 100644 index 00000000..8a42fe01 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isString(val) { + return isKind(val, 'String'); + } + return isString; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js new file mode 100644 index 00000000..c57b28eb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js @@ -0,0 +1,10 @@ +define(function () { + var UNDEF; + + /** + */ + function isUndef(val){ + return val === UNDEF; + } + return isUndef; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js new file mode 100644 index 00000000..d4336222 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js @@ -0,0 +1,12 @@ +define(['./is'], function (is) { + + /** + * Check if both values are not identical/egal + */ + function isnt(x, y){ + return !is(x, y); + } + + return isnt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js new file mode 100644 index 00000000..97d21d15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js @@ -0,0 +1,20 @@ +define(function () { + + var _rKind = /^\[object (.*)\]$/, + _toString = Object.prototype.toString, + UNDEF; + + /** + * Gets the "kind" of value. (e.g. "String", "Number", etc) + */ + function kindOf(val) { + if (val === null) { + return 'Null'; + } else if (val === UNDEF) { + return 'Undefined'; + } else { + return _rKind.exec( _toString.call(val) )[1]; + } + } + return kindOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js new file mode 100644 index 00000000..552916f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js @@ -0,0 +1,31 @@ +define(['./kindOf'], function (kindOf) { + + var _win = this; + + /** + * Convert array-like object into array + */ + function toArray(val){ + var ret = [], + kind = kindOf(val), + n; + + if (val != null) { + if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { + //string, regexp, function have .length but user probably just want + //to wrap value into an array.. + ret[ret.length] = val; + } else { + //window returns true on isObject in IE7 and may have length + //property. `typeof NodeList` returns `function` on Safari so + //we can't use it (#58) + n = val.length; + while (n--) { + ret[n] = val[n]; + } + } + } + return ret; + } + return toArray; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js new file mode 100644 index 00000000..c28b89af --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * Typecast a value to a String, using an empty string value for null or + * undefined. + */ + function toString(val){ + return val == null ? '' : val.toString(); + } + + return toString; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js new file mode 100644 index 00000000..e2ba8705 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js @@ -0,0 +1,19 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'ceil' : require('./math/ceil'), + 'clamp' : require('./math/clamp'), + 'countSteps' : require('./math/countSteps'), + 'floor' : require('./math/floor'), + 'inRange' : require('./math/inRange'), + 'isNear' : require('./math/isNear'), + 'lerp' : require('./math/lerp'), + 'loop' : require('./math/loop'), + 'map' : require('./math/map'), + 'norm' : require('./math/norm'), + 'round' : require('./math/round') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js new file mode 100644 index 00000000..d73b0581 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Round value up with a custom radix. + */ + function ceil(val, step){ + step = Math.abs(step || 1); + return Math.ceil(val / step) * step; + } + + return ceil; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js new file mode 100644 index 00000000..fb5a1484 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Clamps value inside range. + */ + function clamp(val, min, max){ + return val < min? min : (val > max? max : val); + } + return clamp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js new file mode 100644 index 00000000..0ecb32f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js @@ -0,0 +1,16 @@ +define(function(){ + /** + * Count number of full steps. + */ + function countSteps(val, step, overflow){ + val = Math.floor(val / step); + + if (overflow) { + return val % overflow; + } + + return val; + } + + return countSteps; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js new file mode 100644 index 00000000..8a4456b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Floor value to full steps. + */ + function floor(val, step){ + step = Math.abs(step || 1); + return Math.floor(val / step) * step; + } + return floor; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js new file mode 100644 index 00000000..0c890536 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Checks if value is inside the range. + */ + function inRange(val, min, max, threshold){ + threshold = threshold || 0; + return (val + threshold >= min && val - threshold <= max); + } + + return inRange; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js new file mode 100644 index 00000000..b308a0b0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Check if value is close to target. + */ + function isNear(val, target, threshold){ + return (Math.abs(val - target) <= threshold); + } + return isNear; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js new file mode 100644 index 00000000..26b99d04 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Linear interpolation. + * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE + */ + function lerp(ratio, start, end){ + return start + (end - start) * ratio; + } + + return lerp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js new file mode 100644 index 00000000..c735ecf6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Loops value inside range. + */ + function loop(val, min, max){ + return val < min? max : (val > max? min : val); + } + + return loop; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js new file mode 100644 index 00000000..bf7dc5d5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js @@ -0,0 +1,10 @@ +define(['./lerp', './norm'], function(lerp, norm){ + /** + * Maps a number from one scale to another. + * @example map(3, 0, 4, -1, 1) -> 0.5 + */ + function map(val, min1, max1, min2, max2){ + return lerp( norm(val, min1, max1), min2, max2 ); + } + return map; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js new file mode 100644 index 00000000..fccae20e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Gets normalized ratio of value inside range. + */ + function norm(val, min, max){ + return (val - min) / (max - min); + } + return norm; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js new file mode 100644 index 00000000..b43e4ac2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js @@ -0,0 +1,12 @@ +define(function () { + /** + * Round number to a specific radix + */ + function round(value, radix){ + radix = radix || 1; // default round 1 + return Math.round(value / radix) * radix; + } + + return round; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js new file mode 100644 index 00000000..cb52fc75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js @@ -0,0 +1,21 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'MAX_INT' : require('./number/MAX_INT'), + 'MAX_UINT' : require('./number/MAX_UINT'), + 'MIN_INT' : require('./number/MIN_INT'), + 'abbreviate' : require('./number/abbreviate'), + 'currencyFormat' : require('./number/currencyFormat'), + 'enforcePrecision' : require('./number/enforcePrecision'), + 'pad' : require('./number/pad'), + 'rol' : require('./number/rol'), + 'ror' : require('./number/ror'), + 'sign' : require('./number/sign'), + 'toInt' : require('./number/toInt'), + 'toUInt' : require('./number/toUInt'), + 'toUInt31' : require('./number/toUInt31') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js new file mode 100644 index 00000000..23a6e1a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit signed integer value. (2^31 - 1) + */ +define(function(){ + return 2147483647; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js new file mode 100644 index 00000000..a035096c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit unsigned integet value (2^32 - 1) + */ +define(function(){ + return 4294967295; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js new file mode 100644 index 00000000..9b3e9781 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Minimum 32-bit signed integer value (-2^31). + */ +define(function(){ + return -2147483648; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js new file mode 100644 index 00000000..7e7405ad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js @@ -0,0 +1,35 @@ +define(['./enforcePrecision'], function (enforcePrecision) { + + var _defaultDict = { + thousand : 'K', + million : 'M', + billion : 'B' + }; + + /** + * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) + */ + function abbreviateNumber(val, nDecimals, dict){ + nDecimals = nDecimals != null? nDecimals : 1; + dict = dict || _defaultDict; + val = enforcePrecision(val, nDecimals); + + var str, mod; + + if (val < 1000000) { + mod = enforcePrecision(val / 1000, nDecimals); + // might overflow to next scale during rounding + str = mod < 1000? mod + dict.thousand : 1 + dict.million; + } else if (val < 1000000000) { + mod = enforcePrecision(val / 1000000, nDecimals); + str = mod < 1000? mod + dict.million : 1 + dict.billion; + } else { + str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; + } + + return str; + } + + return abbreviateNumber; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js new file mode 100644 index 00000000..dcde8fc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js @@ -0,0 +1,26 @@ +define(function () { + + /** + * Converts number into currency format + */ + function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { + nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; + decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; + thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; + + //can't use enforce precision since it returns a number and we are + //doing a RegExp over the string + var fixed = val.toFixed(nDecimalDigits), + //separate begin [$1], middle [$2] and decimal digits [$4] + parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); + + if(parts){ //val >= 1000 || val <= -1000 + return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); + }else{ + return fixed.replace('.', decimalSeparator); + } + } + + return currencyFormat; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js new file mode 100644 index 00000000..84554d0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js @@ -0,0 +1,13 @@ +define(function(){ + /** + * Enforce a specific amount of decimal digits and also fix floating + * point rounding issues. + * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> + * 0.61` + */ + function enforcePrecision(val, nDecimalDigits){ + var pow = Math.pow(10, nDecimalDigits); + return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); + } + return enforcePrecision; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js new file mode 100644 index 00000000..3b2c062a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js @@ -0,0 +1,12 @@ +define(['../string/lpad'], function(lpad){ + + /** + * Add padding zeros if n.length < minLength. + */ + function pad(n, minLength, char){ + return lpad(''+ n, minLength, char || '0'); + } + + return pad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js new file mode 100644 index 00000000..a148f444 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Bitwise circular shift left + * http://en.wikipedia.org/wiki/Circular_shift + */ + function rol(val, shift){ + return (val << shift) | (val >> (32 - shift)); + } + return rol; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js new file mode 100644 index 00000000..b5c66f92 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Bitwise circular shift right + * http://en.wikipedia.org/wiki/Circular_shift + */ + function ror(val, shift){ + return (val >> shift) | (val << (32 - shift)); + } + return ror; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js new file mode 100644 index 00000000..dfc131d5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js @@ -0,0 +1,15 @@ +define(function () { + + /** + * Get sign of the value. + */ + function sign(val) { + var num = Number(val); + if (num === 0) return num; // +0 and +0 === 0 + if (isNaN(num)) return num; // NaN + return num < 0? -1 : 1; + } + + return sign; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js new file mode 100644 index 00000000..1e9b4c0b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js @@ -0,0 +1,15 @@ +define(function(){ + + /** + * "Convert" value into an 32-bit integer. + * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. + * IMPORTANT: val will wrap at 2^31 and -2^31. + * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 + */ + function toInt(val){ + return ~~val; + } + + return toInt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js new file mode 100644 index 00000000..d5b25b2c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * "Convert" value into a 32-bit unsigned integer. + * IMPORTANT: Value will wrap at 2^32. + */ + function toUInt(val){ + return val >>> 0; + } + + return toUInt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js new file mode 100644 index 00000000..9785a054 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js @@ -0,0 +1,13 @@ +define(['./MAX_INT'], function(MAX_INT){ + + /** + * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + * IMPORTANT: value wil wrap at 2^31, if negative will return 0. + */ + function toUInt31(val){ + return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); + } + + return toUInt31; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js new file mode 100644 index 00000000..343e7826 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js @@ -0,0 +1,42 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'bindAll' : require('./object/bindAll'), + 'contains' : require('./object/contains'), + 'deepEquals' : require('./object/deepEquals'), + 'deepFillIn' : require('./object/deepFillIn'), + 'deepMatches' : require('./object/deepMatches'), + 'deepMixIn' : require('./object/deepMixIn'), + 'equals' : require('./object/equals'), + 'every' : require('./object/every'), + 'fillIn' : require('./object/fillIn'), + 'filter' : require('./object/filter'), + 'find' : require('./object/find'), + 'forIn' : require('./object/forIn'), + 'forOwn' : require('./object/forOwn'), + 'functions' : require('./object/functions'), + 'get' : require('./object/get'), + 'has' : require('./object/has'), + 'hasOwn' : require('./object/hasOwn'), + 'keys' : require('./object/keys'), + 'map' : require('./object/map'), + 'matches' : require('./object/matches'), + 'max' : require('./object/max'), + 'merge' : require('./object/merge'), + 'min' : require('./object/min'), + 'mixIn' : require('./object/mixIn'), + 'namespace' : require('./object/namespace'), + 'pick' : require('./object/pick'), + 'pluck' : require('./object/pluck'), + 'reduce' : require('./object/reduce'), + 'reject' : require('./object/reject'), + 'set' : require('./object/set'), + 'size' : require('./object/size'), + 'some' : require('./object/some'), + 'unset' : require('./object/unset'), + 'values' : require('./object/values') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js new file mode 100644 index 00000000..b131ed15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js @@ -0,0 +1,16 @@ +define(['./functions', '../function/bind', '../array/forEach'], function (functions, bind, forEach) { + + /** + * Binds methods of the object to be run in it's own context. + */ + function bindAll(obj, rest_methodNames){ + var keys = arguments.length > 1? + Array.prototype.slice.call(arguments, 1) : functions(obj); + forEach(keys, function(key){ + obj[key] = bind(obj[key], obj); + }); + } + + return bindAll; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js new file mode 100644 index 00000000..297e8986 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js @@ -0,0 +1,13 @@ +define(['./some'], function (some) { + + /** + * Check if object contains value + */ + function contains(obj, needle) { + return some(obj, function(val) { + return (val === needle); + }); + } + return contains; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js new file mode 100644 index 00000000..8b7d5d15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js @@ -0,0 +1,26 @@ +define(['../lang/isObject', './equals'], function (isObject, equals) { + + function defaultCompare(a, b) { + return a === b; + } + + /** + * Recursively checks for same properties and values. + */ + function deepEquals(a, b, callback){ + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + function compare(a, b){ + return deepEquals(a, b, callback); + } + + return equals(a, b, compare); + } + + return deepEquals; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js new file mode 100644 index 00000000..84ba154a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js @@ -0,0 +1,31 @@ +define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { + + /** + * Deeply copy missing properties in the target from the defaults. + */ + function deepFillIn(target, defaults){ + var i = 0, + n = arguments.length, + obj; + + while(++i < n) { + obj = arguments[i]; + if (obj) { + forOwn(obj, function(newValue, key) { + var curValue = target[key]; + if (curValue == null) { + target[key] = newValue; + } else if (isPlainObject(curValue) + && isPlainObject(newValue)) { + deepFillIn(curValue, newValue); + } + }); + } + } + + return target; + } + + return deepFillIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js new file mode 100644 index 00000000..2eae6297 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js @@ -0,0 +1,54 @@ +define(['./forOwn', '../lang/isArray'], function(forOwn, isArray) { + + function containsMatch(array, pattern) { + var i = -1, length = array.length; + while (++i < length) { + if (deepMatches(array[i], pattern)) { + return true; + } + } + + return false; + } + + function matchArray(target, pattern) { + var i = -1, patternLength = pattern.length; + while (++i < patternLength) { + if (!containsMatch(target, pattern[i])) { + return false; + } + } + + return true; + } + + function matchObject(target, pattern) { + var result = true; + forOwn(pattern, function(val, key) { + if (!deepMatches(target[key], val)) { + // Return false to break out of forOwn early + return (result = false); + } + }); + + return result; + } + + /** + * Recursively check if the objects match. + */ + function deepMatches(target, pattern){ + if (target && typeof target === 'object') { + if (isArray(target) && isArray(pattern)) { + return matchArray(target, pattern); + } else { + return matchObject(target, pattern); + } + } else { + return target === pattern; + } + } + + return deepMatches; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js new file mode 100644 index 00000000..1b4178ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js @@ -0,0 +1,33 @@ +define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { + + /** + * Mixes objects into the target object, recursively mixing existing child + * objects. + */ + function deepMixIn(target, objects) { + var i = 0, + n = arguments.length, + obj; + + while(++i < n){ + obj = arguments[i]; + if (obj) { + forOwn(obj, copyProp, target); + } + } + + return target; + } + + function copyProp(val, key) { + var existing = this[key]; + if (isPlainObject(val) && isPlainObject(existing)) { + deepMixIn(existing, val); + } else { + this[key] = val; + } + } + + return deepMixIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js new file mode 100644 index 00000000..596cb952 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js @@ -0,0 +1,34 @@ +define(['./hasOwn', './every', '../lang/isObject'], function(hasOwn, every, isObject) { + + function defaultCompare(a, b) { + return a === b; + } + + // Makes a function to compare the object values from the specified compare + // operation callback. + function makeCompare(callback) { + return function(value, key) { + return hasOwn(this, key) && callback(value, this[key]); + }; + } + + function checkProperties(value, key) { + return hasOwn(this, key); + } + + /** + * Checks if two objects have the same keys and values. + */ + function equals(a, b, callback) { + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + return (every(a, makeCompare(callback), b) && + every(b, checkProperties, a)); + } + + return equals; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js new file mode 100644 index 00000000..52983a5e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js @@ -0,0 +1,22 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Object every + */ + function every(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + forOwn(obj, function(val, key) { + // we consider any falsy values as "false" on purpose so shorthand + // syntax can be used to check property existence + if (!callback(val, key, obj)) { + result = false; + return false; // break + } + }); + return result; + } + + return every; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js new file mode 100644 index 00000000..0845d3c2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js @@ -0,0 +1,19 @@ +define(['../array/forEach', './forOwn'], function (forEach, forOwn) { + + /** + * Copy missing properties in the obj from the defaults. + */ + function fillIn(obj, var_defaults){ + forEach(Array.prototype.slice.call(arguments, 1), function(base){ + forOwn(base, function(val, key){ + if (obj[key] == null) { + obj[key] = val; + } + }); + }); + return obj; + } + + return fillIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js new file mode 100644 index 00000000..f213b915 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js @@ -0,0 +1,19 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Creates a new object with all the properties where the callback returns + * true. + */ + function filterValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + output[key] = value; + } + }); + + return output; + } + return filterValues; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js new file mode 100644 index 00000000..47e6b09d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js @@ -0,0 +1,20 @@ +define(['./some', '../function/makeIterator_'], function(some, makeIterator) { + + /** + * Returns first item that matches criteria + */ + function find(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result; + some(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + result = value; + return true; //break + } + }); + return result; + } + + return find; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js new file mode 100644 index 00000000..2058e9cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js @@ -0,0 +1,62 @@ +define(function () { + + var _hasDontEnumBug, + _dontEnums; + + function checkDontEnum(){ + _dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + + _hasDontEnumBug = true; + + for (var key in {'toString': null}) { + _hasDontEnumBug = false; + } + } + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forIn(obj, fn, thisObj){ + var key, i = 0; + // no need to check if argument is a real object that way we can use + // it for arrays, functions, date, etc. + + //post-pone check till needed + if (_hasDontEnumBug == null) checkDontEnum(); + + for (key in obj) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + + if (_hasDontEnumBug) { + while (key = _dontEnums[i++]) { + // since we aren't using hasOwn check we need to make sure the + // property was overwritten + if (obj[key] !== Object.prototype[key]) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + } + } + } + + function exec(fn, obj, key, thisObj){ + return fn.call(thisObj, obj[key], key, obj); + } + + return forIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js new file mode 100644 index 00000000..b40cbaf1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js @@ -0,0 +1,18 @@ +define(['./hasOwn', './forIn'], function (hasOwn, forIn) { + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forOwn(obj, fn, thisObj){ + forIn(obj, function(val, key){ + if (hasOwn(obj, key)) { + return fn.call(thisObj, obj[key], key, obj); + } + }); + } + + return forOwn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js new file mode 100644 index 00000000..60fee3dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js @@ -0,0 +1,18 @@ +define(['./forIn'], function (forIn) { + + /** + * return a list of all enumerable properties that have function values + */ + function functions(obj){ + var keys = []; + forIn(obj, function(val, key){ + if (typeof val === 'function'){ + keys.push(key); + } + }); + return keys.sort(); + } + + return functions; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js new file mode 100644 index 00000000..ca80b059 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js @@ -0,0 +1,20 @@ +define(function () { + + /** + * get "nested" object property + */ + function get(obj, prop){ + var parts = prop.split('.'), + last = parts.pop(); + + while (prop = parts.shift()) { + obj = obj[prop]; + if (typeof obj !== 'object') return; + } + + return obj[last]; + } + + return get; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js new file mode 100644 index 00000000..cc29817f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js @@ -0,0 +1,15 @@ +define(['./get'], function (get) { + + var UNDEF; + + /** + * Check if object has nested property. + */ + function has(obj, prop){ + return get(obj, prop) !== UNDEF; + } + + return has; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js new file mode 100644 index 00000000..5c53bcf2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js @@ -0,0 +1,12 @@ +define(function () { + + /** + * Safer Object.hasOwnProperty + */ + function hasOwn(obj, prop){ + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + return hasOwn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js new file mode 100644 index 00000000..ed7c4f91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object keys + */ + var keys = Object.keys || function (obj) { + var keys = []; + forOwn(obj, function(val, key){ + keys.push(key); + }); + return keys; + }; + + return keys; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js new file mode 100644 index 00000000..2958f6b0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js @@ -0,0 +1,17 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Creates a new object where all the values are the result of calling + * `callback`. + */ + function mapValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(val, key, obj) { + output[key] = callback(val, key, obj); + }); + + return output; + } + return mapValues; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js new file mode 100644 index 00000000..73ff427c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js @@ -0,0 +1,20 @@ +define(['./forOwn'], function (forOwn) { + + /** + * checks if a object contains all given properties/values + */ + function matches(target, props){ + // can't use "object/every" because of circular dependency + var result = true; + forOwn(props, function(val, key){ + if (target[key] !== val) { + // break loop at first difference + return (result = false); + } + }); + return result; + } + + return matches; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js new file mode 100644 index 00000000..ef311dcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js @@ -0,0 +1,11 @@ +define(['../array/max', './values'], function(arrMax, values) { + + /** + * Returns maximum value inside object. + */ + function max(obj, compareFn) { + return arrMax(values(obj), compareFn); + } + + return max; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js new file mode 100644 index 00000000..d7cfedec --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js @@ -0,0 +1,38 @@ +define(['./hasOwn', '../lang/deepClone', '../lang/isObject'], function (hasOwn, deepClone, isObject) { + + /** + * Deep merge objects. + */ + function merge() { + var i = 1, + key, val, obj, target; + + // make sure we don't modify source element and it's properties + // objects are passed by reference + target = deepClone( arguments[0] ); + + while (obj = arguments[i++]) { + for (key in obj) { + if ( ! hasOwn(obj, key) ) { + continue; + } + + val = obj[key]; + + if ( isObject(val) && isObject(target[key]) ){ + // inception, deep merge objects + target[key] = merge(target[key], val); + } else { + // make sure arrays, regexp, date, objects are cloned + target[key] = deepClone(val); + } + + } + } + + return target; + } + + return merge; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js new file mode 100644 index 00000000..9fb4c1a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js @@ -0,0 +1,11 @@ +define(['../array/min', './values'], function(arrMin, values) { + + /** + * Returns minimum value inside object. + */ + function min(obj, iterator) { + return arrMin(values(obj), iterator); + } + + return min; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js new file mode 100644 index 00000000..6210b7e7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js @@ -0,0 +1,28 @@ +define(['./forOwn'], function(forOwn){ + + /** + * Combine properties from all the objects into first one. + * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. + * @param {object} target Target Object + * @param {...object} objects Objects to be combined (0...n objects). + * @return {object} Target Object. + */ + function mixIn(target, objects){ + var i = 0, + n = arguments.length, + obj; + while(++i < n){ + obj = arguments[i]; + if (obj != null) { + forOwn(obj, copyProp, target); + } + } + return target; + } + + function copyProp(val, key){ + this[key] = val; + } + + return mixIn; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js new file mode 100644 index 00000000..7ed65db8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js @@ -0,0 +1,19 @@ +define(['../array/forEach'], function (forEach) { + + /** + * Create nested object if non-existent + */ + function namespace(obj, path){ + if (!path) return obj; + forEach(path.split('.'), function(key){ + if (!obj[key]) { + obj[key] = {}; + } + obj = obj[key]; + }); + return obj; + } + + return namespace; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js new file mode 100644 index 00000000..76e22bfc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js @@ -0,0 +1,18 @@ +define(function(){ + + /** + * Return a copy of the object, filtered to only have values for the whitelisted keys. + */ + function pick(obj, var_keys){ + var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), + out = {}, + i = 0, key; + while (key = keys[i++]) { + out[key] = obj[key]; + } + return out; + } + + return pick; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js new file mode 100644 index 00000000..d47744bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js @@ -0,0 +1,12 @@ +define(['./map', '../function/prop'], function (map, prop) { + + /** + * Extract a list of property values. + */ + function pluck(obj, propName){ + return map(obj, prop(propName)); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js new file mode 100644 index 00000000..d3a57788 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js @@ -0,0 +1,28 @@ +define(['./forOwn', './size'], function(forOwn, size) { + + /** + * Object reduce + */ + function reduce(obj, callback, memo, thisObj) { + var initial = arguments.length > 2; + + if (!size(obj) && !initial) { + throw new Error('reduce of empty object with no initial value'); + } + + forOwn(obj, function(value, key, list) { + if (!initial) { + memo = value; + initial = true; + } + else { + memo = callback.call(thisObj, memo, value, key, list); + } + }); + + return memo; + } + + return reduce; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js new file mode 100644 index 00000000..84296428 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js @@ -0,0 +1,15 @@ +define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { + + /** + * Object reject + */ + function reject(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + return filter(obj, function(value, index, obj) { + return !callback(value, index, obj); + }, thisObj); + } + + return reject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js new file mode 100644 index 00000000..b8fa25a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js @@ -0,0 +1,17 @@ +define(['./namespace'], function (namespace) { + + /** + * set "nested" object property + */ + function set(obj, prop, val){ + var parts = (/^(.+)\.(.+)$/).exec(prop); + if (parts){ + namespace(obj, parts[1])[parts[2]] = val; + } else { + obj[prop] = val; + } + } + + return set; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js new file mode 100644 index 00000000..c6e377cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object size + */ + function size(obj) { + var count = 0; + forOwn(obj, function(){ + count++; + }); + return count; + } + + return size; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js new file mode 100644 index 00000000..1bd6fdae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js @@ -0,0 +1,20 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Object some + */ + function some(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + forOwn(obj, function(val, key) { + if (callback(val, key, obj)) { + result = true; + return false; // break + } + }); + return result; + } + + return some; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js new file mode 100644 index 00000000..787fc19a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js @@ -0,0 +1,23 @@ +define(['./has'], function (has) { + + /** + * Unset object property. + */ + function unset(obj, prop){ + if (has(obj, prop)) { + var parts = prop.split('.'), + last = parts.pop(); + while (prop = parts.shift()) { + obj = obj[prop]; + } + return (delete obj[last]); + + } else { + // if property doesn't exist treat as deleted + return true; + } + } + + return unset; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js new file mode 100644 index 00000000..b311fd09 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object values + */ + function values(obj) { + var vals = []; + forOwn(obj, function(val, key){ + vals.push(val); + }); + return vals; + } + + return values; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js new file mode 100644 index 00000000..44346127 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js @@ -0,0 +1,15 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'contains' : require('./queryString/contains'), + 'decode' : require('./queryString/decode'), + 'encode' : require('./queryString/encode'), + 'getParam' : require('./queryString/getParam'), + 'getQuery' : require('./queryString/getQuery'), + 'parse' : require('./queryString/parse'), + 'setParam' : require('./queryString/setParam') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js new file mode 100644 index 00000000..a6d11cce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js @@ -0,0 +1,12 @@ +define(['./getQuery'], function (getQuery) { + + /** + * Checks if query string contains parameter. + */ + function contains(url, paramName) { + var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` + return regex.test(getQuery(url)); + } + + return contains; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js new file mode 100644 index 00000000..02bc1609 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js @@ -0,0 +1,20 @@ +define(['../string/typecast', '../lang/isString'], function (typecast, isString) { + + /** + * Decode query string into an object of keys => vals. + */ + function decode(queryStr, shouldTypecast) { + var queryArr = (queryStr || '').replace('?', '').split('&'), + n = queryArr.length, + obj = {}, + item, val; + while (n--) { + item = queryArr[n].split('='); + val = shouldTypecast === false? item[1] : typecast(item[1]); + obj[item[0]] = isString(val)? decodeURIComponent(val) : val; + } + return obj; + } + + return decode; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js new file mode 100644 index 00000000..bd72a5b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js @@ -0,0 +1,15 @@ +define(['../object/forOwn'], function (forOwn) { + + /** + * Encode object into a query string. + */ + function encode(obj){ + var query = []; + forOwn(obj, function(val, key){ + query.push( key +'='+ encodeURIComponent(val) ); + }); + return (query.length)? '?'+ query.join('&') : ''; + } + + return encode; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js new file mode 100644 index 00000000..d9813724 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js @@ -0,0 +1,14 @@ +define(['../string/typecast', './getQuery'], function (typecast, getQuery) { + + /** + * Get query parameter value. + */ + function getParam(url, param, shouldTypecast){ + var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 + result = regexp.exec( getQuery(url) ), + val = (result && result[2])? result[2] : null; + return shouldTypecast === false? val : typecast(val); + } + + return getParam; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js new file mode 100644 index 00000000..aa3d99f3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * Gets full query as string with all special chars decoded. + */ + function getQuery(url) { + url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) + var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt + return (queryString)? decodeURIComponent(queryString[0]) : ''; + } + + return getQuery; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js new file mode 100644 index 00000000..ac153e3f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js @@ -0,0 +1,12 @@ +define(['./decode', './getQuery'], function (decode, getQuery) { + + /** + * Get query string, parses and decodes it. + */ + function parse(url, shouldTypecast) { + return decode(getQuery(url), shouldTypecast); + } + + return parse; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js new file mode 100644 index 00000000..97081aa7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Set query string parameter value + */ + function setParam(url, paramName, value){ + url = url || ''; + + var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); + var param = paramName +'='+ encodeURIComponent( value ); + + if ( re.test(url) ) { + return url.replace(re, '$1'+ param); + } else { + if (url.indexOf('?') === -1) { + url += '?'; + } + if (url.indexOf('=') !== -1) { + url += '&'; + } + return url + param; + } + + } + + return setParam; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js new file mode 100644 index 00000000..b2641ee3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js @@ -0,0 +1,16 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'choice' : require('./random/choice'), + 'guid' : require('./random/guid'), + 'rand' : require('./random/rand'), + 'randBit' : require('./random/randBit'), + 'randHex' : require('./random/randHex'), + 'randInt' : require('./random/randInt'), + 'randSign' : require('./random/randSign'), + 'random' : require('./random/random') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js new file mode 100644 index 00000000..0d0c38df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js @@ -0,0 +1,14 @@ +define(['./randInt', '../lang/isArray'], function (randInt, isArray) { + + /** + * Returns a random element from the supplied arguments + * or from the array (if single argument is an array). + */ + function choice(items) { + var target = (arguments.length === 1 && isArray(items))? items : arguments; + return target[ randInt(0, target.length - 1) ]; + } + + return choice; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js new file mode 100644 index 00000000..82f3a2db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js @@ -0,0 +1,23 @@ +define(['./randHex', './choice'], function (randHex, choice) { + + /** + * Returns pseudo-random guid (UUID v4) + * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random + * by default and sequences can be predicted in some cases. See the + * "random/random" documentation for more info about it and how to replace + * the default PRNG. + */ + function guid() { + return ( + randHex(8)+'-'+ + randHex(4)+'-'+ + // v4 UUID always contain "4" at this position to specify it was + // randomly generated + '4' + randHex(3) +'-'+ + // v4 UUID always contain chars [a,b,8,9] at this position + choice(8, 9, 'a', 'b') + randHex(3)+'-'+ + randHex(12) + ); + } + return guid; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js new file mode 100644 index 00000000..b8c231dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js @@ -0,0 +1,13 @@ +define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ + + /** + * Returns random number inside range + */ + function rand(min, max){ + min = min == null? MIN_INT : min; + max = max == null? MAX_INT : max; + return min + (max - min) * random(); + } + + return rand; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js new file mode 100644 index 00000000..b3422d2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js @@ -0,0 +1,11 @@ +define(['./random'], function (random) { + + /** + * Returns random bit (0 or 1) + */ + function randomBit() { + return random() > 0.5? 1 : 0; + } + + return randomBit; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js new file mode 100644 index 00000000..6e9bf1c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js @@ -0,0 +1,19 @@ +define(['./choice'], function (choice) { + + var _chars = '0123456789abcdef'.split(''); + + /** + * Returns a random hexadecimal string + */ + function randHex(size){ + size = size && size > 0? size : 6; + var str = ''; + while (size--) { + str += choice(_chars); + } + return str; + } + + return randHex; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js new file mode 100644 index 00000000..1750e9de --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js @@ -0,0 +1,16 @@ +define(['../number/MIN_INT', '../number/MAX_INT', './rand'], function(MIN_INT, MAX_INT, rand){ + + /** + * Gets random integer inside range or snap to min/max values. + */ + function randInt(min, max){ + min = min == null? MIN_INT : ~~min; + max = max == null? MAX_INT : ~~max; + // can't be max + 0.5 otherwise it will round up if `rand` + // returns `max` causing it to overflow range. + // -0.5 and + 0.49 are required to avoid bias caused by rounding + return Math.round( rand(min - 0.5, max + 0.499999999999) ); + } + + return randInt; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js new file mode 100644 index 00000000..4141cdf6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js @@ -0,0 +1,11 @@ +define(['./random'], function (random) { + + /** + * Returns random sign (-1 or 1) + */ + function randomSign() { + return random() > 0.5? 1 : -1; + } + + return randomSign; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js new file mode 100644 index 00000000..4270822e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js @@ -0,0 +1,18 @@ +define(function () { + + /** + * Just a wrapper to Math.random. No methods inside mout/random should call + * Math.random() directly so we can inject the pseudo-random number + * generator if needed (ie. in case we need a seeded random or a better + * algorithm than the native one) + */ + function random(){ + return random.get(); + } + + // we expose the method so it can be swapped if needed + random.get = Math.random; + + return random; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js new file mode 100644 index 00000000..3f5fd804 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js @@ -0,0 +1,45 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'WHITE_SPACES' : require('./string/WHITE_SPACES'), + 'camelCase' : require('./string/camelCase'), + 'contains' : require('./string/contains'), + 'crop' : require('./string/crop'), + 'endsWith' : require('./string/endsWith'), + 'escapeHtml' : require('./string/escapeHtml'), + 'escapeRegExp' : require('./string/escapeRegExp'), + 'escapeUnicode' : require('./string/escapeUnicode'), + 'hyphenate' : require('./string/hyphenate'), + 'interpolate' : require('./string/interpolate'), + 'lowerCase' : require('./string/lowerCase'), + 'lpad' : require('./string/lpad'), + 'ltrim' : require('./string/ltrim'), + 'makePath' : require('./string/makePath'), + 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), + 'pascalCase' : require('./string/pascalCase'), + 'properCase' : require('./string/properCase'), + 'removeNonASCII' : require('./string/removeNonASCII'), + 'removeNonWord' : require('./string/removeNonWord'), + 'repeat' : require('./string/repeat'), + 'replace' : require('./string/replace'), + 'replaceAccents' : require('./string/replaceAccents'), + 'rpad' : require('./string/rpad'), + 'rtrim' : require('./string/rtrim'), + 'sentenceCase' : require('./string/sentenceCase'), + 'slugify' : require('./string/slugify'), + 'startsWith' : require('./string/startsWith'), + 'stripHtmlTags' : require('./string/stripHtmlTags'), + 'trim' : require('./string/trim'), + 'truncate' : require('./string/truncate'), + 'typecast' : require('./string/typecast'), + 'unCamelCase' : require('./string/unCamelCase'), + 'underscore' : require('./string/underscore'), + 'unescapeHtml' : require('./string/unescapeHtml'), + 'unescapeUnicode' : require('./string/unescapeUnicode'), + 'unhyphenate' : require('./string/unhyphenate'), + 'upperCase' : require('./string/upperCase') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js new file mode 100644 index 00000000..e830d86d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js @@ -0,0 +1,12 @@ +define(function() { + /** + * Contains all Unicode white-spaces. Taken from + * http://en.wikipedia.org/wiki/Whitespace_character. + */ + return [ + ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', + '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', + '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', + '\u205F', '\u3000' + ]; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js new file mode 100644 index 00000000..02e6c04d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js @@ -0,0 +1,16 @@ +define(['../lang/toString', './replaceAccents', './removeNonWord', './upperCase', './lowerCase'], function(toString, replaceAccents, removeNonWord, upperCase, lowerCase){ + /** + * Convert string to camelCase text. + */ + function camelCase(str){ + str = toString(str); + str = replaceAccents(str); + str = removeNonWord(str) + .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces + .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE + .replace(/\s+/g, '') //remove spaces + .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase + return str; + } + return camelCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js new file mode 100644 index 00000000..825b5a5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js @@ -0,0 +1,14 @@ +define(['../lang/toString'], function(toString) { + + /** + * Searches for a given substring + */ + function contains(str, substring, fromIndex){ + str = toString(str); + substring = toString(substring); + return str.indexOf(substring, fromIndex) !== -1; + } + + return contains; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js new file mode 100644 index 00000000..3c073f05 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './truncate'], function (toString, truncate) { + /** + * Truncate string at full words. + */ + function crop(str, maxChars, append) { + str = toString(str); + return truncate(str, maxChars, append, true); + } + + return crop; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js new file mode 100644 index 00000000..31a73f20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function(toString) { + /** + * Checks if string ends with specified suffix. + */ + function endsWith(str, suffix) { + str = toString(str); + suffix = toString(suffix); + + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + + return endsWith; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js new file mode 100644 index 00000000..de34b61b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function(toString) { + + /** + * Escapes a string for insertion into HTML. + */ + function escapeHtml(str){ + str = toString(str) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/'/g, ''') + .replace(/"/g, '"'); + return str; + } + + return escapeHtml; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js new file mode 100644 index 00000000..32facac0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js @@ -0,0 +1,15 @@ +define(['../lang/toString'], function(toString) { + + var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; + + /** + * Escape RegExp string chars. + */ + function escapeRegExp(str) { + str = toString(str); + return str.replace(ESCAPE_CHARS,'\\$&'); + } + + return escapeRegExp; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js new file mode 100644 index 00000000..bd5e8c4c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js @@ -0,0 +1,21 @@ +define(['../lang/toString'], function(toString) { + + /** + * Escape string into unicode sequences + */ + function escapeUnicode(str, shouldEscapePrintable){ + str = toString(str); + return str.replace(/[\s\S]/g, function(ch){ + // skip printable ASCII chars if we should not escape them + if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { + return ch; + } + // we use "000" and slice(-4) for brevity, need to pad zeros, + // unicode escape always have 4 chars after "\u" + return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); + }); + } + + return escapeUnicode; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js new file mode 100644 index 00000000..679c405c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js @@ -0,0 +1,12 @@ +define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ + /** + * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function hyphenate(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "-"); + } + + return hyphenate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js new file mode 100644 index 00000000..ecb8ba80 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function(toString) { + + var stache = /\{\{(\w+)\}\}/g; //mustache-like + + /** + * String interpolation + */ + function interpolate(template, replacements, syntax){ + template = toString(template); + var replaceFn = function(match, prop){ + return (prop in replacements)? toString(replacements[prop]) : ''; + }; + return template.replace(syntax || stache, replaceFn); + } + + return interpolate; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js new file mode 100644 index 00000000..b045d69c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * "Safer" String.toLowerCase() + */ + function lowerCase(str){ + str = toString(str); + return str.toLowerCase(); + } + + return lowerCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js new file mode 100644 index 00000000..ea4f5fbf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js @@ -0,0 +1,16 @@ +define(['../lang/toString', './repeat'], function(toString, repeat) { + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function lpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + + return ((str.length < minLen) + ? repeat(ch, minLen - str.length) + str : str); + } + + return lpad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js new file mode 100644 index 00000000..477df953 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js @@ -0,0 +1,33 @@ +define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ + /** + * Remove chars from beginning of string. + */ + function ltrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var start = 0, + len = str.length, + charLen = chars.length, + found = true, + i, c; + + while (found && start < len) { + found = false; + i = -1; + c = str.charAt(start); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + start++; + break; + } + } + } + + return (start >= len) ? '' : str.substr(start, len); + } + + return ltrim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js new file mode 100644 index 00000000..7aa7baba --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js @@ -0,0 +1,13 @@ +define(['../array/join'], function(join){ + + /** + * Group arguments as path segments, if any of the args is `null` or an + * empty string it will be ignored from resulting path. + */ + function makePath(var_args){ + var result = join(Array.prototype.slice.call(arguments), '/'); + return result.replace(/\/{2,}/g, '/'); + } + + return makePath; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js new file mode 100644 index 00000000..44e4194f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function (toString) { + + /** + * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) + */ + function normalizeLineBreaks(str, lineEnd) { + str = toString(str); + lineEnd = lineEnd || '\n'; + + return str + .replace(/\r\n/g, lineEnd) // DOS + .replace(/\r/g, lineEnd) // Mac + .replace(/\n/g, lineEnd); // Unix + } + + return normalizeLineBreaks; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js new file mode 100644 index 00000000..ead9ead4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ + /** + * camelCase + UPPERCASE first char + */ + function pascalCase(str){ + str = toString(str); + return camelCase(str).replace(/^[a-z]/, upperCase); + } + + return pascalCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js new file mode 100644 index 00000000..2987b507 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ + /** + * UPPERCASE first char of each word. + */ + function properCase(str){ + str = toString(str); + return lowerCase(str).replace(/^\w|\s\w/g, upperCase); + } + + return properCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js new file mode 100644 index 00000000..4905869d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js @@ -0,0 +1,14 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove non-printable ASCII chars + */ + function removeNonASCII(str){ + str = toString(str); + + // Matches non-printable ASCII chars - + // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters + return str.replace(/[^\x20-\x7E]/g, ''); + } + + return removeNonASCII; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js new file mode 100644 index 00000000..2b1a2040 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove non-word chars. + */ + function removeNonWord(str){ + str = toString(str); + return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); + } + + return removeNonWord; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js new file mode 100644 index 00000000..02f5659f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function(toString){ + + /** + * Repeat string n times + */ + function repeat(str, n){ + str = toString(str); + return (new Array(n + 1)).join(str); + } + + return repeat; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js new file mode 100644 index 00000000..8b762fdc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js @@ -0,0 +1,32 @@ +define(['../lang/toString', '../lang/toArray'], function (toString, toArray) { + + /** + * Replace string(s) with the replacement(s) in the source. + */ + function replace(str, search, replacements) { + str = toString(str); + search = toArray(search); + replacements = toArray(replacements); + + var searchLength = search.length, + replacementsLength = replacements.length; + + if (replacementsLength !== 1 && searchLength !== replacementsLength) { + throw new Error('Unequal number of searches and replacements'); + } + + var i = -1; + while (++i < searchLength) { + // Use the first replacement for all searches if only one + // replacement is provided + str = str.replace( + search[i], + replacements[(replacementsLength === 1) ? 0 : i]); + } + + return str; + } + + return replace; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js new file mode 100644 index 00000000..3a63f55a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js @@ -0,0 +1,36 @@ +define(['../lang/toString'], function(toString){ + /** + * Replaces all accented chars with regular ones + */ + function replaceAccents(str){ + str = toString(str); + + // verifies if the String has accents and replace them + if (str.search(/[\xC0-\xFF]/g) > -1) { + str = str + .replace(/[\xC0-\xC5]/g, "A") + .replace(/[\xC6]/g, "AE") + .replace(/[\xC7]/g, "C") + .replace(/[\xC8-\xCB]/g, "E") + .replace(/[\xCC-\xCF]/g, "I") + .replace(/[\xD0]/g, "D") + .replace(/[\xD1]/g, "N") + .replace(/[\xD2-\xD6\xD8]/g, "O") + .replace(/[\xD9-\xDC]/g, "U") + .replace(/[\xDD]/g, "Y") + .replace(/[\xDE]/g, "P") + .replace(/[\xE0-\xE5]/g, "a") + .replace(/[\xE6]/g, "ae") + .replace(/[\xE7]/g, "c") + .replace(/[\xE8-\xEB]/g, "e") + .replace(/[\xEC-\xEF]/g, "i") + .replace(/[\xF1]/g, "n") + .replace(/[\xF2-\xF6\xF8]/g, "o") + .replace(/[\xF9-\xFC]/g, "u") + .replace(/[\xFE]/g, "p") + .replace(/[\xFD\xFF]/g, "y"); + } + return str; + } + return replaceAccents; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js new file mode 100644 index 00000000..2efd9c88 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js @@ -0,0 +1,14 @@ +define(['../lang/toString', './repeat'], function (toString, repeat) { + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function rpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; + } + + return rpad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js new file mode 100644 index 00000000..a4cc282d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js @@ -0,0 +1,32 @@ +define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ + /** + * Remove chars from end of string. + */ + function rtrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var end = str.length - 1, + charLen = chars.length, + found = true, + i, c; + + while (found && end >= 0) { + found = false; + i = -1; + c = str.charAt(end); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + end--; + break; + } + } + } + + return (end >= 0) ? str.substring(0, end + 1) : ''; + } + + return rtrim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js new file mode 100644 index 00000000..cfe45af5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js @@ -0,0 +1,13 @@ +define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ + /** + * UPPERCASE first char of each sentence and lowercase other chars. + */ + function sentenceCase(str){ + str = toString(str); + + // Replace first char of each sentence (new line or after '.\s+') to + // UPPERCASE + return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); + } + return sentenceCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js new file mode 100644 index 00000000..c6d68c7e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js @@ -0,0 +1,21 @@ +define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ + /** + * Convert to lower case, remove accents, remove non-word chars and + * replace spaces with the specified delimeter. + * Does not split camelCase text. + */ + function slugify(str, delimeter){ + str = toString(str); + + if (delimeter == null) { + delimeter = "-"; + } + str = replaceAccents(str); + str = removeNonWord(str); + str = trim(str) //should come after removeNonWord + .replace(/ +/g, delimeter) //replace spaces with delimeter + .toLowerCase(); + return str; + } + return slugify; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js new file mode 100644 index 00000000..88ae5453 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function (toString) { + /** + * Checks if string starts with specified prefix. + */ + function startsWith(str, prefix) { + str = toString(str); + prefix = toString(prefix); + + return str.indexOf(prefix) === 0; + } + + return startsWith; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js new file mode 100644 index 00000000..e8da956d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove HTML tags from string. + */ + function stripHtmlTags(str){ + str = toString(str); + + return str.replace(/<[^>]*>/g, ''); + } + return stripHtmlTags; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js new file mode 100644 index 00000000..55526041 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js @@ -0,0 +1,12 @@ +define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ + /** + * Remove white-spaces from beginning and end of string. + */ + function trim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + return ltrim(rtrim(str, chars), chars); + } + + return trim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js new file mode 100644 index 00000000..34000d9f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js @@ -0,0 +1,20 @@ +define(['../lang/toString', './trim'], function(toString, trim){ + /** + * Limit number of chars. + */ + function truncate(str, maxChars, append, onlyFullWords){ + str = toString(str); + append = append || '...'; + maxChars = onlyFullWords? maxChars + 1 : maxChars; + + str = trim(str); + if(str.length <= maxChars){ + return str; + } + str = str.substr(0, maxChars - append.length); + //crop at last space or remove trailing whitespace + str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); + return str + append; + } + return truncate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js new file mode 100644 index 00000000..a7c83153 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js @@ -0,0 +1,29 @@ +define(function () { + + var UNDEF; + + /** + * Parses string and convert it into a native value. + */ + function typecast(val) { + var r; + if ( val === null || val === 'null' ) { + r = null; + } else if ( val === 'true' ) { + r = true; + } else if ( val === 'false' ) { + r = false; + } else if ( val === UNDEF || val === 'undefined' ) { + r = UNDEF; + } else if ( val === '' || isNaN(val) ) { + //isNaN('') returns false + r = val; + } else { + //parseFloat(null || '') returns NaN + r = parseFloat(val); + } + return r; + } + + return typecast; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js new file mode 100644 index 00000000..eeef39b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js @@ -0,0 +1,23 @@ +define(['../lang/toString'], function(toString){ + + var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; + + /** + * Add space between camelCase text. + */ + function unCamelCase(str, delimiter){ + if (delimiter == null) { + delimiter = ' '; + } + + function join(str, c1, c2) { + return c1 + delimiter + c2; + } + + str = toString(str); + str = str.replace(CAMEL_CASE_BORDER, join); + str = str.toLowerCase(); //add space between camelCase text + return str; + } + return unCamelCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js new file mode 100644 index 00000000..75dd4649 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ + /** + * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function underscore(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "_"); + } + return underscore; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js new file mode 100644 index 00000000..173c69c2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function (toString) { + + /** + * Unescapes HTML special chars + */ + function unescapeHtml(str){ + str = toString(str) + .replace(/&/g , '&') + .replace(/</g , '<') + .replace(/>/g , '>') + .replace(/'/g , "'") + .replace(/"/g, '"'); + return str; + } + + return unescapeHtml; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js new file mode 100644 index 00000000..d4a7ba1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js @@ -0,0 +1,16 @@ +define(['../lang/toString'], function(toString) { + + /** + * Unescape unicode char sequences + */ + function unescapeUnicode(str){ + str = toString(str); + return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ + var code = parseInt(ch.slice(2), 16); + return String.fromCharCode(code); + }); + } + + return unescapeUnicode; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js new file mode 100644 index 00000000..6ac2fa4c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js @@ -0,0 +1,10 @@ +define(['../lang/toString'], function(toString){ + /** + * Replaces hyphens with spaces. (only hyphens between word chars) + */ + function unhyphenate(str){ + str = toString(str); + return str.replace(/(\w)(-)(\w)/g, '$1 $3'); + } + return unhyphenate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js new file mode 100644 index 00000000..8b2073e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js @@ -0,0 +1,10 @@ +define(['../lang/toString'], function(toString){ + /** + * "Safer" String.toUpperCase() + */ + function upperCase(str){ + str = toString(str); + return str.toUpperCase(); + } + return upperCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js new file mode 100644 index 00000000..67c90685 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js @@ -0,0 +1,12 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'convert' : require('./time/convert'), + 'now' : require('./time/now'), + 'parseMs' : require('./time/parseMs'), + 'toTimeString' : require('./time/toTimeString') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js new file mode 100644 index 00000000..2de0cf2e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js @@ -0,0 +1,41 @@ +define(function () { + + /** + * convert time into another unit + */ + function convert(val, sourceUnitName, destinationUnitName){ + destinationUnitName = destinationUnitName || 'ms'; + return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); + } + + + //TODO: maybe extract to a separate module + function getUnit(unitName){ + switch(unitName){ + case 'ms': + case 'millisecond': + return 1; + case 's': + case 'second': + return 1000; + case 'm': + case 'minute': + return 60000; + case 'h': + case 'hour': + return 3600000; + case 'd': + case 'day': + return 86400000; + case 'w': + case 'week': + return 604800000; + default: + throw new Error('"'+ unitName + '" is not a valid unit'); + } + } + + + return convert; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js new file mode 100644 index 00000000..a3a38bcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js @@ -0,0 +1,12 @@ +define(function () { + + /** + * Get current time in miliseconds + */ + var now = (typeof Date.now === 'function')? Date.now : function(){ + return +(new Date()); + }; + + return now; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js new file mode 100644 index 00000000..964929ae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js @@ -0,0 +1,17 @@ +define(['../math/countSteps'], function(countSteps){ + + /** + * Parse timestamp into an object. + */ + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + return parseMs; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js new file mode 100644 index 00000000..edf18218 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js @@ -0,0 +1,23 @@ +define(['../math/countSteps', '../number/pad'], function(countSteps, pad){ + + var HOUR = 3600000, + MINUTE = 60000, + SECOND = 1000; + + /** + * Format timestamp into a time string. + */ + function toTimeString(ms){ + var h = ms < HOUR ? 0 : countSteps(ms, HOUR), + m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), + s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), + str = ''; + + str += h? h + ':' : ''; + str += pad(m, 2) + ':'; + str += pad(s, 2); + + return str; + } + return toTimeString; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string.js new file mode 100644 index 00000000..7f0ca3bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string.js @@ -0,0 +1,45 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'WHITE_SPACES' : require('./string/WHITE_SPACES'), + 'camelCase' : require('./string/camelCase'), + 'contains' : require('./string/contains'), + 'crop' : require('./string/crop'), + 'endsWith' : require('./string/endsWith'), + 'escapeHtml' : require('./string/escapeHtml'), + 'escapeRegExp' : require('./string/escapeRegExp'), + 'escapeUnicode' : require('./string/escapeUnicode'), + 'hyphenate' : require('./string/hyphenate'), + 'interpolate' : require('./string/interpolate'), + 'lowerCase' : require('./string/lowerCase'), + 'lpad' : require('./string/lpad'), + 'ltrim' : require('./string/ltrim'), + 'makePath' : require('./string/makePath'), + 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), + 'pascalCase' : require('./string/pascalCase'), + 'properCase' : require('./string/properCase'), + 'removeNonASCII' : require('./string/removeNonASCII'), + 'removeNonWord' : require('./string/removeNonWord'), + 'repeat' : require('./string/repeat'), + 'replace' : require('./string/replace'), + 'replaceAccents' : require('./string/replaceAccents'), + 'rpad' : require('./string/rpad'), + 'rtrim' : require('./string/rtrim'), + 'sentenceCase' : require('./string/sentenceCase'), + 'slugify' : require('./string/slugify'), + 'startsWith' : require('./string/startsWith'), + 'stripHtmlTags' : require('./string/stripHtmlTags'), + 'trim' : require('./string/trim'), + 'truncate' : require('./string/truncate'), + 'typecast' : require('./string/typecast'), + 'unCamelCase' : require('./string/unCamelCase'), + 'underscore' : require('./string/underscore'), + 'unescapeHtml' : require('./string/unescapeHtml'), + 'unescapeUnicode' : require('./string/unescapeUnicode'), + 'unhyphenate' : require('./string/unhyphenate'), + 'upperCase' : require('./string/upperCase') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js new file mode 100644 index 00000000..03e01254 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js @@ -0,0 +1,12 @@ + + /** + * Contains all Unicode white-spaces. Taken from + * http://en.wikipedia.org/wiki/Whitespace_character. + */ + module.exports = [ + ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', + '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', + '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', + '\u205F', '\u3000' + ]; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js new file mode 100644 index 00000000..aadb69a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js @@ -0,0 +1,20 @@ +var toString = require('../lang/toString'); +var replaceAccents = require('./replaceAccents'); +var removeNonWord = require('./removeNonWord'); +var upperCase = require('./upperCase'); +var lowerCase = require('./lowerCase'); + /** + * Convert string to camelCase text. + */ + function camelCase(str){ + str = toString(str); + str = replaceAccents(str); + str = removeNonWord(str) + .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces + .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE + .replace(/\s+/g, '') //remove spaces + .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase + return str; + } + module.exports = camelCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js new file mode 100644 index 00000000..cb22cae4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); + + /** + * Searches for a given substring + */ + function contains(str, substring, fromIndex){ + str = toString(str); + substring = toString(substring); + return str.indexOf(substring, fromIndex) !== -1; + } + + module.exports = contains; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js new file mode 100644 index 00000000..53b93b49 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js @@ -0,0 +1,12 @@ +var toString = require('../lang/toString'); +var truncate = require('./truncate'); + /** + * Truncate string at full words. + */ + function crop(str, maxChars, append) { + str = toString(str); + return truncate(str, maxChars, append, true); + } + + module.exports = crop; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js new file mode 100644 index 00000000..d504e9dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + /** + * Checks if string ends with specified suffix. + */ + function endsWith(str, suffix) { + str = toString(str); + suffix = toString(suffix); + + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + + module.exports = endsWith; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js new file mode 100644 index 00000000..e67c4b21 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Escapes a string for insertion into HTML. + */ + function escapeHtml(str){ + str = toString(str) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/'/g, ''') + .replace(/"/g, '"'); + return str; + } + + module.exports = escapeHtml; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js new file mode 100644 index 00000000..70cb84ff --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); + + var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; + + /** + * Escape RegExp string chars. + */ + function escapeRegExp(str) { + str = toString(str); + return str.replace(ESCAPE_CHARS,'\\$&'); + } + + module.exports = escapeRegExp; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js new file mode 100644 index 00000000..ec649adf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js @@ -0,0 +1,21 @@ +var toString = require('../lang/toString'); + + /** + * Escape string into unicode sequences + */ + function escapeUnicode(str, shouldEscapePrintable){ + str = toString(str); + return str.replace(/[\s\S]/g, function(ch){ + // skip printable ASCII chars if we should not escape them + if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { + return ch; + } + // we use "000" and slice(-4) for brevity, need to pad zeros, + // unicode escape always have 4 chars after "\u" + return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); + }); + } + + module.exports = escapeUnicode; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js new file mode 100644 index 00000000..95e32436 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); +var slugify = require('./slugify'); +var unCamelCase = require('./unCamelCase'); + /** + * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function hyphenate(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "-"); + } + + module.exports = hyphenate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js new file mode 100644 index 00000000..ac88fac2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + var stache = /\{\{(\w+)\}\}/g; //mustache-like + + /** + * String interpolation + */ + function interpolate(template, replacements, syntax){ + template = toString(template); + var replaceFn = function(match, prop){ + return (prop in replacements)? toString(replacements[prop]) : ''; + }; + return template.replace(syntax || stache, replaceFn); + } + + module.exports = interpolate; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js new file mode 100644 index 00000000..30bb7ad9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * "Safer" String.toLowerCase() + */ + function lowerCase(str){ + str = toString(str); + return str.toLowerCase(); + } + + module.exports = lowerCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js new file mode 100644 index 00000000..694d711e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js @@ -0,0 +1,17 @@ +var toString = require('../lang/toString'); +var repeat = require('./repeat'); + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function lpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + + return ((str.length < minLen) + ? repeat(ch, minLen - str.length) + str : str); + } + + module.exports = lpad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js new file mode 100644 index 00000000..23d7b33f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js @@ -0,0 +1,34 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); + /** + * Remove chars from beginning of string. + */ + function ltrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var start = 0, + len = str.length, + charLen = chars.length, + found = true, + i, c; + + while (found && start < len) { + found = false; + i = -1; + c = str.charAt(start); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + start++; + break; + } + } + } + + return (start >= len) ? '' : str.substr(start, len); + } + + module.exports = ltrim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js new file mode 100644 index 00000000..69aef310 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js @@ -0,0 +1,13 @@ +var join = require('../array/join'); + + /** + * Group arguments as path segments, if any of the args is `null` or an + * empty string it will be ignored from resulting path. + */ + function makePath(var_args){ + var result = join(Array.prototype.slice.call(arguments), '/'); + return result.replace(/\/{2,}/g, '/'); + } + + module.exports = makePath; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js new file mode 100644 index 00000000..8a8dccfd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) + */ + function normalizeLineBreaks(str, lineEnd) { + str = toString(str); + lineEnd = lineEnd || '\n'; + + return str + .replace(/\r\n/g, lineEnd) // DOS + .replace(/\r/g, lineEnd) // Mac + .replace(/\n/g, lineEnd); // Unix + } + + module.exports = normalizeLineBreaks; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js new file mode 100644 index 00000000..fd190353 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var camelCase = require('./camelCase'); +var upperCase = require('./upperCase'); + /** + * camelCase + UPPERCASE first char + */ + function pascalCase(str){ + str = toString(str); + return camelCase(str).replace(/^[a-z]/, upperCase); + } + + module.exports = pascalCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js new file mode 100644 index 00000000..61636be4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var lowerCase = require('./lowerCase'); +var upperCase = require('./upperCase'); + /** + * UPPERCASE first char of each word. + */ + function properCase(str){ + str = toString(str); + return lowerCase(str).replace(/^\w|\s\w/g, upperCase); + } + + module.exports = properCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js new file mode 100644 index 00000000..fb463816 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); + /** + * Remove non-printable ASCII chars + */ + function removeNonASCII(str){ + str = toString(str); + + // Matches non-printable ASCII chars - + // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters + return str.replace(/[^\x20-\x7E]/g, ''); + } + + module.exports = removeNonASCII; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js new file mode 100644 index 00000000..bdd153b9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * Remove non-word chars. + */ + function removeNonWord(str){ + str = toString(str); + return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); + } + + module.exports = removeNonWord; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js new file mode 100644 index 00000000..0f9b4754 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + + /** + * Repeat string n times + */ + function repeat(str, n){ + str = toString(str); + return (new Array(n + 1)).join(str); + } + + module.exports = repeat; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js new file mode 100644 index 00000000..14433fc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js @@ -0,0 +1,33 @@ +var toString = require('../lang/toString'); +var toArray = require('../lang/toArray'); + + /** + * Replace string(s) with the replacement(s) in the source. + */ + function replace(str, search, replacements) { + str = toString(str); + search = toArray(search); + replacements = toArray(replacements); + + var searchLength = search.length, + replacementsLength = replacements.length; + + if (replacementsLength !== 1 && searchLength !== replacementsLength) { + throw new Error('Unequal number of searches and replacements'); + } + + var i = -1; + while (++i < searchLength) { + // Use the first replacement for all searches if only one + // replacement is provided + str = str.replace( + search[i], + replacements[(replacementsLength === 1) ? 0 : i]); + } + + return str; + } + + module.exports = replace; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js new file mode 100644 index 00000000..bb221265 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js @@ -0,0 +1,36 @@ +var toString = require('../lang/toString'); + /** + * Replaces all accented chars with regular ones + */ + function replaceAccents(str){ + str = toString(str); + + // verifies if the String has accents and replace them + if (str.search(/[\xC0-\xFF]/g) > -1) { + str = str + .replace(/[\xC0-\xC5]/g, "A") + .replace(/[\xC6]/g, "AE") + .replace(/[\xC7]/g, "C") + .replace(/[\xC8-\xCB]/g, "E") + .replace(/[\xCC-\xCF]/g, "I") + .replace(/[\xD0]/g, "D") + .replace(/[\xD1]/g, "N") + .replace(/[\xD2-\xD6\xD8]/g, "O") + .replace(/[\xD9-\xDC]/g, "U") + .replace(/[\xDD]/g, "Y") + .replace(/[\xDE]/g, "P") + .replace(/[\xE0-\xE5]/g, "a") + .replace(/[\xE6]/g, "ae") + .replace(/[\xE7]/g, "c") + .replace(/[\xE8-\xEB]/g, "e") + .replace(/[\xEC-\xEF]/g, "i") + .replace(/[\xF1]/g, "n") + .replace(/[\xF2-\xF6\xF8]/g, "o") + .replace(/[\xF9-\xFC]/g, "u") + .replace(/[\xFE]/g, "p") + .replace(/[\xFD\xFF]/g, "y"); + } + return str; + } + module.exports = replaceAccents; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js new file mode 100644 index 00000000..99f6378d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var repeat = require('./repeat'); + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function rpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; + } + + module.exports = rpad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js new file mode 100644 index 00000000..66ba80e9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js @@ -0,0 +1,33 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); + /** + * Remove chars from end of string. + */ + function rtrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var end = str.length - 1, + charLen = chars.length, + found = true, + i, c; + + while (found && end >= 0) { + found = false; + i = -1; + c = str.charAt(end); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + end--; + break; + } + } + } + + return (end >= 0) ? str.substring(0, end + 1) : ''; + } + + module.exports = rtrim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js new file mode 100644 index 00000000..354104c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var lowerCase = require('./lowerCase'); +var upperCase = require('./upperCase'); + /** + * UPPERCASE first char of each sentence and lowercase other chars. + */ + function sentenceCase(str){ + str = toString(str); + + // Replace first char of each sentence (new line or after '.\s+') to + // UPPERCASE + return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); + } + module.exports = sentenceCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js new file mode 100644 index 00000000..142f0d9b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js @@ -0,0 +1,24 @@ +var toString = require('../lang/toString'); +var replaceAccents = require('./replaceAccents'); +var removeNonWord = require('./removeNonWord'); +var trim = require('./trim'); + /** + * Convert to lower case, remove accents, remove non-word chars and + * replace spaces with the specified delimeter. + * Does not split camelCase text. + */ + function slugify(str, delimeter){ + str = toString(str); + + if (delimeter == null) { + delimeter = "-"; + } + str = replaceAccents(str); + str = removeNonWord(str); + str = trim(str) //should come after removeNonWord + .replace(/ +/g, delimeter) //replace spaces with delimeter + .toLowerCase(); + return str; + } + module.exports = slugify; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js new file mode 100644 index 00000000..bce2bd20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + /** + * Checks if string starts with specified prefix. + */ + function startsWith(str, prefix) { + str = toString(str); + prefix = toString(prefix); + + return str.indexOf(prefix) === 0; + } + + module.exports = startsWith; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js new file mode 100644 index 00000000..01d17b0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * Remove HTML tags from string. + */ + function stripHtmlTags(str){ + str = toString(str); + + return str.replace(/<[^>]*>/g, ''); + } + module.exports = stripHtmlTags; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js new file mode 100644 index 00000000..9652b0c7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); +var ltrim = require('./ltrim'); +var rtrim = require('./rtrim'); + /** + * Remove white-spaces from beginning and end of string. + */ + function trim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + return ltrim(rtrim(str, chars), chars); + } + + module.exports = trim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js new file mode 100644 index 00000000..a98d6c7d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js @@ -0,0 +1,21 @@ +var toString = require('../lang/toString'); +var trim = require('./trim'); + /** + * Limit number of chars. + */ + function truncate(str, maxChars, append, onlyFullWords){ + str = toString(str); + append = append || '...'; + maxChars = onlyFullWords? maxChars + 1 : maxChars; + + str = trim(str); + if(str.length <= maxChars){ + return str; + } + str = str.substr(0, maxChars - append.length); + //crop at last space or remove trailing whitespace + str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); + return str + append; + } + module.exports = truncate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js new file mode 100644 index 00000000..c1386a49 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js @@ -0,0 +1,29 @@ + + + var UNDEF; + + /** + * Parses string and convert it into a native value. + */ + function typecast(val) { + var r; + if ( val === null || val === 'null' ) { + r = null; + } else if ( val === 'true' ) { + r = true; + } else if ( val === 'false' ) { + r = false; + } else if ( val === UNDEF || val === 'undefined' ) { + r = UNDEF; + } else if ( val === '' || isNaN(val) ) { + //isNaN('') returns false + r = val; + } else { + //parseFloat(null || '') returns NaN + r = parseFloat(val); + } + return r; + } + + module.exports = typecast; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js new file mode 100644 index 00000000..4968f378 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js @@ -0,0 +1,23 @@ +var toString = require('../lang/toString'); + + var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; + + /** + * Add space between camelCase text. + */ + function unCamelCase(str, delimiter){ + if (delimiter == null) { + delimiter = ' '; + } + + function join(str, c1, c2) { + return c1 + delimiter + c2; + } + + str = toString(str); + str = str.replace(CAMEL_CASE_BORDER, join); + str = str.toLowerCase(); //add space between camelCase text + return str; + } + module.exports = unCamelCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js new file mode 100644 index 00000000..ebd6e2b7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var slugify = require('./slugify'); +var unCamelCase = require('./unCamelCase'); + /** + * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function underscore(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "_"); + } + module.exports = underscore; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js new file mode 100644 index 00000000..52cf3f45 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Unescapes HTML special chars + */ + function unescapeHtml(str){ + str = toString(str) + .replace(/&/g , '&') + .replace(/</g , '<') + .replace(/>/g , '>') + .replace(/'/g , "'") + .replace(/"/g, '"'); + return str; + } + + module.exports = unescapeHtml; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js new file mode 100644 index 00000000..0b7fb73b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js @@ -0,0 +1,16 @@ +var toString = require('../lang/toString'); + + /** + * Unescape unicode char sequences + */ + function unescapeUnicode(str){ + str = toString(str); + return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ + var code = parseInt(ch.slice(2), 16); + return String.fromCharCode(code); + }); + } + + module.exports = unescapeUnicode; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js new file mode 100644 index 00000000..311dfa17 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js @@ -0,0 +1,10 @@ +var toString = require('../lang/toString'); + /** + * Replaces hyphens with spaces. (only hyphens between word chars) + */ + function unhyphenate(str){ + str = toString(str); + return str.replace(/(\w)(-)(\w)/g, '$1 $3'); + } + module.exports = unhyphenate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js new file mode 100644 index 00000000..6c92552c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js @@ -0,0 +1,10 @@ +var toString = require('../lang/toString'); + /** + * "Safer" String.toUpperCase() + */ + function upperCase(str){ + str = toString(str); + return str.toUpperCase(); + } + module.exports = upperCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time.js new file mode 100644 index 00000000..9f533296 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time.js @@ -0,0 +1,12 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'convert' : require('./time/convert'), + 'now' : require('./time/now'), + 'parseMs' : require('./time/parseMs'), + 'toTimeString' : require('./time/toTimeString') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js new file mode 100644 index 00000000..852a0f03 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js @@ -0,0 +1,41 @@ + + + /** + * convert time into another unit + */ + function convert(val, sourceUnitName, destinationUnitName){ + destinationUnitName = destinationUnitName || 'ms'; + return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); + } + + + //TODO: maybe extract to a separate module + function getUnit(unitName){ + switch(unitName){ + case 'ms': + case 'millisecond': + return 1; + case 's': + case 'second': + return 1000; + case 'm': + case 'minute': + return 60000; + case 'h': + case 'hour': + return 3600000; + case 'd': + case 'day': + return 86400000; + case 'w': + case 'week': + return 604800000; + default: + throw new Error('"'+ unitName + '" is not a valid unit'); + } + } + + + module.exports = convert; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js new file mode 100644 index 00000000..effcfbe3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js @@ -0,0 +1,12 @@ + + + /** + * Get current time in miliseconds + */ + var now = (typeof Date.now === 'function')? Date.now : function(){ + return +(new Date()); + }; + + module.exports = now; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js new file mode 100644 index 00000000..6d997976 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js @@ -0,0 +1,17 @@ +var countSteps = require('../math/countSteps'); + + /** + * Parse timestamp into an object. + */ + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + module.exports = parseMs; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js new file mode 100644 index 00000000..101d69fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js @@ -0,0 +1,24 @@ +var countSteps = require('../math/countSteps'); +var pad = require('../number/pad'); + + var HOUR = 3600000, + MINUTE = 60000, + SECOND = 1000; + + /** + * Format timestamp into a time string. + */ + function toTimeString(ms){ + var h = ms < HOUR ? 0 : countSteps(ms, HOUR), + m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), + s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), + str = ''; + + str += h? h + ':' : ''; + str += pad(m, 2) + ':'; + str += pad(s, 2); + + return str; + } + module.exports = toTimeString; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore new file mode 100644 index 00000000..f1250e58 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/History.md new file mode 100644 index 00000000..88119480 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/History.md @@ -0,0 +1,42 @@ + +1.0.0 / 2013-06-18 +================== + + * remove .version + * >=. Closes #19 + * Merge pull request #15 from davglass/readline-osx + * On OSX revert back to terminal hack to avoid a readline bug + +0.1.0 / 2012-09-19 +================== + + * Fixed logic bug that caused bar to jump one extra space at the end [davglass] + * Working with readline impl, even on Windows [davglass] + * Using readline instead of the \r hack [davglass] + +0.0.5 / 2012-08-07 +================== + + * add ability to tick by zero chunks - tick(0) + * fix ETA. Closes #4 [lwille] + +0.0.4 / 2011-11-14 +================== + + * Allow more recent versions of node + +0.0.3 / 2011-04-20 +================== + + * Changed; erase the line when complete + +0.0.2 / 2011-04-20 +================== + + * Added custom tokens support + * Fixed; clear line before writing + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Makefile new file mode 100644 index 00000000..36a3ed7d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Makefile @@ -0,0 +1,5 @@ + +test: + @echo "populate me" + +.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md new file mode 100644 index 00000000..4e08a49b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md @@ -0,0 +1,117 @@ +# node-progress + + Flexible ascii progress bar + +## Installation + + npm install progress + +## Usage + + First we create a `ProgressBar`, giving it a format string + as well as the `total`, telling the progress bar when it will + be considered complete. After that all we need to do is `tick()` appropriately. + +```javascript +var ProgressBar = require('progress'); + +var bar = new ProgressBar(':bar', { total: 10 }); +var timer = setInterval(function(){ + bar.tick(); + if (bar.complete) { + console.log('\ncomplete\n'); + clearInterval(timer); + } +}, 100); +``` + +## Options: + + - `total` total number of ticks to complete + - `width` the displayed width of the progress bar defaulting to total + - `stream` the output stream defaulting to stdout + - `complete` completion character defaulting to "=" + - `incomplete` incomplete character defaulting to "-" + - `clear` option to clear the bar on completion defaulting to false + - `callback` optional function to call when the progress bar completes + +## Tokens: + + - `:bar` the progress bar itself + - `:current` current tick number + - `:total` total ticks + - `:elapsed` time elapsed in seconds + - `:percent` completion percentage + - `:eta` estimated completion time in seconds + +## Examples + +### Download + + In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length. + +```javascript +var ProgressBar = require('../') + , https = require('https'); + +var req = https.request({ + host: 'download.github.com' + , port: 443 + , path: '/visionmedia-node-jscoverage-0d4608a.zip' +}); + +req.on('response', function(res){ + var len = parseInt(res.headers['content-length'], 10); + + console.log(); + var bar = new ProgressBar(' downloading [:bar] :percent :etas', { + complete: '=' + , incomplete: ' ' + , width: 20 + , total: len + }); + + res.on('data', function(chunk){ + bar.tick(chunk.length); + }); + + res.on('end', function(){ + console.log('\n'); + }); +}); + +req.end(); +``` + + The code above will generate a progress bar that looks like this: + +``` +downloading [===== ] 29% 3.7s +``` + +You can see more examples in the `examples` folder. + +## License + +(The MIT License) + +Copyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>` + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/index.js new file mode 100644 index 00000000..4449dd30 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/node-progress'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js new file mode 100644 index 00000000..ca0ce4f0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js @@ -0,0 +1,183 @@ +/*! + * node-progress + * Copyright(c) 2011 TJ Holowaychuk + * MIT Licensed + */ + +/** + * Expose `ProgressBar`. + */ + +exports = module.exports = ProgressBar; + +/** + * Initialize a `ProgressBar` with the given + * `fmt` string and `options` or `total`. + * + * Options: + * + * - `total` total number of ticks to complete + * - `width` the displayed width of the progress bar defaulting to total + * - `stream` the output stream defaulting to stdout + * - `complete` completion character defaulting to "=" + * - `incomplete` incomplete character defaulting to "-" + * - `callback` optional function to call when the progress bar completes + * + * Tokens: + * + * - `:bar` the progress bar itself + * - `:current` current tick number + * - `:total` total ticks + * - `:elapsed` time elapsed in seconds + * - `:percent` completion percentage + * - `:eta` eta in seconds + * + * @param {String} fmt + * @param {Object|Number} options or total + * @api public + */ + +function ProgressBar(fmt, options) { + this.rl = require('readline').createInterface({ + input: process.stdin, + output: options.stream || process.stdout + }); + this.rl.setPrompt('', 0); + this.rl.clearLine = function() { + this.write(null, {ctrl: true, name: 'u'}); + }; + + if (typeof(options) == 'number') { + var total = options; + options = {}; + options.total = total; + } else { + options = options || {}; + if ('string' != typeof fmt) throw new Error('format required'); + if ('number' != typeof options.total) throw new Error('total required'); + } + + this.fmt = fmt; + this.curr = 0; + this.total = options.total; + this.width = options.width || this.total; + this.clear = options.clear + this.chars = { + complete: options.complete || '=' + , incomplete: options.incomplete || '-' + }; + this.callback = options.callback || function () {}; +} + +/** + * "tick" the progress bar with optional `len` and + * optional `tokens`. + * + * @param {Number|Object} len or tokens + * @param {Object} tokens + * @api public + */ + +ProgressBar.prototype.tick = function(len, tokens){ + if (len !== 0) + len = len || 1; + + // swap tokens + if ('object' == typeof len) tokens = len, len = 1; + + // start time for eta + if (0 == this.curr) this.start = new Date; + + this.curr += len + this.render(tokens); + + // progress complete + if (this.curr >= this.total) { + this.complete = true; + this.terminate(); + this.callback(this); + return; + } +}; + +/** + * Method to render the progress bar with optional `tokens` to + * place in the progress bar's `fmt` field. + * + * @param {Object} tokens + * @api public + */ + +ProgressBar.prototype.render = function(tokens){ + if(!process.stdout.isTTY) { + return; + } + + var ratio = this.curr / this.total; + ratio = Math.min(Math.max(ratio, 0), 1); + + var percent = ratio * 100 + , complete = Math.round(this.width * ratio) + , incomplete + , elapsed = new Date - this.start + , eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); + + complete = Array(complete).join(this.chars.complete); + incomplete = Array(this.width - complete.length).join(this.chars.incomplete); + + var str = this.fmt + .replace(':bar', complete + incomplete) + .replace(':current', this.curr) + .replace(':total', this.total) + .replace(':elapsed', isNaN(elapsed) ? "0.0" : (elapsed / 1000).toFixed(1)) + .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? "0.0" : (eta / 1000).toFixed(1)) + .replace(':percent', percent.toFixed(0) + '%'); + + if (tokens) { + for (var key in tokens) { + str = str.replace(':' + key, tokens[key]); + } + } + + this.rl.clearLine(); + this.rl.write(str); +}; + +/** + * "update" the progress bar to represent an exact percentage. + * The ratio (between 0 and 1) specified will be multiplied by `total` and + * floored, representing the closest available "tick." For example, if a + * progress bar has a length of 3 and `update(0.5)` is called, the progress + * will be set to 1. + * + * A ratio of 0.5 will attempt to set the progress to halfway. + * + * @param {Number} ratio The ratio (between 0 and 1 inclusive) to set the + * overall completion to. + * @api public + */ + +ProgressBar.prototype.update = function(ratio, tokens) { + var goal = Math.floor(ratio * this.total); + var delta = goal - this.curr; + + this.tick(delta, tokens); +}; + +/** + * Terminates a progress bar. + * + * @api public + */ + +ProgressBar.prototype.terminate = function() { + this.rl.resume(); + + if (this.clear) { + this.rl.clearLine(); + this.rl.close(); + } else { + this.rl.close(); + console.log(); + } +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/package.json new file mode 100644 index 00000000..c4744b51 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/package.json @@ -0,0 +1,34 @@ +{ + "name": "progress", + "version": "1.1.3", + "description": "Flexible ascii progress bar", + "keywords": [ + "cli", + "progress" + ], + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "dependencies": {}, + "main": "index", + "engines": { + "node": ">=0.4.0" + }, + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/node-progress" + }, + "readme": "# node-progress\n\n Flexible ascii progress bar\n\n## Installation\n\n npm install progress\n\n## Usage\n\n First we create a `ProgressBar`, giving it a format string\n as well as the `total`, telling the progress bar when it will\n be considered complete. After that all we need to do is `tick()` appropriately.\n\n```javascript\nvar ProgressBar = require('progress');\n\nvar bar = new ProgressBar(':bar', { total: 10 });\nvar timer = setInterval(function(){\n bar.tick();\n if (bar.complete) {\n console.log('\\ncomplete\\n');\n clearInterval(timer);\n }\n}, 100);\n```\n\n## Options:\n\n - `total` total number of ticks to complete\n - `width` the displayed width of the progress bar defaulting to total\n - `stream` the output stream defaulting to stdout\n - `complete` completion character defaulting to \"=\"\n - `incomplete` incomplete character defaulting to \"-\"\n - `clear` option to clear the bar on completion defaulting to false\n - `callback` optional function to call when the progress bar completes\n\n## Tokens:\n\n - `:bar` the progress bar itself\n - `:current` current tick number\n - `:total` total ticks\n - `:elapsed` time elapsed in seconds\n - `:percent` completion percentage\n - `:eta` estimated completion time in seconds\n\n## Examples\n\n### Download\n\n In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length.\n\n```javascript\nvar ProgressBar = require('../')\n , https = require('https');\n\nvar req = https.request({\n host: 'download.github.com'\n , port: 443\n , path: '/visionmedia-node-jscoverage-0d4608a.zip'\n});\n\nreq.on('response', function(res){\n var len = parseInt(res.headers['content-length'], 10);\n\n console.log();\n var bar = new ProgressBar(' downloading [:bar] :percent :etas', {\n complete: '='\n , incomplete: ' '\n , width: 20\n , total: len\n });\n\n res.on('data', function(chunk){\n bar.tick(chunk.length);\n });\n\n res.on('end', function(){\n console.log('\\n');\n });\n});\n\nreq.end();\n```\n\n The code above will generate a progress bar that looks like this:\n\n```\ndownloading [===== ] 29% 3.7s\n```\n\nYou can see more examples in the `examples` folder.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>`\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "Readme.md", + "bugs": { + "url": "https://github.com/visionmedia/node-progress/issues" + }, + "homepage": "https://github.com/visionmedia/node-progress", + "_id": "progress@1.1.3", + "dist": { + "shasum": "42f89c5fc3b6f0408a0bdd68993b174f96aababf" + }, + "_from": "progress@~1.1.0", + "_resolved": "https://registry.npmjs.org/progress/-/progress-1.1.3.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS new file mode 100644 index 00000000..247b7543 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS @@ -0,0 +1,6 @@ +# Authors sorted by whether or not they're me. +Isaac Z. Schlueter (http://blog.izs.me) +Wayne Larsen (http://github.com/wvl) +ritch +Marcel Laverdet +Yosef Dinerstein diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE new file mode 100644 index 00000000..05a40109 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md new file mode 100644 index 00000000..cd123b65 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md @@ -0,0 +1,30 @@ +`rm -rf` for node. + +Install with `npm install rimraf`, or just drop rimraf.js somewhere. + +## API + +`rimraf(f, callback)` + +The callback will be called with an error if there is one. Certain +errors are handled for you: + +* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of + `opts.maxBusyTries` times before giving up. +* `ENOENT` - If the file doesn't exist, rimraf will return + successfully, since your desired outcome is already the case. + +## rimraf.sync + +It can remove stuff synchronously, too. But that's not so good. Use +the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf ` which is useful for cross platform support. + +## mkdirp + +If you need to create a directory recursively, check out +[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js new file mode 100755 index 00000000..29bfa8a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}); + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf ') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + process.exit(help ? 0 : 1) +} else { + args.forEach(function(arg) { + rimraf.sync(arg) + }) +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json new file mode 100644 index 00000000..211cc9dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json @@ -0,0 +1,60 @@ +{ + "name": "rimraf", + "version": "2.2.6", + "main": "rimraf.js", + "description": "A deep deletion module for node (like `rm -rf`)", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": { + "type": "MIT", + "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "test": "cd test && bash run.sh" + }, + "bin": { + "rimraf": "./bin.js" + }, + "contributors": [ + { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + { + "name": "Wayne Larsen", + "email": "wayne@larsen.st", + "url": "http://github.com/wvl" + }, + { + "name": "ritch", + "email": "skawful@gmail.com" + }, + { + "name": "Marcel Laverdet" + }, + { + "name": "Yosef Dinerstein", + "email": "yosefd@microsoft.com" + } + ], + "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf ` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" + }, + "homepage": "https://github.com/isaacs/rimraf", + "_id": "rimraf@2.2.6", + "dist": { + "shasum": "7ada6a6d39b2301af3c8fe7b936c2e46e7c4463d" + }, + "_from": "rimraf@~2.2.6", + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js new file mode 100644 index 00000000..ce62051f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js @@ -0,0 +1,178 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var path = require("path") +var fs = require("fs") + +// for EMFILE handling +var timeout = 0 +exports.EMFILE_MAX = 1000 +exports.BUSYTRIES_MAX = 3 + +var isWindows = (process.platform === "win32") + +function rimraf (p, cb) { + if (!cb) throw new Error("No callback passed to rimraf()") + + var busyTries = 0 + rimraf_(p, function CB (er) { + if (er) { + if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && + busyTries < exports.BUSYTRIES_MAX) { + busyTries ++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, CB) + }, time) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { + return setTimeout(function () { + rimraf_(p, CB) + }, timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + cb(er) + }) +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, cb) { + fs.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) + if (er.code === "EISDIR") + return rmdir(p, er, cb) + } + return cb(er) + }) +} + +function fixWinEPERM (p, er, cb) { + fs.chmod(p, 666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + fs.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, er, cb) + else + fs.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, er, cb) { + try { + fs.chmodSync(p, 666) + } catch (er2) { + if (er2.code !== "ENOENT") + throw er + } + + try { + var stats = fs.statSync(p) + } catch (er3) { + if (er3 !== "ENOENT") + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, er) + else + fs.unlinkSync(p) +} + +function rmdir (p, originalEr, cb) { + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + fs.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, cb) { + fs.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return fs.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + fs.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p) { + try { + fs.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) + if (er.code !== "EISDIR") + throw er + rmdirSync(p, er) + } +} + +function rmdirSync (p, originalEr) { + try { + fs.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p) + } +} + +function rmkidsSync (p) { + fs.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f)) + }) + fs.rmdirSync(p) +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh new file mode 100644 index 00000000..598f0163 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e +for i in test-*.js; do + echo -n $i ... + bash setup.sh + node $i + ! [ -d target ] + echo "pass" +done +rm -rf target diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh new file mode 100644 index 00000000..2602e631 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -e + +files=10 +folders=2 +depth=4 +target="$PWD/target" + +rm -rf target + +fill () { + local depth=$1 + local files=$2 + local folders=$3 + local target=$4 + + if ! [ -d $target ]; then + mkdir -p $target + fi + + local f + + f=$files + while [ $f -gt 0 ]; do + touch "$target/f-$depth-$f" + let f-- + done + + let depth-- + + if [ $depth -le 0 ]; then + return 0 + fi + + f=$folders + while [ $f -gt 0 ]; do + mkdir "$target/folder-$depth-$f" + fill $depth $files $folders "$target/d-$depth-$f" + let f-- + done +} + +fill $depth $files $folders $target + +# sanity assert +[ -d $target ] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js new file mode 100644 index 00000000..9c2e0b7b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js @@ -0,0 +1,5 @@ +var rimraf = require("../rimraf") + , path = require("path") +rimraf(path.join(__dirname, "target"), function (er) { + if (er) throw er +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js new file mode 100644 index 00000000..eb71f104 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js @@ -0,0 +1,3 @@ +var rimraf = require("../rimraf") + , path = require("path") +rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/LICENSE new file mode 100644 index 00000000..05a40109 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/README.md new file mode 100644 index 00000000..ff1eb531 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/README.md @@ -0,0 +1,5 @@ +The "which" util from npm's guts. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/bin/which new file mode 100755 index 00000000..8432ce2f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/bin/which @@ -0,0 +1,14 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) { + console.error("Usage: which ") + process.exit(1) +} + +which(process.argv[2], function (er, thing) { + if (er) { + console.error(er.message) + process.exit(er.errno || 127) + } + console.log(thing) +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/package.json new file mode 100644 index 00000000..f1938b07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/package.json @@ -0,0 +1,35 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "which", + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "version": "1.0.5", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "main": "which.js", + "bin": { + "which": "./bin/which" + }, + "engines": { + "node": "*" + }, + "dependencies": {}, + "devDependencies": {}, + "readme": "The \"which\" util from npm's guts.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "homepage": "https://github.com/isaacs/node-which", + "_id": "which@1.0.5", + "dist": { + "shasum": "195619a6ad7e8fefd0aa76445a6d4c8d370a322c" + }, + "_from": "which@~1.0.5", + "_resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/which.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/which.js new file mode 100644 index 00000000..db7e8f74 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/which.js @@ -0,0 +1,104 @@ +module.exports = which +which.sync = whichSync + +var path = require("path") + , fs + , COLON = process.platform === "win32" ? ";" : ":" + , isExe + +try { + fs = require("graceful-fs") +} catch (ex) { + fs = require("fs") +} + +if (process.platform == "win32") { + // On windows, there is no good way to check that a file is executable + isExe = function isExe () { return true } +} else { + isExe = function isExe (mod, uid, gid) { + //console.error(mod, uid, gid); + //console.error("isExe?", (mod & 0111).toString(8)) + var ret = (mod & 0001) + || (mod & 0010) && process.getgid && gid === process.getgid() + || (mod & 0100) && process.getuid && uid === process.getuid() + //console.error("isExe?", ret) + return ret + } +} + + + +function which (cmd, cb) { + if (isAbsolute(cmd)) return cb(null, cmd) + var pathEnv = (process.env.PATH || "").split(COLON) + , pathExt = [""] + if (process.platform === "win32") { + pathEnv.push(process.cwd()) + pathExt = (process.env.PATHEXT || ".EXE").split(COLON) + if (cmd.indexOf(".") !== -1) pathExt.unshift("") + } + //console.error("pathEnv", pathEnv) + ;(function F (i, l) { + if (i === l) return cb(new Error("not found: "+cmd)) + var p = path.resolve(pathEnv[i], cmd) + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + //console.error(p + ext) + fs.stat(p + ext, function (er, stat) { + if (!er && + stat && + stat.isFile() && + isExe(stat.mode, stat.uid, stat.gid)) { + //console.error("yes, exe!", p + ext) + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd) { + if (isAbsolute(cmd)) return cmd + var pathEnv = (process.env.PATH || "").split(COLON) + , pathExt = [""] + if (process.platform === "win32") { + pathEnv.push(process.cwd()) + pathExt = (process.env.PATHEXT || ".EXE").split(COLON) + if (cmd.indexOf(".") !== -1) pathExt.unshift("") + } + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var p = path.join(pathEnv[i], cmd) + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var stat + try { stat = fs.statSync(cur) } catch (ex) {} + if (stat && + stat.isFile() && + isExe(stat.mode, stat.uid, stat.gid)) return cur + } + } + throw new Error("not found: "+cmd) +} + +var isAbsolute = process.platform === "win32" ? absWin : absUnix + +function absWin (p) { + if (absUnix(p)) return true + // pull off the device/UNC bit from a windows path. + // from node's lib/path.js + var splitDeviceRe = + /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ + , result = splitDeviceRe.exec(p) + , device = result[1] || '' + , isUnc = device && device.charAt(1) !== ':' + , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute + + return isAbsolute +} + +function absUnix (p) { + return p.charAt(0) === "/" || p === "" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/package.json new file mode 100644 index 00000000..66d4488e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/package.json @@ -0,0 +1,54 @@ +{ + "name": "bin-wrapper", + "version": "0.1.9", + "description": "Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies", + "keywords": [ + "bin", + "build", + "make", + "wrapper" + ], + "homepage": "https://github.com/kevva/bin-wrapper", + "bugs": { + "url": "https://github.com/kevva/bin-wrapper/issues" + }, + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "http://kevinmartensson.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/kevva/bin-wrapper.git" + }, + "scripts": { + "test": "mocha --reporter list --timeout 0" + }, + "main": "bin-wrapper.js", + "files": [ + "bin-wrapper.js" + ], + "dependencies": { + "download": "~0.1.2", + "isbin": "0.0.2", + "mout": "~0.6.0", + "progress": "~1.1.0", + "rimraf": "~2.2.6", + "which": "~1.0.5" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "readme": "# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper)\n\nBinary wrapper for Node.js that makes your programs seamlessly available as local dependencies\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper`\n\n## Examples\n\nAll `platform` and `arch` specific options takes precedence over the base \noptions. See [test.js](test.js) for a full fleshed example.\n\n```js\nvar Bin = require('bin-wrapper');\n\nvar opts = {\n name: 'Gifsicle',\n bin: 'gifsicle',\n path: 'vendor',\n url: 'http://url/to/gifsicle',\n src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz',\n buildScript: './configure --bindir=\"vendor\" && make install',\n platform: {\n win32: {\n bin: 'gifsicle.exe',\n url: [\n 'http://url/to/gifsicle.exe'\n 'http://url/to/gifsicle.dll'\n ]\n }\n }\n}\nvar bin = new Bin(opts);\n\nbin.check('--version', function (works) {\n if (!works) {\n console.log('Pre-build test failed, compiling from source');\n return bin.build();\n }\n\n console.log('Binary passed the test');\n});\n```\n\nGet the path to your binary with `bin.path`.\n\n```js\nconsole.log(bin.path);\n// => path/to/vendor/gifsicle\n```\n\n## API\n\n### .check(cmd, cb)\n\nCheck if a binary is present and working. If it isn't, download and test it by \nrunning the binary with `cmd` and see if it exits correctly.\n\n### .build(cb)\n\nDownload the source archive defined in the `src` property and build it using the \nbuild script defined in the `buildScript` property.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", + "readmeFilename": "README.md", + "_id": "bin-wrapper@0.1.9", + "dist": { + "shasum": "237ee496fb6049caedaba51ad9e62fc199a86060" + }, + "_from": "bin-wrapper@~0.1.3", + "_resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-0.1.9.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/chalk.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/chalk.js new file mode 100644 index 00000000..17c6dbab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/chalk.js @@ -0,0 +1,62 @@ +'use strict'; +var ansi = require('ansi-styles'); +var defineProps = Object.defineProperties; + +ansi.grey = ansi.gray; + +var styles = (function () { + var ret = {}; + + Object.keys(ansi).forEach(function (key) { + ret[key] = { + get: function () { + this._styles.push(key); + return this; + } + }; + }); + + return ret; +})(); + +var chalk = module.exports = defineProps({}, init()); + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + var obj = defineProps(function self(str) { + if (!chalk.enabled) { + return str; + } + + return self._styles.reduce(function (str, name) { + var code = ansi[name]; + return code[0] + (str || '') + code[1]; + }, str); + }, styles); + + obj._styles = []; + + return obj[name]; + } + } + }); + + return ret; +} + +chalk.styles = ansi; + +chalk.stripColor = function (str) { + return str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''); +}; + +chalk.supportsColor = require('has-color'); + +// detect mode if not set manually +if (chalk.enabled === undefined) { + chalk.enabled = chalk.supportsColor; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js new file mode 100644 index 00000000..56a5d19b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js @@ -0,0 +1,29 @@ +'use strict'; +module.exports = { + reset: ['\x1b[0m', '\x1b[0m'], + + bold: ['\x1b[1m', '\x1b[22m'], + italic: ['\x1b[3m', '\x1b[23m'], + underline: ['\x1b[4m', '\x1b[24m'], + inverse: ['\x1b[7m', '\x1b[27m'], + strikethrough: ['\x1b[9m', '\x1b[29m'], + + black: ['\x1b[30m', '\x1b[39m'], + red: ['\x1b[31m', '\x1b[39m'], + green: ['\x1b[32m', '\x1b[39m'], + yellow: ['\x1b[33m', '\x1b[39m'], + blue: ['\x1b[34m', '\x1b[39m'], + magenta: ['\x1b[35m', '\x1b[39m'], + cyan: ['\x1b[36m', '\x1b[39m'], + white: ['\x1b[37m', '\x1b[39m'], + gray: ['\x1B[90m', '\x1b[39m'], + + bgBlack: ['\x1b[40m', '\x1b[49m'], + bgRed: ['\x1b[41m', '\x1b[49m'], + bgGreen: ['\x1b[42m', '\x1b[49m'], + bgYellow: ['\x1b[43m', '\x1b[49m'], + bgBlue: ['\x1b[44m', '\x1b[49m'], + bgMagenta: ['\x1b[45m', '\x1b[49m'], + bgCyan: ['\x1b[46m', '\x1b[49m'], + bgWhite: ['\x1b[47m', '\x1b[49m'] +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..8acdb5e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/package.json @@ -0,0 +1,62 @@ +{ + "name": "ansi-styles", + "version": "0.2.0", + "description": "ANSI escape codes for colorizing strings in the terminal", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "homepage": "https://github.com/sindresorhus/ansi-styles", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-styles/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "ansi-styles.js" + ], + "main": "ansi-styles", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> ANSI escape codes for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green[0] + 'Hello world!' + ansi.green[1]);\n```\n\n## API\n\nEach style is an array of a start and end escape code.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "_id": "ansi-styles@0.2.0", + "dist": { + "shasum": "359ab4b15dcd64ba6d74734b72c36360a9af2c19" + }, + "_from": "ansi-styles@~0.2.0", + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..646837c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/readme.md @@ -0,0 +1,65 @@ +# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) + +> ANSI escape codes for colorizing strings in the terminal. + +You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. + +![screenshot](screenshot.png) + + +## Install + +Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` + + +## Example + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green[0] + 'Hello world!' + ansi.green[1]); +``` + +## API + +Each style is an array of a start and end escape code. + + +## Styles + +### General + +- reset +- bold +- italic +- underline +- inverse +- strikethrough + +### Text colors + +- black +- red +- green +- yellow +- blue +- magenta +- cyan +- white +- gray + +### Background colors + +- bgBlack +- bgRed +- bgGreen +- bgYellow +- bgBlue +- bgMagenta +- bgCyan +- bgWhite + + +## License + +MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/has-color.js new file mode 100644 index 00000000..27316b1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/has-color.js @@ -0,0 +1,24 @@ +'use strict'; +module.exports = (function () { + if (process.argv.indexOf('--no-color') !== -1) { + return false; + } + + if (process.argv.indexOf('--color') !== -1) { + return true; + } + + if (!process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); +})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/package.json new file mode 100644 index 00000000..d60b2d0a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/package.json @@ -0,0 +1,59 @@ +{ + "name": "has-color", + "version": "0.1.4", + "description": "Detect whether a terminal supports color", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "capability", + "detect" + ], + "homepage": "https://github.com/sindresorhus/has-color", + "bugs": { + "url": "https://github.com/sindresorhus/has-color/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "has-color.js" + ], + "main": "has-color", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/has-color.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "_id": "has-color@0.1.4", + "dist": { + "shasum": "d1dadeea5b9e8b446bf08603532333710c95a290" + }, + "_from": "has-color@~0.1.0", + "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.4.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/readme.md new file mode 100644 index 00000000..0918c851 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/readme.md @@ -0,0 +1,28 @@ +# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) + +> Detect whether a terminal supports color. + +Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). + + +## Install + +Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` + + +## Example + +```js +var hasColor = require('has-color'); + +if (hasColor) { + console.log('Terminal supports color.'); +} +``` + +It obeys the CLI flags `--color` and `--no-color`. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/package.json new file mode 100644 index 00000000..46a63f05 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/package.json @@ -0,0 +1,65 @@ +{ + "name": "chalk", + "version": "0.2.1", + "description": "Terminal string styling done right", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "ansi", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "homepage": "https://github.com/sindresorhus/chalk", + "bugs": { + "url": "https://github.com/sindresorhus/chalk/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "chalk.js" + ], + "main": "chalk", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/chalk.git" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "has-color": "~0.1.0", + "ansi-styles": "~0.2.0" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n> Terminal string styling done right.\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log(chalk.blue('Hello world!'));\n\n// combine styled and normal strings\nconsole.log(chalk.blue('Hello') + 'World' + chalk.red('!'));\n\n// compose multiple styles using the chainable API\nconsole.log(chalk.blue.bgRed.bold('Hello world!'));\n\n// nest styles\nchalk.red('Hello' + chalk.underline.bgBlue('world') + '!');\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.\\ + + + + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js new file mode 100644 index 00000000..24692256 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js @@ -0,0 +1,228 @@ +if (!this.uuid) { + // node.js + uuid = require('../uuid'); +} + +// +// x-platform log/assert shims +// + +function _log(msg, type) { + type = type || 'log'; + + if (typeof(document) != 'undefined') { + document.write('
' + msg.replace(/\n/g, '
') + '
'); + } + if (typeof(console) != 'undefined') { + var color = { + log: '\033[39m', + warn: '\033[33m', + error: '\033[31m' + }; + console[type](color[type] + msg + color.log); + } +} + +function log(msg) {_log(msg, 'log');} +function warn(msg) {_log(msg, 'warn');} +function error(msg) {_log(msg, 'error');} + +function assert(res, msg) { + if (!res) { + error('FAIL: ' + msg); + } else { + log('Pass: ' + msg); + } +} + +// +// Unit tests +// + +// Verify ordering of v1 ids created with explicit times +var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 + +function compare(name, ids) { + ids = ids.map(function(id) { + return id.split('-').reverse().join('-'); + }).sort(); + var sorted = ([].concat(ids)).sort(); + + assert(sorted.toString() == ids.toString(), name + ' have expected order'); +} + +// Verify ordering of v1 ids created using default behavior +compare('uuids with current time', [ + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1() +]); + +// Verify ordering of v1 ids created with explicit times +compare('uuids with time option', [ + uuid.v1({msecs: TIME - 10*3600*1000}), + uuid.v1({msecs: TIME - 1}), + uuid.v1({msecs: TIME}), + uuid.v1({msecs: TIME + 1}), + uuid.v1({msecs: TIME + 28*24*3600*1000}) +]); + +assert( + uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), + 'IDs created at same msec are different' +); + +// Verify throw if too many ids created +var thrown = false; +try { + uuid.v1({msecs: TIME, nsecs: 10000}); +} catch (e) { + thrown = true; +} +assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); + +// Verify clock regression bumps clockseq +var uidt = uuid.v1({msecs: TIME}); +var uidtb = uuid.v1({msecs: TIME - 1}); +assert( + parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, + 'Clock regression by msec increments the clockseq' +); + +// Verify clock regression bumps clockseq +var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); +var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); +assert( + parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, + 'Clock regression by nsec increments the clockseq' +); + +// Verify explicit options produce expected id +var id = uuid.v1({ + msecs: 1321651533573, + nsecs: 5432, + clockseq: 0x385c, + node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] +}); +assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); + +// Verify adjacent ids across a msec boundary are 1 time unit apart +var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); +var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); + +var before = u0.split('-')[0], after = u1.split('-')[0]; +var dt = parseInt(after, 16) - parseInt(before, 16); +assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); + +// +// Test parse/unparse +// + +id = '00112233445566778899aabbccddeeff'; +assert(uuid.unparse(uuid.parse(id.substr(0,10))) == + '00112233-4400-0000-0000-000000000000', 'Short parse'); +assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == + '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); + +// +// Perf tests +// + +var generators = { + v1: uuid.v1, + v4: uuid.v4 +}; + +var UUID_FORMAT = { + v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, + v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i +}; + +var N = 1e4; + +// Get %'age an actual value differs from the ideal value +function divergence(actual, ideal) { + return Math.round(100*100*(actual - ideal)/ideal)/100; +} + +function rate(msg, t) { + log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); +} + +for (var version in generators) { + var counts = {}, max = 0; + var generator = generators[version]; + var format = UUID_FORMAT[version]; + + log('\nSanity check ' + N + ' ' + version + ' uuids'); + for (var i = 0, ok = 0; i < N; i++) { + id = generator(); + if (!format.test(id)) { + throw Error(id + ' is not a valid UUID string'); + } + + if (id != uuid.unparse(uuid.parse(id))) { + assert(fail, id + ' is not a valid id'); + } + + // Count digits for our randomness check + if (version == 'v4') { + var digits = id.replace(/-/g, '').split(''); + for (var j = digits.length-1; j >= 0; j--) { + var c = digits[j]; + max = Math.max(max, counts[c] = (counts[c] || 0) + 1); + } + } + } + + // Check randomness for v4 UUIDs + if (version == 'v4') { + // Limit that we get worried about randomness. (Purely empirical choice, this!) + var limit = 2*100*Math.sqrt(1/N); + + log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); + + for (var i = 0; i < 16; i++) { + var c = i.toString(16); + var bar = '', n = counts[c], p = Math.round(n/max*100|0); + + // 1-3,5-8, and D-F: 1:16 odds over 30 digits + var ideal = N*30/16; + if (i == 4) { + // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1 + 30/16); + } else if (i >= 8 && i <= 11) { + // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1/4 + 30/16); + } else { + // Otherwise: 1:16 odds on 30 digits + ideal = N*30/16; + } + var d = divergence(n, ideal); + + // Draw bar using UTF squares (just for grins) + var s = n/max*50 | 0; + while (s--) bar += '='; + + assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); + } + } +} + +// Perf tests +for (var version in generators) { + log('\nPerformance testing ' + version + ' UUIDs'); + var generator = generators[version]; + var buf = new uuid.BufferClass(16); + + for (var i = 0, t = Date.now(); i < N; i++) generator(); + rate('uuid.' + version + '()', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); + rate('uuid.' + version + '(\'binary\')', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); + rate('uuid.' + version + '(\'binary\', buffer)', t); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js new file mode 100644 index 00000000..2fac6dc4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js @@ -0,0 +1,245 @@ +// uuid.js +// +// Copyright (c) 2010-2012 Robert Kieffer +// MIT License - http://opensource.org/licenses/mit-license.php + +(function() { + var _global = this; + + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + var _rng; + + // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html + // + // Moderately fast, high quality + if (typeof(require) == 'function') { + try { + var _rb = require('crypto').randomBytes; + _rng = _rb && function() {return _rb(16);}; + } catch(e) {} + } + + if (!_rng && _global.crypto && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + _rng = function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } + + if (!_rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + _rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; + } + + // Buffer class to use + var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; + + // Maps for number <-> hex string conversion + var _byteToHex = []; + var _hexToByte = {}; + for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; + } + + // **`parse()` - Parse a UUID into it's component bytes** + function parse(s, buf, offset) { + var i = (buf && offset) || 0, ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; + } + + // **`unparse()` - Convert UUID byte array (ala parse()) into a string** + function unparse(buf, offset) { + var i = offset || 0, bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; + } + + // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + + // random #'s we need to init node and clockseq + var _seedBytes = _rng(); + + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] + ]; + + // Per 4.2.2, randomize (14 bit) clockseq + var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + + // Previous uuid creation time + var _lastMSecs = 0, _lastNSecs = 0; + + // See https://github.com/broofa/node-uuid for API details + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = options.clockseq != null ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs != null ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq == null) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); + } + + // **`v4()` - Generate random UUID** + + // See https://github.com/broofa/node-uuid for API details + function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options == 'binary' ? new BufferClass(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); + } + + // Export public API + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + uuid.parse = parse; + uuid.unparse = unparse; + uuid.BufferClass = BufferClass; + + if (typeof define === 'function' && define.amd) { + // Publish as AMD module + define(function() {return uuid;}); + } else if (typeof(module) != 'undefined' && module.exports) { + // Publish as node.js module + module.exports = uuid; + } else { + // Publish as global (in browsers) + var _previousRoot = _global.uuid; + + // **`noConflict()` - (browser only) to reset global 'uuid' var** + uuid.noConflict = function() { + _global.uuid = _previousRoot; + return uuid; + }; + + _global.uuid = uuid; + } +}).call(this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md new file mode 100644 index 00000000..34c4a85d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md @@ -0,0 +1,4 @@ +oauth-sign +========== + +OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js new file mode 100644 index 00000000..e35bfa67 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js @@ -0,0 +1,43 @@ +var crypto = require('crypto') + , qs = require('querystring') + ; + +function sha1 (key, body) { + return crypto.createHmac('sha1', key).update(body).digest('base64') +} + +function rfc3986 (str) { + return encodeURIComponent(str) + .replace(/!/g,'%21') + .replace(/\*/g,'%2A') + .replace(/\(/g,'%28') + .replace(/\)/g,'%29') + .replace(/'/g,'%27') + ; +} + +function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { + // adapted from https://dev.twitter.com/docs/auth/oauth and + // https://dev.twitter.com/docs/auth/creating-signature + + var querystring = Object.keys(params).sort().map(function(key){ + // big WTF here with the escape + encoding but it's what twitter wants + return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key])) + }).join('%26') + + var base = [ + httpMethod ? httpMethod.toUpperCase() : 'GET', + rfc3986(base_uri), + querystring + ].join('&') + + var key = [ + consumer_secret, + token_secret || '' + ].map(rfc3986).join('&') + + return sha1(key, base) +} + +exports.hmacsign = hmacsign +exports.rfc3986 = rfc3986 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json new file mode 100644 index 00000000..abc9d21d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json @@ -0,0 +1,35 @@ +{ + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "name": "oauth-sign", + "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", + "version": "0.3.0", + "repository": { + "url": "https://github.com/mikeal/oauth-sign" + }, + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "scripts": { + "test": "node test.js" + }, + "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/mikeal/oauth-sign/issues" + }, + "homepage": "https://github.com/mikeal/oauth-sign", + "_id": "oauth-sign@0.3.0", + "dist": { + "shasum": "cb540f93bb2b22a7d5941691a288d60e8ea9386e" + }, + "_from": "oauth-sign@~0.3.0", + "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js new file mode 100644 index 00000000..46955ff6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js @@ -0,0 +1,49 @@ +var hmacsign = require('./index').hmacsign + , assert = require('assert') + , qs = require('querystring') + ; + +// Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth + +var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token', + { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11' + , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' + , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk' + , oauth_signature_method: 'HMAC-SHA1' + , oauth_timestamp: '1272323042' + , oauth_version: '1.0' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98") + +console.log(reqsign) +console.log('8wUi7m5HFQy76nowoCThusfgB+Q=') +assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=') + +var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token', + { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' + , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8' + , oauth_signature_method: 'HMAC-SHA1' + , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc' + , oauth_timestamp: '1272323047' + , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY' + , oauth_version: '1.0' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA") + +console.log(accsign) +console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=') +assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=') + +var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json', + { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g" + , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y" + , oauth_signature_method: "HMAC-SHA1" + , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw" + , oauth_timestamp: "1272325550" + , oauth_version: "1.0" + , status: 'setting up my twitter 私のさえずりを設定する' + }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA") + +console.log(upsign) +console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=') +assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=') + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules new file mode 100644 index 00000000..49e31dac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules @@ -0,0 +1,6 @@ +[submodule "support/expresso"] + path = support/expresso + url = git://github.com/visionmedia/expresso.git +[submodule "support/should"] + path = support/should + url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore new file mode 100644 index 00000000..e85ce2af --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore @@ -0,0 +1,7 @@ +test +.travis.yml +benchmark.js +component.json +examples.js +History.md +Makefile diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md new file mode 100644 index 00000000..27e54a4a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md @@ -0,0 +1,58 @@ +# node-querystring + + query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. + +## Installation + + $ npm install qs + +## Examples + +```js +var qs = require('qs'); + +qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); +// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } + +qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) +// => user[name]=Tobi&user[email]=tobi%40learnboost.com +``` + +## Testing + +Install dev dependencies: + + $ npm install -d + +and execute: + + $ make test + +browser: + + $ open test/browser/index.html + +## License + +(The MIT License) + +Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js new file mode 100644 index 00000000..b05938ac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js @@ -0,0 +1,366 @@ +/** + * Object#toString() ref for stringify(). + */ + +var toString = Object.prototype.toString; + +/** + * Object#hasOwnProperty ref + */ + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Array#indexOf shim. + */ + +var indexOf = typeof Array.prototype.indexOf === 'function' + ? function(arr, el) { return arr.indexOf(el); } + : function(arr, el) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === el) return i; + } + return -1; + }; + +/** + * Array.isArray shim. + */ + +var isArray = Array.isArray || function(arr) { + return toString.call(arr) == '[object Array]'; +}; + +/** + * Object.keys shim. + */ + +var objectKeys = Object.keys || function(obj) { + var ret = []; + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + ret.push(key); + } + } + return ret; +}; + +/** + * Array#forEach shim. + */ + +var forEach = typeof Array.prototype.forEach === 'function' + ? function(arr, fn) { return arr.forEach(fn); } + : function(arr, fn) { + for (var i = 0; i < arr.length; i++) fn(arr[i]); + }; + +/** + * Array#reduce shim. + */ + +var reduce = function(arr, fn, initial) { + if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); + var res = initial; + for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); + return res; +}; + +/** + * Cache non-integer test regexp. + */ + +var isint = /^[0-9]+$/; + +function promote(parent, key) { + if (parent[key].length == 0) return parent[key] = {} + var t = {}; + for (var i in parent[key]) { + if (hasOwnProperty.call(parent[key], i)) { + t[i] = parent[key][i]; + } + } + parent[key] = t; + return t; +} + +function parse(parts, parent, key, val) { + var part = parts.shift(); + + // illegal + if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; + + // end + if (!part) { + if (isArray(parent[key])) { + parent[key].push(val); + } else if ('object' == typeof parent[key]) { + parent[key] = val; + } else if ('undefined' == typeof parent[key]) { + parent[key] = val; + } else { + parent[key] = [parent[key], val]; + } + // array + } else { + var obj = parent[key] = parent[key] || []; + if (']' == part) { + if (isArray(obj)) { + if ('' != val) obj.push(val); + } else if ('object' == typeof obj) { + obj[objectKeys(obj).length] = val; + } else { + obj = parent[key] = [parent[key], val]; + } + // prop + } else if (~indexOf(part, ']')) { + part = part.substr(0, part.length - 1); + if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); + parse(parts, obj, part, val); + // key + } else { + if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); + parse(parts, obj, part, val); + } + } +} + +/** + * Merge parent key/val pair. + */ + +function merge(parent, key, val){ + if (~indexOf(key, ']')) { + var parts = key.split('[') + , len = parts.length + , last = len - 1; + parse(parts, parent, 'base', val); + // optimize + } else { + if (!isint.test(key) && isArray(parent.base)) { + var t = {}; + for (var k in parent.base) t[k] = parent.base[k]; + parent.base = t; + } + set(parent.base, key, val); + } + + return parent; +} + +/** + * Compact sparse arrays. + */ + +function compact(obj) { + if ('object' != typeof obj) return obj; + + if (isArray(obj)) { + var ret = []; + + for (var i in obj) { + if (hasOwnProperty.call(obj, i)) { + ret.push(obj[i]); + } + } + + return ret; + } + + for (var key in obj) { + obj[key] = compact(obj[key]); + } + + return obj; +} + +/** + * Parse the given obj. + */ + +function parseObject(obj){ + var ret = { base: {} }; + + forEach(objectKeys(obj), function(name){ + merge(ret, name, obj[name]); + }); + + return compact(ret.base); +} + +/** + * Parse the given str. + */ + +function parseString(str){ + var ret = reduce(String(str).split('&'), function(ret, pair){ + var eql = indexOf(pair, '=') + , brace = lastBraceInKey(pair) + , key = pair.substr(0, brace || eql) + , val = pair.substr(brace || eql, pair.length) + , val = val.substr(indexOf(val, '=') + 1, val.length); + + // ?foo + if ('' == key) key = pair, val = ''; + if ('' == key) return ret; + + return merge(ret, decode(key), decode(val)); + }, { base: {} }).base; + + return compact(ret); +} + +/** + * Parse the given query `str` or `obj`, returning an object. + * + * @param {String} str | {Object} obj + * @return {Object} + * @api public + */ + +exports.parse = function(str){ + if (null == str || '' == str) return {}; + return 'object' == typeof str + ? parseObject(str) + : parseString(str); +}; + +/** + * Turn the given `obj` into a query string + * + * @param {Object} obj + * @return {String} + * @api public + */ + +var stringify = exports.stringify = function(obj, prefix) { + if (isArray(obj)) { + return stringifyArray(obj, prefix); + } else if ('[object Object]' == toString.call(obj)) { + return stringifyObject(obj, prefix); + } else if ('string' == typeof obj) { + return stringifyString(obj, prefix); + } else { + return prefix + '=' + encodeURIComponent(String(obj)); + } +}; + +/** + * Stringify the given `str`. + * + * @param {String} str + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyString(str, prefix) { + if (!prefix) throw new TypeError('stringify expects an object'); + return prefix + '=' + encodeURIComponent(str); +} + +/** + * Stringify the given `arr`. + * + * @param {Array} arr + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyArray(arr, prefix) { + var ret = []; + if (!prefix) throw new TypeError('stringify expects an object'); + for (var i = 0; i < arr.length; i++) { + ret.push(stringify(arr[i], prefix + '[' + i + ']')); + } + return ret.join('&'); +} + +/** + * Stringify the given `obj`. + * + * @param {Object} obj + * @param {String} prefix + * @return {String} + * @api private + */ + +function stringifyObject(obj, prefix) { + var ret = [] + , keys = objectKeys(obj) + , key; + + for (var i = 0, len = keys.length; i < len; ++i) { + key = keys[i]; + if ('' == key) continue; + if (null == obj[key]) { + ret.push(encodeURIComponent(key) + '='); + } else { + ret.push(stringify(obj[key], prefix + ? prefix + '[' + encodeURIComponent(key) + ']' + : encodeURIComponent(key))); + } + } + + return ret.join('&'); +} + +/** + * Set `obj`'s `key` to `val` respecting + * the weird and wonderful syntax of a qs, + * where "foo=bar&foo=baz" becomes an array. + * + * @param {Object} obj + * @param {String} key + * @param {String} val + * @api private + */ + +function set(obj, key, val) { + var v = obj[key]; + if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; + if (undefined === v) { + obj[key] = val; + } else if (isArray(v)) { + v.push(val); + } else { + obj[key] = [v, val]; + } +} + +/** + * Locate last brace in `str` within the key. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function lastBraceInKey(str) { + var len = str.length + , brace + , c; + for (var i = 0; i < len; ++i) { + c = str[i]; + if (']' == c) brace = false; + if ('[' == c) brace = true; + if ('=' == c && !brace) return i; + } +} + +/** + * Decode `str`. + * + * @param {String} str + * @return {String} + * @api private + */ + +function decode(str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (err) { + return str; + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json new file mode 100644 index 00000000..313485c0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json @@ -0,0 +1,38 @@ +{ + "name": "qs", + "description": "querystring parser", + "version": "0.6.6", + "keywords": [ + "query string", + "parser", + "component" + ], + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/node-querystring.git" + }, + "devDependencies": { + "mocha": "*", + "expect.js": "*" + }, + "scripts": { + "test": "make test" + }, + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca", + "url": "http://tjholowaychuk.com" + }, + "main": "index", + "engines": { + "node": "*" + }, + "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", + "readmeFilename": "Readme.md", + "bugs": { + "url": "https://github.com/visionmedia/node-querystring/issues" + }, + "homepage": "https://github.com/visionmedia/node-querystring", + "_id": "qs@0.6.6", + "_from": "qs@~0.6.0" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc new file mode 100644 index 00000000..8fcead4f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc @@ -0,0 +1,72 @@ +{ + // Settings + "passfail" : false, // Stop on first error. + "maxerr" : 100, // Maximum error before stopping. + + + // Predefined globals whom JSHint will ignore. + "browser" : false, // Standard browser globals e.g. `window`, `document`. + "node" : true, + "rhino" : false, + "couch" : false, + "wsh" : false, // Windows Scripting Host. + + "jquery" : false, + "prototypejs" : false, + "mootools" : false, + "dojo" : false, + + "predef" : [ // Custom globals. + "escape", "unescape" // aren't picked up by node flag above :/ + ], + + + // Development. + "debug" : false, // Allow debugger statements e.g. browser breakpoints. + "devel" : false, // Allow developments statements e.g. `console.log();`. + + + // EcmaScript 5. + "es5" : true, // Allow EcmaScript 5 syntax. + "esnext" : true, // Allow ES "next" syntax, specifically 'const' (V8 has this) + "strict" : false, // Require `use strict` pragma in every file. + "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). + + + // The Good Parts. + "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). + "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. + "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). + "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. + "curly" : false, // Require {} for every new block or scope. + "eqeqeq" : false, // Require triple equals i.e. `===`. + "eqnull" : true, // Tolerate use of `== null`. + "evil" : false, // Tolerate use of `eval`. + "expr" : true, // Tolerate `ExpressionStatement` as Programs. + "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` + "latedef" : false, // Prohibit variable use before definition. + "loopfunc" : false, // Allow functions to be defined within loops. + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. + "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. + "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. + "scripturl" : true, // Tolerate script-targeted URLs. + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. + "undef" : true, // Require all non-global variables be declared before they are used. + + + // Personal styling prefrences. + "lastsemic" : true, // Prohibit missing semicolon for the last statement in a one-line block + "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`. + "noempty" : true, // Prohipit use of empty blocks. + "nonew" : true, // Prohibit use of constructors for side-effects. + "nomen" : false, // Prohibit use of initial or trailing underbars in names. + "onevar" : false, // Allow only one `var` statement per function. + "onecase" : false, // Allow switches with one case statement + "plusplus" : false, // Prohibit use of `++` & `--`. + "proto" : false, // Allow use of __proto__ + "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. + "trailing" : true, // Prohibit trailing whitespaces. + "white" : false // Check against strict whitespace and indentation rules. +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore new file mode 100644 index 00000000..54efff98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +.*.sw[nmop] +npm-debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE new file mode 100644 index 00000000..3fac4c85 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE @@ -0,0 +1,78 @@ +Copyright GoInstant, Inc. and other contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +The following exceptions apply: + +=== + +`pubSufTest()` of generate-pubsuffix.js is in the public domain. + + // Any copyright is dedicated to the Public Domain. + // http://creativecommons.org/publicdomain/zero/1.0/ + +=== + +`public-suffix.txt` was obtained from + +via . + +That file contains the usual Mozilla triple-license, for which this project uses it +under the terms of the MPL 1.1: + + // ***** BEGIN LICENSE BLOCK ***** + // Version: MPL 1.1/GPL 2.0/LGPL 2.1 + // + // The contents of this file are subject to the Mozilla Public License Version + // 1.1 (the "License"); you may not use this file except in compliance with + // the License. You may obtain a copy of the License at + // http://www.mozilla.org/MPL/ + // + // Software distributed under the License is distributed on an "AS IS" basis, + // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + // for the specific language governing rights and limitations under the + // License. + // + // The Original Code is the Public Suffix List. + // + // The Initial Developer of the Original Code is + // Jo Hermans . + // Portions created by the Initial Developer are Copyright (C) 2007 + // the Initial Developer. All Rights Reserved. + // + // Contributor(s): + // Ruben Arakelyan + // Gervase Markham + // Pamela Greene + // David Triendl + // Jothan Frakes + // The kind representatives of many TLD registries + // + // Alternatively, the contents of this file may be used under the terms of + // either the GNU General Public License Version 2 or later (the "GPL"), or + // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + // in which case the provisions of the GPL or the LGPL are applicable instead + // of those above. If you wish to allow use of your version of this file only + // under the terms of either the GPL or the LGPL, and not to allow others to + // use your version of this file under the terms of the MPL, indicate your + // decision by deleting the provisions above and replace them with the notice + // and other provisions required by the GPL or the LGPL. If you do not delete + // the provisions above, a recipient may use your version of this file under + // the terms of any one of the MPL, the GPL or the LGPL. + // + // ***** END LICENSE BLOCK ***** diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md new file mode 100644 index 00000000..fd1dbb1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md @@ -0,0 +1,380 @@ +[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js + +![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg) + +# Synopsis + +``` javascript +var cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie' +var Cookie = cookies.Cookie; +var cookie = Cookie.parse(header); +cookie.value = 'somethingdifferent'; +header = cookie.toString(); + +var cookiejar = new cookies.CookieJar(); +cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); +// ... +cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { + res.headers['cookie'] = cookies.join('; '); +}); +``` + +# Installation + +It's _so_ easy! + +`npm install tough-cookie` + +Requires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default. + +Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. + +# API + +cookies +======= + +Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". + +parseDate(string[,strict]) +----------------- + +Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. "Thu, 01 Jan 1970 00:00:010 GMT" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid). + +formatDate(date) +---------------- + +Format a Date into a RFC1123 string (the RFC6265-recommended format). + +canonicalDomain(str) +-------------------- + +Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). + +domainMatch(str,domStr[,canonicalize=true]) +------------------------------------------- + +Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". + +The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not. + +defaultPath(path) +----------------- + +Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. + +The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. + +pathMatch(reqPath,cookiePath) +----------------------------- + +Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. + +This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. + +parse(header[,strict=false]) +---------------------------- + +alias for `Cookie.parse(header[,strict])` + +fromJSON(string) +---------------- + +alias for `Cookie.fromJSON(string)` + +getPublicSuffix(hostname) +------------------------- + +Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. + +For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. + +For further information, see http://publicsuffix.org/. This module derives its list from that site. + +cookieCompare(a,b) +------------------ + +For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest. + +``` javascript +var cookies = [ /* unsorted array of Cookie objects */ ]; +cookies = cookies.sort(cookieCompare); +``` + +permuteDomain(domain) +--------------------- + +Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. + + +permutePath(path) +----------------- + +Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. + +Cookie +====== + +Cookie.parse(header[,strict=false]) +----------------------------------- + +Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off. + +Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: + +``` javascript +if (res.headers['set-cookie'] instanceof Array) + cookies = res.headers['set-cookie'].map(Cookie.parse); +else + cookies = [Cookie.parse(res.headers['set-cookie'])]; +``` + +Cookie.fromJSON(string) +----------------------- + +Convert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects. + +Properties +========== + + * _key_ - string - the name or key of the cookie (default "") + * _value_ - string - the value of the cookie (default "") + * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` + * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` + * _domain_ - string - the `Domain=` attribute of the cookie + * _path_ - string - the `Path=` of the cookie + * _secure_ - boolean - the `Secure` cookie flag + * _httpOnly_ - boolean - the `HttpOnly` cookie flag + * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) + +After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: + + * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) + * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. + * _created_ - `Date` - when this cookie was added to the jar + * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. + +Construction([{options}]) +------------ + +Receives an options object that can contain any Cookie properties, uses the default for unspecified properties. + +.toString() +----------- + +encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. + +.cookieString() +--------------- + +encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). + +.setExpires(String) +------------------- + +sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. + +.setMaxAge(number) +------------------- + +sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. + +.expiryTime([now=Date.now()]) +----------------------------- + +.expiryDate([now=Date.now()]) +----------------------------- + +expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. + +Max-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute. + +If Expires (`.expires`) is set, that's returned. + +Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). + +.TTL([now=Date.now()]) +--------- + +compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. + +The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. + +.canonicalizedDoman() +--------------------- + +.cdomain() +---------- + +return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. + +.validate() +----------- + +Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. + +validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: + +``` javascript +if (cookie.validate() === true) { + // it's tasty +} else { + // yuck! +} +``` + +CookieJar +========= + +Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes]) +------------ + +Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. + + +Attributes +---------- + + * _rejectPublicSuffixes_ - boolean - reject cookies with domains like "com" and "co.uk" (default: `true`) + +Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. + +.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie)) +------------------------------------------------------------------- + +Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _strict_ - boolean - default `false` - perform extra checks + * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option. + +As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). + +.storeCookie(cookie, [{options},] cb(err,cookie)) +------------------------------------------------- + +__REMOVED__ removed in lieu of the CookieStore API below + +.getCookies(currentUrl, [{options},] cb(err,cookies)) +----------------------------------------------------- + +Retrieve the list of cookies that can be sent in a Cookie header for the current url. + +If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. + +The `options` object can be omitted and can have the following properties: + + * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. + * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. + * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies + * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). + * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it). + +The `.lastAccessed` property of the returned cookies will have been updated. + +.getCookieString(...) +--------------------- + +Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. + +.getSetCookieStrings(...) +------------------------- + +Accepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`. + +# CookieStore API + +The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. + +All `domain` parameters will have been normalized before calling. + +The Cookie store must have all of the following methods. + +store.findCookie(domain, path, key, cb(err,cookie)) +--------------------------------------------------- + +Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. + +Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). + +store.findCookies(domain, path, cb(err,cookies)) +------------------------------------------------ + +Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. + +If no cookies are found, the callback MUST be passed an empty array. + +The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. + +As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). + +store.putCookie(cookie, cb(err)) +-------------------------------- + +Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. + +The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. + +Pass an error if the cookie cannot be stored. + +store.updateCookie(oldCookie, newCookie, cb(err)) +------------------------------------------------- + +Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. + +The `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion). + +Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. + +The `newCookie` and `oldCookie` objects MUST NOT be modified. + +Pass an error if the newCookie cannot be stored. + +store.removeCookie(domain, path, key, cb(err)) +---------------------------------------------- + +Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). + +The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. + +store.removeCookies(domain, path, cb(err)) +------------------------------------------ + +Removes matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed. + +Pass an error ONLY if removing any existing cookies failed. + +# TODO + + * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()` + * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891 + * better tests for `validate()`? + +# Copyright and License + +(tl;dr: MIT with some MPL/1.1) + +Copyright GoInstant, Inc. and other contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +Portions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js new file mode 100644 index 00000000..a7fa5452 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js @@ -0,0 +1,230 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +var fs = require('fs'); +var assert = require('assert'); +var punycode = require('punycode'); + +fs.readFile('./public-suffix.txt', 'utf8', function(err,string) { + if (err) throw err; + var lines = string.split("\n"); + process.nextTick(function() { + processList(lines); + }); +}); + +var index = {}; + +var COMMENT = new RegExp('//.+'); +function processList(lines) { + while (lines.length) { + var line = lines.shift(); + line = line.replace(COMMENT,'').trim(); + if (!line) continue; + addToIndex(index,line); + } + + pubSufTest(); + + var w = fs.createWriteStream('./lib/pubsuffix.js',{ + flags: 'w', + encoding: 'utf8', + mode: 0644, + }); + w.on('end', process.exit); + w.write("/****************************************************\n"); + w.write(" * AUTOMATICALLY GENERATED by generate-pubsuffix.js *\n"); + w.write(" * DO NOT EDIT! *\n"); + w.write(" ****************************************************/\n\n"); + + w.write("module.exports.getPublicSuffix = "); + w.write(getPublicSuffix.toString()); + w.write(";\n\n"); + + w.write("// The following generated structure is used under the MPL version 1.1\n"); + w.write("// See public-suffix.txt for more information\n\n"); + w.write("var index = module.exports.index = Object.freeze(\n"); + w.write(JSON.stringify(index)); + w.write(");\n\n"); + w.write("// END of automatically generated file\n"); + + w.end(); +} + +function addToIndex(index,line) { + var prefix = ''; + if (line.replace(/^(!|\*\.)/)) { + prefix = RegExp.$1; + line = line.slice(prefix.length); + } + line = prefix + punycode.toASCII(line); + + if (line.substr(0,1) == '!') + index[line.substr(1)] = false; + else + index[line] = true; +} + +// include the licence in the function since it gets written to pubsuffix.js +function getPublicSuffix(domain) { + /* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + if (!domain) return null; + if (domain.match(/^\./)) return null; + + domain = domain.toLowerCase(); + var parts = domain.split('.').reverse(); + + var suffix = ''; + var suffixLen = 0; + for (var i=0; i suffixLen) { + return parts.slice(0,suffixLen+1).reverse().join('.'); + } + + return null; +} + +function checkPublicSuffix(give,get) { + var got = getPublicSuffix(give); + assert.equal(got, get, give+' should be '+(get==null?'NULL':get)+' but got '+got); +} + +// pubSufTest() was converted to JavaScript from http://publicsuffix.org/list/test.txt +function pubSufTest() { + // For this function-scope and this function-scope ONLY: + // Any copyright is dedicated to the Public Domain. + // http://creativecommons.org/publicdomain/zero/1.0/ + + // NULL input. + checkPublicSuffix(null, null); + // Mixed case. + checkPublicSuffix('COM', null); + checkPublicSuffix('example.COM', 'example.com'); + checkPublicSuffix('WwW.example.COM', 'example.com'); + // Leading dot. + checkPublicSuffix('.com', null); + checkPublicSuffix('.example', null); + checkPublicSuffix('.example.com', null); + checkPublicSuffix('.example.example', null); + // Unlisted TLD. + checkPublicSuffix('example', null); + checkPublicSuffix('example.example', null); + checkPublicSuffix('b.example.example', null); + checkPublicSuffix('a.b.example.example', null); + // Listed, but non-Internet, TLD. + checkPublicSuffix('local', null); + checkPublicSuffix('example.local', null); + checkPublicSuffix('b.example.local', null); + checkPublicSuffix('a.b.example.local', null); + // TLD with only 1 rule. + checkPublicSuffix('biz', null); + checkPublicSuffix('domain.biz', 'domain.biz'); + checkPublicSuffix('b.domain.biz', 'domain.biz'); + checkPublicSuffix('a.b.domain.biz', 'domain.biz'); + // TLD with some 2-level rules. + checkPublicSuffix('com', null); + checkPublicSuffix('example.com', 'example.com'); + checkPublicSuffix('b.example.com', 'example.com'); + checkPublicSuffix('a.b.example.com', 'example.com'); + checkPublicSuffix('uk.com', null); + checkPublicSuffix('example.uk.com', 'example.uk.com'); + checkPublicSuffix('b.example.uk.com', 'example.uk.com'); + checkPublicSuffix('a.b.example.uk.com', 'example.uk.com'); + checkPublicSuffix('test.ac', 'test.ac'); + // TLD with only 1 (wildcard) rule. + checkPublicSuffix('cy', null); + checkPublicSuffix('c.cy', null); + checkPublicSuffix('b.c.cy', 'b.c.cy'); + checkPublicSuffix('a.b.c.cy', 'b.c.cy'); + // More complex TLD. + checkPublicSuffix('jp', null); + checkPublicSuffix('test.jp', 'test.jp'); + checkPublicSuffix('www.test.jp', 'test.jp'); + checkPublicSuffix('ac.jp', null); + checkPublicSuffix('test.ac.jp', 'test.ac.jp'); + checkPublicSuffix('www.test.ac.jp', 'test.ac.jp'); + checkPublicSuffix('kyoto.jp', null); + checkPublicSuffix('c.kyoto.jp', null); + checkPublicSuffix('b.c.kyoto.jp', 'b.c.kyoto.jp'); + checkPublicSuffix('a.b.c.kyoto.jp', 'b.c.kyoto.jp'); + checkPublicSuffix('pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. + checkPublicSuffix('www.pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. + checkPublicSuffix('city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. + checkPublicSuffix('www.city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. + // TLD with a wildcard rule and exceptions. + checkPublicSuffix('om', null); + checkPublicSuffix('test.om', null); + checkPublicSuffix('b.test.om', 'b.test.om'); + checkPublicSuffix('a.b.test.om', 'b.test.om'); + checkPublicSuffix('songfest.om', 'songfest.om'); + checkPublicSuffix('www.songfest.om', 'songfest.om'); + // US K12. + checkPublicSuffix('us', null); + checkPublicSuffix('test.us', 'test.us'); + checkPublicSuffix('www.test.us', 'test.us'); + checkPublicSuffix('ak.us', null); + checkPublicSuffix('test.ak.us', 'test.ak.us'); + checkPublicSuffix('www.test.ak.us', 'test.ak.us'); + checkPublicSuffix('k12.ak.us', null); + checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us'); + checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us'); + + +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js new file mode 100644 index 00000000..1d8615b5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js @@ -0,0 +1,947 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/*jshint regexp:false */ +var net = require('net'); +var urlParse = require('url').parse; +var pubsuffix = require('./pubsuffix'); + +var punycode; +try { + punycode = require('punycode'); +} catch(e) { + console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); +} + +var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; + +// From RFC2616 S2.2: +var TOKEN = /[\x21\x23-\x26\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/; + +// From RFC6265 S4.1.1 +// note that it excludes \x3B ";" +var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/; +var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; + +// The name/key cannot be empty but the value can (S5.2): +var COOKIE_PAIR_STRICT = new RegExp('^('+TOKEN.source+'+)=("?)('+COOKIE_OCTET.source+'*)\\2'); +var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2/; + +// RFC6265 S4.1.1 defines extension-av as 'any CHAR except CTLs or ";"' +// Note ';' is \x3B +var NON_CTL_SEMICOLON = /[\x20-\x3A\x3C-\x7E]+/; +var EXTENSION_AV = NON_CTL_SEMICOLON; +var PATH_VALUE = NON_CTL_SEMICOLON; + +// Used for checking whether or not there is a trailing semi-colon +var TRAILING_SEMICOLON = /;+$/; + +/* RFC6265 S5.1.1.5: + * [fail if] the day-of-month-value is less than 1 or greater than 31 + */ +var DAY_OF_MONTH = /^(0?[1-9]|[12][0-9]|3[01])$/; + +/* RFC6265 S5.1.1.5: + * [fail if] + * * the hour-value is greater than 23, + * * the minute-value is greater than 59, or + * * the second-value is greater than 59. + */ +var TIME = /(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/; +var STRICT_TIME = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/; + +var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/i; +var MONTH_TO_NUM = { + jan:0, feb:1, mar:2, apr:3, may:4, jun:5, jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 +}; +var NUM_TO_MONTH = [ + 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' +]; +var NUM_TO_DAY = [ + 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' +]; + +var YEAR = /^([1-9][0-9]{1,3})$/; // 2 to 4 digits (will check range when parsing) + +var MAX_TIME = 2147483647000; // 31-bit max +var MAX_DATE = new Date(CookieJar.MAX_TIME); // 31-bit max +var MIN_TIME = 0; // 31-bit min +var MIN_DATE = new Date(CookieJar.MIN_TIME); // 31-bit min + + +// RFC6265 S5.1.1 date parser: +function parseDate(str,strict) { + if (!str) return; + var found_time, found_dom, found_month, found_year; + + /* RFC6265 S5.1.1: + * 2. Process each date-token sequentially in the order the date-tokens + * appear in the cookie-date + */ + var tokens = str.split(DATE_DELIM); + if (!tokens) return; + + var date = new Date(); + date.setMilliseconds(0); + + for (var i=0; i= 10 ? d : '0'+d; + var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; + var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; + var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; + return NUM_TO_DAY[date.getUTCDay()] + ', ' + + d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ + h+':'+m+':'+s+' GMT'; +} + +// S5.1.2 Canonicalized Host Names +function canonicalDomain(str) { + if (str == null) return null; + str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . + + // convert to IDN if any non-ASCII characters + if (punycode && /[^\u0001-\u007f]/.test(str)) + str = punycode.toASCII(str); + + return str.toLowerCase(); +} + +// S5.1.3 Domain Matching +function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) return null; + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } + + /* + * "The domain string and the string are identical. (Note that both the + * domain string and the string will have been canonicalized to lower case at + * this point)" + */ + if (str == domStr) return true; + + /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ + + /* "* The string is a host name (i.e., not an IP address)." */ + if (net.isIP(str)) return false; + + /* "* The domain string is a suffix of the string" */ + var idx = str.indexOf(domStr); + if (idx <= 0) return false; // it's a non-match (-1) or prefix (0) + + // e.g "a.b.c".indexOf("b.c") === 2 + // 5 === 3+2 + if (str.length !== domStr.length + idx) // it's not a suffix + return false; + + /* "* The last character of the string that is not included in the domain + * string is a %x2E (".") character." */ + if (str.substr(idx-1,1) !== '.') return false; + return true; +} + + +// RFC6265 S5.1.4 Paths and Path-Match + +/* + * "The user agent MUST use an algorithm equivalent to the following algorithm + * to compute the default-path of a cookie:" + * + * Assumption: the path (and not query part or absolute uri) is passed in. + */ +function defaultPath(path) { + // "2. If the uri-path is empty or if the first character of the uri-path is not + // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. + if (!path || path.substr(0,1) !== "/") return "/"; + + // "3. If the uri-path contains no more than one %x2F ("/") character, output + // %x2F ("/") and skip the remaining step." + if (path === "/") return path; + + var rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) return "/"; + + // "4. Output the characters of the uri-path from the first character up to, + // but not including, the right-most %x2F ("/")." + return path.slice(0, rightSlash); +} + +/* + * "A request-path path-matches a given cookie-path if at least one of the + * following conditions holds:" + */ +function pathMatch(reqPath,cookiePath) { + // "o The cookie-path and the request-path are identical." + if (cookiePath === reqPath) + return true; + + var idx = reqPath.indexOf(cookiePath); + if (idx === 0) { + // "o The cookie-path is a prefix of the request-path, and the last + // character of the cookie-path is %x2F ("/")." + if (cookiePath.substr(-1) === "/") + return true; + + // " o The cookie-path is a prefix of the request-path, and the first + // character of the request-path that is not included in the cookie- path + // is a %x2F ("/") character." + if (reqPath.substr(cookiePath.length,1) === "/") + return true; + } + + return false; +} + +function parse(str, strict) { + str = str.trim(); + + // S4.1.1 Trailing semi-colons are not part of the specification. + // If we are not in strict mode we remove the trailing semi-colons. + var semiColonCheck = TRAILING_SEMICOLON.exec(str); + if (semiColonCheck) { + if (strict) return; + str = str.slice(0, semiColonCheck.index); + } + + // We use a regex to parse the "name-value-pair" part of S5.2 + var firstSemi = str.indexOf(';'); // S5.2 step 1 + var pairRx = strict ? COOKIE_PAIR_STRICT : COOKIE_PAIR; + var result = pairRx.exec(firstSemi === -1 ? str : str.substr(0,firstSemi)); + + // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")" + // constraints as well as trimming any whitespace. + if (!result) return; + + var c = new Cookie(); + c.key = result[1]; // the regexp should trim() already + c.value = result[3]; // [2] is quotes or empty-string + + if (firstSemi === -1) return c; + + // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question)." plus later on in the same section + // "discard the first ";" and trim". + var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); + + // "If the unparsed-attributes string is empty, skip the rest of these + // steps." + if (unparsed.length === 0) return c; + + /* + * S5.2 says that when looping over the items "[p]rocess the attribute-name + * and attribute-value according to the requirements in the following + * subsections" for every item. Plus, for many of the individual attributes + * in S5.3 it says to use the "attribute-value of the last attribute in the + * cookie-attribute-list". Therefore, in this implementation, we overwrite + * the previous value. + */ + var cookie_avs = unparsed.split(/\s*;\s*/); + while (cookie_avs.length) { + var av = cookie_avs.shift(); + + if (strict && !EXTENSION_AV.test(av)) return; + + var av_sep = av.indexOf('='); + var av_key, av_value; + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0,av_sep); + av_value = av.substr(av_sep+1); + } + + av_key = av_key.trim().toLowerCase(); + if (av_value) av_value = av_value.trim(); + + switch(av_key) { + case 'expires': // S5.2.1 + if (!av_value) { if(strict){return}else{break;} } + var exp = parseDate(av_value,strict); + // "If the attribute-value failed to parse as a cookie date, ignore the + // cookie-av." + if (exp == null) { if(strict){return}else{break;} } + c.expires = exp; + // over and underflow not realistically a concern: V8's getTime() seems to + // store something larger than a 32-bit time_t (even with 32-bit node) + break; + + case 'max-age': // S5.2.2 + if (!av_value) { if(strict){return}else{break;} } + // "If the first character of the attribute-value is not a DIGIT or a "-" + // character ...[or]... If the remainder of attribute-value contains a + // non-DIGIT character, ignore the cookie-av." + if (!/^-?[0-9]+$/.test(av_value)) { if(strict){return}else{break;} } + var delta = parseInt(av_value,10); + if (strict && delta <= 0) return; // S4.1.1 + // "If delta-seconds is less than or equal to zero (0), let expiry-time + // be the earliest representable date and time." + c.setMaxAge(delta); + break; + + case 'domain': // S5.2.3 + // "If the attribute-value is empty, the behavior is undefined. However, + // the user agent SHOULD ignore the cookie-av entirely." + if (!av_value) { if(strict){return}else{break;} } + // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E + // (".") character." + var domain = av_value.trim().replace(/^\./,''); + if (!domain) { if(strict){return}else{break;} } // see "is empty" above + // "Convert the cookie-domain to lower case." + c.domain = domain.toLowerCase(); + break; + + case 'path': // S5.2.4 + /* + * "If the attribute-value is empty or if the first character of the + * attribute-value is not %x2F ("/"): + * Let cookie-path be the default-path. + * Otherwise: + * Let cookie-path be the attribute-value." + * + * We'll represent the default-path as null since it depends on the + * context of the parsing. + */ + if (!av_value || av_value.substr(0,1) != "/") { if(strict){return}else{break;} } + c.path = av_value; + break; + + case 'secure': // S5.2.5 + /* + * "If the attribute-name case-insensitively matches the string "Secure", + * the user agent MUST append an attribute to the cookie-attribute-list + * with an attribute-name of Secure and an empty attribute-value." + */ + if (av_value != null) { if(strict){return} } + c.secure = true; + break; + + case 'httponly': // S5.2.6 -- effectively the same as 'secure' + if (av_value != null) { if(strict){return} } + c.httpOnly = true; + break; + + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } + + // ensure a default date for sorting: + c.creation = new Date(); + return c; +} + +function fromJSON(str) { + if (!str) return null; + + var obj; + try { + obj = JSON.parse(str); + } catch (e) { + return null; + } + + var c = new Cookie(); + for (var i=0; i 1) { + var lindex = path.lastIndexOf('/'); + if (lindex === 0) break; + path = path.substr(0,lindex); + permutations.push(path); + } + permutations.push('/'); + return permutations; +} + + +function Cookie (opts) { + if (typeof opts !== "object") return; + Object.keys(opts).forEach(function (key) { + if (Cookie.prototype.hasOwnProperty(key)) { + this[key] = opts[key] || Cookie.prototype[key]; + } + }.bind(this)); +} + +Cookie.parse = parse; +Cookie.fromJSON = fromJSON; + +Cookie.prototype.key = ""; +Cookie.prototype.value = ""; + +// the order in which the RFC has them: +Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity +Cookie.prototype.maxAge = null; // takes precedence over expires for TTL +Cookie.prototype.domain = null; +Cookie.prototype.path = null; +Cookie.prototype.secure = false; +Cookie.prototype.httpOnly = false; +Cookie.prototype.extensions = null; + +// set by the CookieJar: +Cookie.prototype.hostOnly = null; // boolean when set +Cookie.prototype.pathIsDefault = null; // boolean when set +Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse +Cookie.prototype.lastAccessed = null; // Date when set + +var cookieProperties = Object.freeze(Object.keys(Cookie.prototype).map(function(p) { + if (p instanceof Function) return; + return p; +})); +var numCookieProperties = cookieProperties.length; + +Cookie.prototype.inspect = function inspect() { + var now = Date.now(); + return 'Cookie="'+this.toString() + + '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + + '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + + '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + + '"'; +}; + +Cookie.prototype.validate = function validate() { + if (!COOKIE_OCTETS.test(this.value)) + return false; + if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires,true)) + return false; + if (this.maxAge != null && this.maxAge <= 0) + return false; // "Max-Age=" non-zero-digit *DIGIT + if (this.path != null && !PATH_VALUE.test(this.path)) + return false; + + var cdomain = this.cdomain(); + if (cdomain) { + if (cdomain.match(/\.$/)) + return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this + var suffix = pubsuffix.getPublicSuffix(cdomain); + if (suffix == null) // it's a public suffix + return false; + } + return true; +}; + +Cookie.prototype.setExpires = function setExpires(exp) { + if (exp instanceof Date) this.expires = exp; + else this.expires = parseDate(exp) || "Infinity"; +}; + +Cookie.prototype.setMaxAge = function setMaxAge(age) { + if (age === Infinity || age === -Infinity) + this.maxAge = age.toString(); // so JSON.stringify() works + else + this.maxAge = age; +}; + +// gives Cookie header format +Cookie.prototype.cookieString = function cookieString() { + var val = this.value; + if (val == null) val = ''; + if (!val.length || COOKIE_OCTETS.test(val)) + return this.key+'='+val; + else + return this.key+'="'+val+'"'; +}; + +// gives Set-Cookie header format +Cookie.prototype.toString = function toString() { + var str = this.cookieString(); + + if (this.expires != Infinity) { + if (this.expires instanceof Date) + str += '; Expires='+formatDate(this.expires); + else + str += '; Expires='+this.expires; + } + + if (this.maxAge != null && this.maxAge != Infinity) + str += '; Max-Age='+this.maxAge; + + if (this.domain && !this.hostOnly) + str += '; Domain='+this.domain; + if (this.path) + str += '; Path='+this.path; + + if (this.secure) str += '; Secure'; + if (this.httpOnly) str += '; HttpOnly'; + if (this.extensions) { + this.extensions.forEach(function(ext) { + str += '; '+ext; + }); + } + + return str; +}; + +// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere) +// S5.3 says to give the "latest representable date" for which we use Infinity +// For "expired" we use 0 +Cookie.prototype.TTL = function TTL(now) { + /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires + * attribute, the Max-Age attribute has precedence and controls the + * expiration date of the cookie. + * (Concurs with S5.3 step 3) + */ + if (this.maxAge != null) { + return this.maxAge<=0 ? 0 : this.maxAge*1000; + } + + var expires = this.expires; + if (expires != Infinity) { + if (!(expires instanceof Date)) { + expires = parseDate(expires) || Infinity; + } + + if (expires == Infinity) + return Infinity; + + return expires.getTime() - (now || Date.now()); + } + + return Infinity; +}; + +// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere) +Cookie.prototype.expiryTime = function expiryTime(now) { + if (this.maxAge != null) { + var relativeTo = this.creation || now || new Date(); + var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000; + return relativeTo.getTime() + age; + } + + if (this.expires == Infinity) return Infinity; + return this.expires.getTime(); +}; + +// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere), except it returns a Date +Cookie.prototype.expiryDate = function expiryDate(now) { + var millisec = this.expiryTime(now); + if (millisec == Infinity) return new Date(MAX_TIME); + else if (millisec == -Infinity) return new Date(MIN_TIME); + else return new Date(millisec); +}; + +// This replaces the "persistent-flag" parts of S5.3 step 3 +Cookie.prototype.isPersistent = function isPersistent() { + return (this.maxAge != null || this.expires != Infinity); +}; + +// Mostly S5.1.2 and S5.2.3: +Cookie.prototype.cdomain = +Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() { + if (this.domain == null) return null; + return canonicalDomain(this.domain); +}; + + +var memstore; +function CookieJar(store, rejectPublicSuffixes) { + if (rejectPublicSuffixes != null) this.rejectPublicSuffixes = rejectPublicSuffixes; + if (!store) { + memstore = memstore || require('./memstore'); + store = new memstore.MemoryCookieStore(); + } + this.store = store; +} +CookieJar.prototype.store = null; +CookieJar.prototype.rejectPublicSuffixes = true; + +CookieJar.prototype.setCookie = function setCookie(cookie, url, options, cb) { + var err; + var context = (url instanceof Object) ? url : urlParse(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + + var host = canonicalDomain(context.hostname); + + // S5.3 step 1 + if (!(cookie instanceof Cookie)) + cookie = Cookie.parse(cookie, options.strict === true); + if (!cookie) { + err = new Error("Cookie failed to parse"); + return cb(options.ignoreError ? null : err); + } + + // S5.3 step 2 + var now = options.now || new Date(); // will assign later to save effort in the face of errors + + // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie() + + // S5.3 step 4: NOOP; domain is null by default + + // S5.3 step 5: public suffixes + if (this.rejectPublicSuffixes && cookie.domain) { + var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); + if (suffix == null) { // e.g. "com" + err = new Error("Cookie has domain set to a public suffix"); + return cb(options.ignoreError ? null : err); + } + } + + // S5.3 step 6: + if (cookie.domain) { + if (!domainMatch(host, cookie.cdomain(), false)) { + err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host); + return cb(options.ignoreError ? null : err); + } + + if (cookie.hostOnly == null) // don't reset if already set + cookie.hostOnly = false; + + } else { + cookie.hostOnly = true; + cookie.domain = host; + } + + // S5.3 step 7: "Otherwise, set the cookie's path to the default-path of the + // request-uri" + if (!cookie.path) { + cookie.path = defaultPath(context.pathname); + cookie.pathIsDefault = true; + } else { + if (cookie.path.length > 1 && cookie.path.substr(-1) == '/') + cookie.path = cookie.path.slice(0,-1); + } + + // S5.3 step 8: NOOP; secure attribute + // S5.3 step 9: NOOP; httpOnly attribute + + // S5.3 step 10 + if (options.http === false && cookie.httpOnly) { + err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + + var store = this.store; + + if (!store.updateCookie) { + store.updateCookie = function stubUpdateCookie(oldCookie, newCookie, cb) { + this.putCookie(newCookie, cb); + }; + } + + store.findCookie(cookie.domain, cookie.path, cookie.key, function(err,oldCookie) { + if (err) return cb(err); + + var next = function(err) { + if (err) return cb(err); + else cb(null, cookie); + }; + + if (oldCookie) { + // S5.3 step 11 - "If the cookie store contains a cookie with the same name, + // domain, and path as the newly created cookie:" + if (options.http === false && oldCookie.httpOnly) { // step 11.2 + err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + cookie.creation = oldCookie.creation; // step 11.3 + cookie.lastAccessed = now; + // Step 11.4 (delete cookie) is implied by just setting the new one: + store.updateCookie(oldCookie, cookie, next); // step 12 + + } else { + cookie.creation = cookie.lastAccessed = now; + store.putCookie(cookie, next); // step 12 + } + }); +}; + +// RFC6365 S5.4 +CookieJar.prototype.getCookies = function getCookies(url, options, cb) { + var context = (url instanceof Object) ? url : urlParse(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + + var host = canonicalDomain(context.hostname); + var path = context.pathname || '/'; + + var secure = options.secure; + if (secure == null && context.protocol && + (context.protocol == 'https:' || context.protocol == 'wss:')) + { + secure = true; + } + + var http = options.http; + if (http == null) http = true; + + var now = options.now || Date.now(); + var expireCheck = options.expire !== false; + var allPaths = !!options.allPaths; + var store = this.store; + + function matchingCookie(c) { + // "Either: + // The cookie's host-only-flag is true and the canonicalized + // request-host is identical to the cookie's domain. + // Or: + // The cookie's host-only-flag is false and the canonicalized + // request-host domain-matches the cookie's domain." + if (c.hostOnly) { + if (c.domain != host) return false; + } else { + if (!domainMatch(host, c.domain, false)) return false; + } + + // "The request-uri's path path-matches the cookie's path." + if (!allPaths && !pathMatch(path, c.path)) + return false; + + // "If the cookie's secure-only-flag is true, then the request-uri's + // scheme must denote a "secure" protocol" + if (c.secure && !secure) + return false; + + // "If the cookie's http-only-flag is true, then exclude the cookie if the + // cookie-string is being generated for a "non-HTTP" API" + if (c.httpOnly && !http) + return false; + + // deferred from S5.3 + // non-RFC: allow retention of expired cookies by choice + if (expireCheck && c.expiryTime() <= now) { + store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored + return false; + } + + return true; + } + + store.findCookies(host, allPaths ? null : path, function(err,cookies) { + if (err) return cb(err); + + cookies = cookies.filter(matchingCookie); + + // sorting of S5.4 part 2 + if (options.sort !== false) + cookies = cookies.sort(cookieCompare); + + // S5.4 part 3 + var now = new Date(); + cookies.forEach(function(c) { c.lastAccessed = now }); + // TODO persist lastAccessed + + cb(null,cookies); + }); +}; + +CookieJar.prototype.getCookieString = function(/*..., cb*/) { + var args = Array.prototype.slice.call(arguments,0); + var cb = args.pop(); + var next = function(err,cookies) { + if (err) cb(err); + else cb(null, cookies.map(function(c){return c.cookieString()}).join('; ')); + }; + args.push(next); + this.getCookies.apply(this,args); +}; + +CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) { + var args = Array.prototype.slice.call(arguments,0); + var cb = args.pop(); + var next = function(err,cookies) { + if (err) cb(err); + else cb(null, cookies.map(function(c){return c.toString()})); + }; + args.push(next); + this.getCookies.apply(this,args); +}; + + + +module.exports = { + CookieJar: CookieJar, + Cookie: Cookie, + parseDate: parseDate, + formatDate: formatDate, + parse: parse, + fromJSON: fromJSON, + domainMatch: domainMatch, + defaultPath: defaultPath, + pathMatch: pathMatch, + getPublicSuffix: pubsuffix.getPublicSuffix, + cookieCompare: cookieCompare, + permuteDomain: permuteDomain, + permutePath: permutePath, + canonicalDomain: canonicalDomain, +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js new file mode 100644 index 00000000..66abb376 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js @@ -0,0 +1,102 @@ +var tough = require('./cookie'); +var permuteDomain = tough.permuteDomain; +var permutePath = tough.permutePath; +var util = require('util'); + +function MemoryCookieStore() { + this.idx = {}; +} +module.exports.MemoryCookieStore = MemoryCookieStore; +MemoryCookieStore.prototype.idx = null; + +// force a default depth: +MemoryCookieStore.prototype.inspect = function inspect() { + return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; +}; + +MemoryCookieStore.prototype.findCookie = function findCookie(domain, path, key, cb) { + if (!this.idx[domain]) return cb(null,undefined); + if (!this.idx[domain][path]) return cb(null,undefined); + return cb(null,this.idx[domain][path][key]||null); +}; + +MemoryCookieStore.prototype.findCookies = function findCookies(domain, path, cb) { + var results = []; + if (!domain) return cb(null,[]); + + var pathMatcher; + if (!path) { + // null or '/' means "all paths" + pathMatcher = function matchAll(domainIndex) { + for (var curPath in domainIndex) { + var pathIndex = domainIndex[curPath]; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }; + + } else if (path === '/') { + pathMatcher = function matchSlash(domainIndex) { + var pathIndex = domainIndex['/']; + if (!pathIndex) return; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + }; + + } else { + var paths = permutePath(path) || [path]; + pathMatcher = function matchRFC(domainIndex) { + paths.forEach(function(curPath) { + var pathIndex = domainIndex[curPath]; + if (!pathIndex) return; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + }); + }; + } + + var domains = permuteDomain(domain) || [domain]; + var idx = this.idx; + domains.forEach(function(curDomain) { + var domainIndex = idx[curDomain]; + if (!domainIndex) return; + pathMatcher(domainIndex); + }); + + cb(null,results); +}; + +MemoryCookieStore.prototype.putCookie = function putCookie(cookie, cb) { + if (!this.idx[cookie.domain]) this.idx[cookie.domain] = {}; + if (!this.idx[cookie.domain][cookie.path]) this.idx[cookie.domain][cookie.path] = {}; + this.idx[cookie.domain][cookie.path][cookie.key] = cookie; + cb(null); +}; + +MemoryCookieStore.prototype.updateCookie = function updateCookie(oldCookie, newCookie, cb) { + // updateCookie() may avoid updating cookies that are identical. For example, + // lastAccessed may not be important to some stores and an equality + // comparison could exclude that field. + this.putCookie(newCookie,cb); +}; + +MemoryCookieStore.prototype.removeCookie = function removeCookie(domain, path, key, cb) { + if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { + delete this.idx[domain][path][key]; + } + cb(null); +}; + +MemoryCookieStore.prototype.removeCookies = function removeCookies(domain, path, cb) { + if (!this.idx[domain]) { + if (path) { + delete this.idx[domain][path]; + } else { + delete this.idx[domain]; + } + } + return cb(null); +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js new file mode 100644 index 00000000..a7031473 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js @@ -0,0 +1,69 @@ +/**************************************************** + * AUTOMATICALLY GENERATED by generate-pubsuffix.js * + * DO NOT EDIT! * + ****************************************************/ + +module.exports.getPublicSuffix = function getPublicSuffix(domain) { + /* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + if (!domain) return null; + if (domain.match(/^\./)) return null; + + domain = domain.toLowerCase(); + var parts = domain.split('.').reverse(); + + var suffix = ''; + var suffixLen = 0; + for (var i=0; i suffixLen) { + return parts.slice(0,suffixLen+1).reverse().join('.'); + } + + return null; +}; + +// The following generated structure is used under the MPL version 1.1 +// See public-suffix.txt for more information + +var index = module.exports.index = Object.freeze( +{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"*.ar":true,"congresodelalengua3.ar":false,"educ.ar":false,"gobiernoelectronico.ar":false,"mecon.ar":false,"nacion.ar":false,"nic.ar":false,"promocion.ar":false,"retina.ar":false,"uba.ar":false,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"csiro.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"act.gov.au":true,"nt.gov.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"can.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mus.br":true,"net.br":true,"nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"gov.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cx":true,"gov.cx":true,"*.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"*.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"org.gg":true,"net.gg":true,"sch.gg":true,"gov.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"gm":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"*.gt":true,"www.gt":false,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"co.id":true,"go.id":true,"mil.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"*.il":true,"im":true,"co.im":true,"ltd.co.im":true,"plc.co.im":true,"net.im":true,"gov.im":true,"org.im":true,"nic.im":true,"ac.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"agrigento.it":true,"ag.it":true,"alessandria.it":true,"al.it":true,"ancona.it":true,"an.it":true,"aosta.it":true,"aoste.it":true,"ao.it":true,"arezzo.it":true,"ar.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"ap.it":true,"asti.it":true,"at.it":true,"avellino.it":true,"av.it":true,"bari.it":true,"ba.it":true,"andria-barletta-trani.it":true,"andriabarlettatrani.it":true,"trani-barletta-andria.it":true,"tranibarlettaandria.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"andria-trani-barletta.it":true,"andriatranibarletta.it":true,"trani-andria-barletta.it":true,"traniandriabarletta.it":true,"bt.it":true,"belluno.it":true,"bl.it":true,"benevento.it":true,"bn.it":true,"bergamo.it":true,"bg.it":true,"biella.it":true,"bi.it":true,"bologna.it":true,"bo.it":true,"bolzano.it":true,"bozen.it":true,"balsan.it":true,"alto-adige.it":true,"altoadige.it":true,"suedtirol.it":true,"bz.it":true,"brescia.it":true,"bs.it":true,"brindisi.it":true,"br.it":true,"cagliari.it":true,"ca.it":true,"caltanissetta.it":true,"cl.it":true,"campobasso.it":true,"cb.it":true,"carboniaiglesias.it":true,"carbonia-iglesias.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"ci.it":true,"caserta.it":true,"ce.it":true,"catania.it":true,"ct.it":true,"catanzaro.it":true,"cz.it":true,"chieti.it":true,"ch.it":true,"como.it":true,"co.it":true,"cosenza.it":true,"cs.it":true,"cremona.it":true,"cr.it":true,"crotone.it":true,"kr.it":true,"cuneo.it":true,"cn.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"ogliastra.it":true,"og.it":true,"enna.it":true,"en.it":true,"ferrara.it":true,"fe.it":true,"fermo.it":true,"fm.it":true,"firenze.it":true,"florence.it":true,"fi.it":true,"foggia.it":true,"fg.it":true,"forli-cesena.it":true,"forlicesena.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"fc.it":true,"frosinone.it":true,"fr.it":true,"genova.it":true,"genoa.it":true,"ge.it":true,"gorizia.it":true,"go.it":true,"grosseto.it":true,"gr.it":true,"imperia.it":true,"im.it":true,"isernia.it":true,"is.it":true,"laquila.it":true,"aquila.it":true,"aq.it":true,"la-spezia.it":true,"laspezia.it":true,"sp.it":true,"latina.it":true,"lt.it":true,"lecce.it":true,"le.it":true,"lecco.it":true,"lc.it":true,"livorno.it":true,"li.it":true,"lodi.it":true,"lo.it":true,"lucca.it":true,"lu.it":true,"macerata.it":true,"mc.it":true,"mantova.it":true,"mn.it":true,"massa-carrara.it":true,"massacarrara.it":true,"carrara-massa.it":true,"carraramassa.it":true,"ms.it":true,"matera.it":true,"mt.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"vs.it":true,"messina.it":true,"me.it":true,"milano.it":true,"milan.it":true,"mi.it":true,"modena.it":true,"mo.it":true,"monza.it":true,"monza-brianza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"monza-e-della-brianza.it":true,"mb.it":true,"napoli.it":true,"naples.it":true,"na.it":true,"novara.it":true,"no.it":true,"nuoro.it":true,"nu.it":true,"oristano.it":true,"or.it":true,"padova.it":true,"padua.it":true,"pd.it":true,"palermo.it":true,"pa.it":true,"parma.it":true,"pr.it":true,"pavia.it":true,"pv.it":true,"perugia.it":true,"pg.it":true,"pescara.it":true,"pe.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"pu.it":true,"piacenza.it":true,"pc.it":true,"pisa.it":true,"pi.it":true,"pistoia.it":true,"pt.it":true,"pordenone.it":true,"pn.it":true,"potenza.it":true,"pz.it":true,"prato.it":true,"po.it":true,"ragusa.it":true,"rg.it":true,"ravenna.it":true,"ra.it":true,"reggio-calabria.it":true,"reggiocalabria.it":true,"rc.it":true,"reggio-emilia.it":true,"reggioemilia.it":true,"re.it":true,"rieti.it":true,"ri.it":true,"rimini.it":true,"rn.it":true,"roma.it":true,"rome.it":true,"rm.it":true,"rovigo.it":true,"ro.it":true,"salerno.it":true,"sa.it":true,"sassari.it":true,"ss.it":true,"savona.it":true,"sv.it":true,"siena.it":true,"si.it":true,"siracusa.it":true,"sr.it":true,"sondrio.it":true,"so.it":true,"taranto.it":true,"ta.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"ot.it":true,"teramo.it":true,"te.it":true,"terni.it":true,"tr.it":true,"torino.it":true,"turin.it":true,"to.it":true,"trapani.it":true,"tp.it":true,"trento.it":true,"trentino.it":true,"tn.it":true,"treviso.it":true,"tv.it":true,"trieste.it":true,"ts.it":true,"udine.it":true,"ud.it":true,"varese.it":true,"va.it":true,"venezia.it":true,"venice.it":true,"ve.it":true,"verbania.it":true,"vb.it":true,"vercelli.it":true,"vc.it":true,"verona.it":true,"vr.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vv.it":true,"vicenza.it":true,"vi.it":true,"viterbo.it":true,"vt.it":true,"je":true,"co.je":true,"org.je":true,"net.je":true,"sch.je":true,"gov.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"*.aichi.jp":true,"*.akita.jp":true,"*.aomori.jp":true,"*.chiba.jp":true,"*.ehime.jp":true,"*.fukui.jp":true,"*.fukuoka.jp":true,"*.fukushima.jp":true,"*.gifu.jp":true,"*.gunma.jp":true,"*.hiroshima.jp":true,"*.hokkaido.jp":true,"*.hyogo.jp":true,"*.ibaraki.jp":true,"*.ishikawa.jp":true,"*.iwate.jp":true,"*.kagawa.jp":true,"*.kagoshima.jp":true,"*.kanagawa.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.kochi.jp":true,"*.kumamoto.jp":true,"*.kyoto.jp":true,"*.mie.jp":true,"*.miyagi.jp":true,"*.miyazaki.jp":true,"*.nagano.jp":true,"*.nagasaki.jp":true,"*.nagoya.jp":true,"*.nara.jp":true,"*.niigata.jp":true,"*.oita.jp":true,"*.okayama.jp":true,"*.okinawa.jp":true,"*.osaka.jp":true,"*.saga.jp":true,"*.saitama.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.shiga.jp":true,"*.shimane.jp":true,"*.shizuoka.jp":true,"*.tochigi.jp":true,"*.tokushima.jp":true,"*.tokyo.jp":true,"*.tottori.jp":true,"*.toyama.jp":true,"*.wakayama.jp":true,"*.yamagata.jp":true,"*.yamaguchi.jp":true,"*.yamanashi.jp":true,"*.yokohama.jp":true,"metro.tokyo.jp":false,"pref.aichi.jp":false,"pref.akita.jp":false,"pref.aomori.jp":false,"pref.chiba.jp":false,"pref.ehime.jp":false,"pref.fukui.jp":false,"pref.fukuoka.jp":false,"pref.fukushima.jp":false,"pref.gifu.jp":false,"pref.gunma.jp":false,"pref.hiroshima.jp":false,"pref.hokkaido.jp":false,"pref.hyogo.jp":false,"pref.ibaraki.jp":false,"pref.ishikawa.jp":false,"pref.iwate.jp":false,"pref.kagawa.jp":false,"pref.kagoshima.jp":false,"pref.kanagawa.jp":false,"pref.kochi.jp":false,"pref.kumamoto.jp":false,"pref.kyoto.jp":false,"pref.mie.jp":false,"pref.miyagi.jp":false,"pref.miyazaki.jp":false,"pref.nagano.jp":false,"pref.nagasaki.jp":false,"pref.nara.jp":false,"pref.niigata.jp":false,"pref.oita.jp":false,"pref.okayama.jp":false,"pref.okinawa.jp":false,"pref.osaka.jp":false,"pref.saga.jp":false,"pref.saitama.jp":false,"pref.shiga.jp":false,"pref.shimane.jp":false,"pref.shizuoka.jp":false,"pref.tochigi.jp":false,"pref.tokushima.jp":false,"pref.tottori.jp":false,"pref.toyama.jp":false,"pref.wakayama.jp":false,"pref.yamagata.jp":false,"pref.yamaguchi.jp":false,"pref.yamanashi.jp":false,"city.chiba.jp":false,"city.fukuoka.jp":false,"city.hiroshima.jp":false,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.kyoto.jp":false,"city.nagoya.jp":false,"city.niigata.jp":false,"city.okayama.jp":false,"city.osaka.jp":false,"city.saitama.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.shizuoka.jp":false,"city.yokohama.jp":false,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"*.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ac.ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"net.ng":true,"org.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"*.nz":true,"*.om":true,"mediaphone.om":false,"nawrastelecom.om":false,"nawras.om":false,"omanmobile.om":false,"omanpost.om":false,"omantel.om":false,"rakpetroleum.om":false,"siemens.om":false,"songfest.om":false,"statecouncil.om":false,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"com.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"net.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"org.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"6bone.pl":true,"art.pl":true,"mbone.pl":true,"gov.pl":true,"uw.gov.pl":true,"um.gov.pl":true,"ug.gov.pl":true,"upow.gov.pl":true,"starostwo.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"po.gov.pl":true,"pa.gov.pl":true,"ngo.pl":true,"irc.pl":true,"usenet.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"siedlce.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"*.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"mosreg.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"pskov.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"sshn.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"si":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"*.sv":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"*.tr":true,"nic.tr":false,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"ac.tz":true,"co.tz":true,"go.tz":true,"mil.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"chernigov.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"ks.ua":true,"kv.ua":true,"lg.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lviv.ua":true,"mk.ua":true,"nikolaev.ua":true,"od.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rovno.ua":true,"rv.ua":true,"sebastopol.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vn.ua":true,"zaporizhzhe.ua":true,"zp.ua":true,"zhitomir.ua":true,"zt.ua":true,"co.ua":true,"pp.ua":true,"ug":true,"co.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"or.ug":true,"*.uk":true,"*.sch.uk":true,"bl.uk":false,"british-library.uk":false,"icnet.uk":false,"jet.uk":false,"mod.uk":false,"nel.uk":false,"nhs.uk":false,"nic.uk":false,"nls.uk":false,"national-library-scotland.uk":false,"parliament.uk":false,"police.uk":false,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.nd.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.sd.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wv.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wv.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"*.uy":true,"uz":true,"com.uz":true,"co.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"*.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--54b7fta0cc":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--mgb9awbf":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"*.za":true,"*.zm":true,"*.zw":true,"biz.at":true,"info.at":true,"priv.at":true,"co.ca":true,"ar.com":true,"br.com":true,"cn.com":true,"de.com":true,"eu.com":true,"gb.com":true,"gr.com":true,"hu.com":true,"jpn.com":true,"kr.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"uk.com":true,"us.com":true,"uy.com":true,"za.com":true,"gb.net":true,"jp.net":true,"se.net":true,"uk.net":true,"ae.org":true,"us.org":true,"com.de":true,"operaunite.com":true,"appspot.com":true,"iki.fi":true,"c.la":true,"za.net":true,"za.org":true,"co.nl":true,"co.no":true,"co.pl":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true}); + +// END of automatically generated file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt new file mode 100644 index 00000000..11dddd00 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt @@ -0,0 +1,278 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt new file mode 100644 index 00000000..97067e54 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json new file mode 100644 index 00000000..69e12ae2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json @@ -0,0 +1,77 @@ +{ + "name": "punycode", + "version": "1.2.3", + "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", + "homepage": "http://mths.be/punycode", + "main": "punycode.js", + "keywords": [ + "punycode", + "unicode", + "idn", + "idna", + "dns", + "url", + "domain" + ], + "licenses": [ + { + "type": "MIT", + "url": "http://mths.be/mit" + }, + { + "type": "GPL", + "url": "http://mths.be/gpl" + } + ], + "author": { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "http://mathiasbynens.be/" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "http://mathiasbynens.be/" + }, + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + } + ], + "bugs": { + "url": "https://github.com/bestiejs/punycode.js/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/bestiejs/punycode.js.git" + }, + "engines": [ + "node", + "rhino" + ], + "directories": { + "doc": "docs", + "test": "tests" + }, + "scripts": { + "test": "node tests/tests.js" + }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-uglify": "~0.2.2", + "grunt-shell": "~0.2.2", + "istanbul": "~0.1.37", + "qunit-clib": "~1.3.0", + "qunitjs": "~1.11.0", + "requirejs": "~2.1.6" + }, + "readme": "ERROR: No README data found!", + "_id": "punycode@1.2.3", + "dist": { + "shasum": "b4e304471082d783c73b3bafabf2fd9b6a486266" + }, + "_from": "punycode@>=0.2.0", + "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js new file mode 100644 index 00000000..41803ba4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js @@ -0,0 +1,508 @@ +/*! http://mths.be/punycode v1.2.3 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports; + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + while (length--) { + array[length] = fn(array[length]); + } + return array; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings. + * @private + * @param {String} domain The domain name. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + return map(string.split(regexSeparators), fn).join('.'); + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * http://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + length, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols to a Punycode string of ASCII-only + * symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name to Unicode. Only the + * Punycoded parts of the domain name will be converted, i.e. it doesn't + * matter if you call it on a string that has already been converted to + * Unicode. + * @memberOf punycode + * @param {String} domain The Punycode domain name to convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(domain) { + return mapDomain(domain, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name to Punycode. Only the + * non-ASCII parts of the domain name will be converted, i.e. it doesn't + * matter if you call it with a domain that's already in ASCII. + * @memberOf punycode + * @param {String} domain The domain name to convert, as a Unicode string. + * @returns {String} The Punycode representation of the given domain name. + */ + function toASCII(domain) { + return mapDomain(domain, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.2.3', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return punycode; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js new file mode 100644 index 00000000..ac5d914a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js @@ -0,0 +1,2 @@ +/*! http://mths.be/punycode v1.2.3 by @mathias */ +(function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(55296|1023&o>>>10),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*y>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?C:s>=m+y?y:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?C:p>=l+y?y:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,C=1,y=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-C,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.3",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g})(this); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt new file mode 100644 index 00000000..a7501f98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright 2011-2013 John-David Dalton + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md new file mode 100644 index 00000000..fbddce91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md @@ -0,0 +1,35 @@ +# Docdown v1.0.0 + +A simple JSDoc to Markdown documentation generator. + +## Documentation + +The documentation for Docdown can be viewed here: [/doc/README.md](https://github.com/jdalton/docdown/blob/master/doc/README.md#readme) + +For a list of upcoming features, check out our [roadmap](https://github.com/jdalton/docdown/wiki/Roadmap). + +## Installation and usage + +Usage example: + +```php +require("docdown.php"); + +// generate Markdown +$markdown = docdown(array( + "path" => $filepath, + "url" => "https://github.com/username/project/blob/master/my.js" +)); +``` + +## Author + +| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | +|---| +| [John-David Dalton](http://allyoucanleet.com/) | + +## Contributors + +| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md new file mode 100644 index 00000000..459d36ab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md @@ -0,0 +1,69 @@ +# Docdown v1.0.0 + + + + + + +##
`docdown` +* [`docdown`](#docdown$optionsarray) + + + + + + + + + + + + +## `docdown` + + + +### `docdown([$options=array()])` +# [Ⓢ](https://github.com/jdalton/docdown/blob/master/docdown.php#L34 "View in source") [Ⓣ][1] + +Generates Markdown from JSDoc entries in a given file. + +#### Arguments +1. `[$options=array()]` *(Array)*: The options array. + +#### Returns +*(String)*: The generated Markdown. + +#### Example +```php +// specify a file path +$markdown = docdown(array( + // path to js file + 'path' => $filepath, + // url used to reference line numbers in code + 'url' => 'https://github.com/username/project/blob/master/my.js' +)); + +// or pass raw js +$markdown = docdown(array( + // raw JavaScript source + 'source' => $rawJS, + // documentation title + 'title' => 'My API Documentation', + // url used to reference line numbers in code + 'url' => 'https://github.com/username/project/blob/master/my.js' +)); +``` + +* * * + + + + + + + + + + + [1]: #docdown "Jump back to the TOC." \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php new file mode 100644 index 00000000..eca8d145 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php @@ -0,0 +1,35 @@ + '../' . $file, + 'title' => 'Docdown v1.0.0', + 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php' + )); + + // save to a .md file + file_put_contents($output . '.md', $markdown); + + // print + header('Content-Type: text/plain;charset=utf-8'); + echo $markdown . PHP_EOL; + +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php new file mode 100644 index 00000000..4a786d75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php @@ -0,0 +1,38 @@ + + * Available under MIT license + */ +require(dirname(__FILE__) . '/src/DocDown/Generator.php'); + +/** + * Generates Markdown from JSDoc entries in a given file. + * + * @param {Array} [$options=array()] The options array. + * @returns {String} The generated Markdown. + * @example + * + * // specify a file path + * $markdown = docdown(array( + * // path to js file + * 'path' => $filepath, + * // url used to reference line numbers in code + * 'url' => 'https://github.com/username/project/blob/master/my.js' + * )); + * + * // or pass raw js + * $markdown = docdown(array( + * // raw JavaScript source + * 'source' => $rawJS, + * // documentation title + * 'title' => 'My API Documentation', + * // url used to reference line numbers in code + * 'url' => 'https://github.com/username/project/blob/master/my.js' + * )); + */ +function docdown( $options = array() ) { + $gen = new Generator($options); + return $gen->generate(); +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php new file mode 100644 index 00000000..0a7c552e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php @@ -0,0 +1,226 @@ +owner = $owner; + $this->_name = $name; + $this->_call = $owner->getCall(); + $this->_category = $owner->getCategory(); + $this->_desc = $owner->getDesc(); + $this->_example = $owner->getExample(); + $this->_isCtor = $owner->isCtor(); + $this->_isLicense = $owner->isLicense(); + $this->_isPlugin = $owner->isPlugin(); + $this->_isPrivate = $owner->isPrivate(); + $this->_isStatic = $owner->isStatic(); + $this->_lineNumber = $owner->getLineNumber(); + $this->_members = $owner->getMembers(); + $this->_params = $owner->getParams(); + $this->_returns = $owner->getReturns(); + $this->_type = $owner->getType(); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the entry's `alias` objects. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `alias` objects. + */ + public function getAliases( $index = null ) { + $result = array(); + return $index !== null + ? @$result[$index] + : $result; + } + + /** + * Extracts the function call from the owner entry. + * + * @memberOf Alias + * @returns {String} The function call. + */ + public function getCall() { + return $this->_call; + } + + /** + * Extracts the owner entry's `category` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `category` data. + */ + public function getCategory() { + return $this->_category; + } + + /** + * Extracts the owner entry's description. + * + * @memberOf Alias + * @returns {String} The owner entry's description. + */ + public function getDesc() { + return $this->_desc; + } + + /** + * Extracts the owner entry's `example` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `example` data. + */ + public function getExample() { + return $this->_example; + } + + /** + * Checks if the entry is an alias. + * + * @memberOf Alias + * @returns {Boolean} Returns `true`. + */ + public function isAlias() { + return true; + } + + /** + * Checks if the owner entry is a constructor. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if a constructor, else `false`. + */ + public function isCtor() { + return $this->_isCtor; + } + + /** + * Checks if the owner entry is a license. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if a license, else `false`. + */ + public function isLicense() { + return $this->_isLicense; + } + + /** + * Checks if the owner entry *is* assigned to a prototype. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. + */ + public function isPlugin() { + return $this->_isPlugin; + } + + /** + * Checks if the owner entry is private. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if private, else `false`. + */ + public function isPrivate() { + return $this->_isPrivate; + } + + /** + * Checks if the owner entry is *not* assigned to a prototype. + * + * @memberOf Alias + * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. + */ + public function isStatic() { + return $this->_isStatic; + } + + /** + * Resolves the owner entry's line number. + * + * @memberOf Alias + * @returns {Number} The owner entry's line number. + */ + public function getLineNumber() { + return $this->_lineNumber; + } + + /** + * Extracts the owner entry's `member` data. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The owner entry's `member` data. + */ + public function getMembers( $index = null ) { + return $index !== null + ? @$this->_members[$index] + : $this->_members; + } + + /** + * Extracts the owner entry's `name` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `name` data. + */ + public function getName() { + return $this->_name; + } + + /** + * Extracts the owner entry's `param` data. + * + * @memberOf Alias + * @param {Number} $index The index of the array value to return. + * @returns {Array} The owner entry's `param` data. + */ + public function getParams( $index = null ) { + return $index !== null + ? @$this->_params[$index] + : $this->_params; + } + + /** + * Extracts the owner entry's `returns` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `returns` data. + */ + public function getReturns() { + return $this->_returns; + } + + /** + * Extracts the owner entry's `type` data. + * + * @memberOf Alias + * @returns {String} The owner entry's `type` data. + */ + public function getType() { + return $this->_type; + } +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php new file mode 100644 index 00000000..a973d9a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php @@ -0,0 +1,442 @@ +entry = $entry; + $this->lang = $lang; + $this->source = str_replace(PHP_EOL, "\n", $source); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the documentation entries from source code. + * + * @static + * @memberOf Entry + * @param {String} $source The source code. + * @returns {Array} The array of entries. + */ + public static function getEntries( $source ) { + preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result); + return array_pop($result); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Checks if the entry is a function reference. + * + * @private + * @memberOf Entry + * @returns {Boolean} Returns `true` if the entry is a function reference, else `false`. + */ + private function isFunction() { + if (!isset($this->_isFunction)) { + $this->_isFunction = !!( + $this->isCtor() || + count($this->getParams()) || + count($this->getReturns()) || + preg_match('/\*[\t ]*@function\b/', $this->entry) + ); + } + return $this->_isFunction; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Extracts the entry's `alias` objects. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `alias` objects. + */ + public function getAliases( $index = null ) { + if (!isset($this->_aliases)) { + preg_match('#\*[\t ]*@alias\s+(.+)#', $this->entry, $result); + + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + $result = preg_split('/,\s*/', $result); + natsort($result); + + foreach ($result as $resultIndex => $value) { + $result[$resultIndex] = new Alias($value, $this); + } + } + $this->_aliases = $result; + } + return $index !== null + ? @$this->_aliases[$index] + : $this->_aliases; + } + + /** + * Extracts the function call from the entry. + * + * @memberOf Entry + * @returns {String} The function call. + */ + public function getCall() { + if (isset($this->_call)) { + return $this->_call; + } + + preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result); + if ($result = array_pop($result)) { + $result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'"))); + } + // resolve name + // avoid $this->getName() because it calls $this->getCall() + preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $name); + if (count($name)) { + $name = trim($name[1]); + } else { + $name = $result; + } + // compile function call syntax + if ($this->isFunction()) { + // compose parts + $result = array($result); + $params = $this->getParams(); + foreach ($params as $param) { + $result[] = $param[1]; + } + // format + $result = $name .'('. implode(array_slice($result, 1), ', ') .')'; + $result = str_replace(', [', ' [, ', str_replace('], [', ', ', $result)); + } + + $this->_call = $result ? $result : $name; + return $this->_call; + } + + /** + * Extracts the entry's `category` data. + * + * @memberOf Entry + * @returns {String} The entry's `category` data. + */ + public function getCategory() { + if (isset($this->_category)) { + return $this->_category; + } + + preg_match('#\*[\t ]*@category\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = $this->getType() == 'Function' ? 'Methods' : 'Properties'; + } + $this->_category = $result; + return $result; + } + + /** + * Extracts the entry's description. + * + * @memberOf Entry + * @returns {String} The entry's description. + */ + public function getDesc() { + if (isset($this->_desc)) { + return $this->_desc; + } + + preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $type = $this->getType(); + $result = preg_replace('/:\n[\t ]*\*[\t ]*/', ":
\n", $result[1]); + $result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result); + $result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result); + $result = trim($result); + $result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; + } + $this->_desc = $result; + return $result; + } + + /** + * Extracts the entry's `example` data. + * + * @memberOf Entry + * @returns {String} The entry's `example` data. + */ + public function getExample() { + if (isset($this->_example)) { + return $this->_example; + } + + preg_match('#\*[\t ]*@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', "\n", $result[1])); + $result = '```' . $this->lang . "\n" . $result . "\n```"; + } + $this->_example = $result; + return $result; + } + + /** + * Checks if the entry is an alias. + * + * @memberOf Entry + * @returns {Boolean} Returns `false`. + */ + public function isAlias() { + return false; + } + + /** + * Checks if the entry is a constructor. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if a constructor, else `false`. + */ + public function isCtor() { + if (!isset($this->_isCtor)) { + $this->_isCtor = !!preg_match('/\*[\t ]*@constructor\b/', $this->entry); + } + return $this->_isCtor; + } + + /** + * Checks if the entry is a license. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if a license, else `false`. + */ + public function isLicense() { + if (!isset($this->_isLicense)) { + $this->_isLicense = !!preg_match('/\*[\t ]*@license\b/', $this->entry); + } + return $this->_isLicense; + } + + /** + * Checks if the entry *is* assigned to a prototype. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. + */ + public function isPlugin() { + if (!isset($this->_isPlugin)) { + $this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic(); + } + return $this->_isPlugin; + } + + /** + * Checks if the entry is private. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if private, else `false`. + */ + public function isPrivate() { + if (!isset($this->_isPrivate)) { + $this->_isPrivate = $this->isLicense() || !!preg_match('/\*[\t ]*@private\b/', $this->entry) || !preg_match('/\*[\t ]*@[a-z]+\b/', $this->entry); + } + return $this->_isPrivate; + } + + /** + * Checks if the entry is *not* assigned to a prototype. + * + * @memberOf Entry + * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. + */ + public function isStatic() { + if (isset($this->_isStatic)) { + return $this->_isStatic; + } + + $public = !$this->isPrivate(); + $result = $public && !!preg_match('/\*[\t ]*@static\b/', $this->entry); + + // set in cases where it isn't explicitly stated + if ($public && !$result) { + if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) { + foreach (Entry::getEntries($this->source) as $entry) { + $entry = new Entry($entry, $this->source); + if ($entry->getName() == $parent) { + $result = !$entry->isCtor(); + break; + } + } + } else { + $result = true; + } + } + $this->_isStatic = $result; + return $result; + } + + /** + * Resolves the entry's line number. + * + * @memberOf Entry + * @returns {Number} The entry's line number. + */ + public function getLineNumber() { + if (!isset($this->_lineNumber)) { + preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines); + $this->_lineNumber = count(array_pop($lines)) + 1; + } + return $this->_lineNumber; + } + + /** + * Extracts the entry's `member` data. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array|String} The entry's `member` data. + */ + public function getMembers( $index = null ) { + if (!isset($this->_members)) { + preg_match('#\*[\t ]*@member(?:Of)?\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + $result = preg_split('/,\s*/', $result); + natsort($result); + } + $this->_members = $result; + } + return $index !== null + ? @$this->_members[$index] + : $this->_members; + } + + /** + * Extracts the entry's `name` data. + * + * @memberOf Entry + * @returns {String} The entry's `name` data. + */ + public function getName() { + if (isset($this->_name)) { + return $this->_name; + } + + preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = array_shift(explode('(', $this->getCall())); + } + $this->_name = $result; + return $result; + } + + /** + * Extracts the entry's `param` data. + * + * @memberOf Entry + * @param {Number} $index The index of the array value to return. + * @returns {Array} The entry's `param` data. + */ + public function getParams( $index = null ) { + if (!isset($this->_params)) { + preg_match_all('#\*[\t ]*@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result); + if (count($result = array_filter(array_slice($result, 1)))) { + // repurpose array + foreach ($result as $param) { + foreach ($param as $key => $value) { + if (!is_array($result[0][$key])) { + $result[0][$key] = array(); + } + $result[0][$key][] = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]*/', ' ', $value)); + } + } + $result = $result[0]; + } + $this->_params = $result; + } + return $index !== null + ? @$this->_params[$index] + : $this->_params; + } + + /** + * Extracts the entry's `returns` data. + * + * @memberOf Entry + * @returns {String} The entry's `returns` data. + */ + public function getReturns() { + if (isset($this->_returns)) { + return $this->_returns; + } + + preg_match('#\*[\t ]*@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); + if (count($result)) { + $result = array_map('trim', array_slice($result, 1)); + $result[0] = str_replace('|', ', ', $result[0]); + $result[1] = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]); + } + $this->_returns = $result; + return $result; + } + + /** + * Extracts the entry's `type` data. + * + * @memberOf Entry + * @returns {String} The entry's `type` data. + */ + public function getType() { + if (isset($this->_type)) { + return $this->_type; + } + + preg_match('#\*[\t ]*@type\s+(.+)#', $this->entry, $result); + if (count($result)) { + $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); + } else { + $result = $this->isFunction() ? 'Function' : 'Unknown'; + } + $this->_type = $result; + return $result; + } +} +?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php new file mode 100644 index 00000000..5dc2583f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php @@ -0,0 +1,563 @@ +\n"; + + /** + * An array of JSDoc entries. + * + * @memberOf Generator + * @type Array + */ + public $entries = array(); + + /** + * The HTML for the open tag. + * + * @static + * @memberOf Generator + * @type String + */ + public $openTag = "\n\n"; + + /** + * An options array used to configure the generator. + * + * @memberOf Generator + * @type Array + */ + public $options = array(); + + /** + * The file's source code. + * + * @memberOf Generator + * @type String + */ + public $source = ''; + + /*--------------------------------------------------------------------------*/ + + /** + * The Generator constructor. + * + * @constructor + * @param {String} $source The source code to parse. + * @param {Array} $options The options array. + */ + public function __construct( $source, $options = array() ) { + // juggle arguments + if (is_array($source)) { + $options = $source; + } else { + $options['source'] = $source; + } + if (isset($options['source']) && realpath($options['source'])) { + $options['path'] = $options['source']; + } + if (isset($options['path'])) { + preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext); + $options['source'] = file_get_contents($options['path']); + $ext = array_pop($ext); + + if (!isset($options['lang']) && $ext) { + $options['lang'] = $ext; + } + if (!isset($options['title'])) { + $options['title'] = ucfirst(basename($options['path'])) . ' API documentation'; + } + } + if (!isset($options['lang'])) { + $options['lang'] = 'js'; + } + if (!isset($options['toc'])) { + $options['toc'] = 'properties'; + } + + $this->options = $options; + $this->source = str_replace(PHP_EOL, "\n", $options['source']); + $this->entries = Entry::getEntries($this->source); + + foreach ($this->entries as $index => $value) { + $this->entries[$index] = new Entry($value, $this->source, $options['lang']); + } + } + + /*--------------------------------------------------------------------------*/ + + /** + * Performs common string formatting operations. + * + * @private + * @static + * @memberOf Generator + * @param {String} $string The string to format. + * @returns {String} The formatted string. + */ + private static function format( $string ) { + $counter = 0; + + // tokenize inline code snippets + preg_match_all('/`[^`]+`/', $string, $tokenized); + $tokenized = $tokenized[0]; + foreach ($tokenized as $snippet) { + $string = str_replace($snippet, '__token' . ($counter++) .'__', $string); + } + + // italicize parentheses + $string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string); + + // mark numbers as inline code + $string = preg_replace('/[\t ](-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string); + + // detokenize inline code snippets + $counter = 0; + foreach ($tokenized as $snippet) { + $string = str_replace('__token' . ($counter++) . '__', $snippet, $string); + } + + return trim($string); + } + + /** + * Modify a string by replacing named tokens with matching assoc. array values. + * + * @private + * @static + * @memberOf Generator + * @param {String} $string The string to modify. + * @param {Array|Object} $object The template object. + * @returns {String} The modified string. + */ + private static function interpolate( $string, $object ) { + preg_match_all('/#\{([^}]+)\}/', $string, $tokens); + $tokens = array_unique(array_pop($tokens)); + + foreach ($tokens as $token) { + $pattern = '/#\{' . $token . '\}/'; + $replacement = ''; + + if (is_object($object)) { + preg_match('/\(([^)]+?)\)$/', $token, $args); + $args = preg_split('/,\s*/', array_pop($args)); + $method = 'get' . ucfirst(str_replace('/\([^)]+?\)$/', '', $token)); + + if (method_exists($object, $method)) { + $replacement = (string) call_user_func_array(array($object, $method), $args); + } else if (isset($object->{$token})) { + $replacement = (string) $object->{$token}; + } + } else if (isset($object[$token])) { + $replacement = (string) $object[$token]; + } + $string = preg_replace($pattern, trim($replacement), $string); + } + return Generator::format($string); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Adds the given `$entries` to the `$result` array. + * + * @private + * @memberOf Generator + * @param {Array} $result The result array to modify. + * @param {Array} $entries The entries to add to the `$result`. + */ + private function addEntries( &$result, $entries ) { + foreach ($entries as $entry) { + // skip aliases + if ($entry->isAlias()) { + continue; + } + // name and description + array_push( + $result, + $this->openTag, + Generator::interpolate("### `#{member}#{separator}#{call}`\n# [Ⓢ](#{href} \"View in source\") [Ⓣ][1]\n\n#{desc}", $entry) + ); + + // @alias + if (count($aliases = $entry->getAliases())) { + array_push($result, '', '#### Aliases'); + foreach ($aliases as $index => $alias) { + $aliases[$index] = $alias->getName(); + } + $result[] = '*' . implode(', ', $aliases) . '*'; + } + // @param + if (count($params = $entry->getParams())) { + array_push($result, '', '#### Arguments'); + foreach ($params as $index => $param) { + $result[] = Generator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array( + 'desc' => $param[2], + 'name' => $param[1], + 'num' => $index + 1, + 'type' => $param[0] + )); + } + } + // @returns + if (count($returns = $entry->getReturns())) { + array_push( + $result, '', + '#### Returns', + Generator::interpolate('(#{type}): #{desc}', array('desc' => $returns[1], 'type' => $returns[0])) + ); + } + // @example + if ($example = $entry->getExample()) { + array_push($result, '', '#### Example', $example); + } + array_push($result, "\n* * *", $this->closeTag); + } + } + + /** + * Resolves the entry's hash used to navigate the documentation. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @param {String} $member The name of the member. + * @returns {String} The url hash. + */ + private function getHash( $entry, $member = '' ) { + $entry = is_numeric($entry) ? $this->entries[$entry] : $entry; + $member = !$member ? $entry->getMembers(0) : $member; + $result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall(); + $result = preg_replace('/\(\[|\[\]/', '', $result); + $result = preg_replace('/[ =|\'"{}.()\]]/', '', $result); + $result = preg_replace('/[[#,]/', '-', $result); + return strtolower($result); + } + + /** + * Resolves the entry's url for the specific line number. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @returns {String} The url. + */ + private function getLineUrl( $entry ) { + $entry = is_numeric($entry) ? $this->entries($entry) : $entry; + return $this->options['url'] . '#L' . $entry->getLineNumber(); + } + + /** + * Extracts the character used to separate the entry's name from its member. + * + * @private + * @memberOf Generator + * @param {Number|Object} $entry The entry object. + * @returns {String} The separator. + */ + private function getSeparator( $entry ) { + $entry = is_numeric($entry) ? $this->entries($entry) : $entry; + return $entry->isPlugin() ? '.prototype.' : '.'; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Generates Markdown from JSDoc entries. + * + * @memberOf Generator + * @returns {String} The rendered Markdown. + */ + public function generate() { + $api = array(); + $byCategory = $this->options['toc'] == 'categories'; + $categories = array(); + $closeTag = $this->closeTag; + $compiling = false; + $openTag = $this->openTag; + $result = array('# ' . $this->options['title']); + $toc = 'toc'; + + // initialize $api array + foreach ($this->entries as $entry) { + // skip invalid or private entries + $name = $entry->getName(); + if (!$name || $entry->isPrivate()) { + continue; + } + + $members = $entry->getMembers(); + $members = count($members) ? $members : array(''); + + foreach ($members as $member) { + // create api category arrays + if ($member && !isset($api[$member])) { + // create temporary entry to be replaced later + $api[$member] = new stdClass; + $api[$member]->static = array(); + $api[$member]->plugin = array(); + } + + // append entry to api member + if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' && + !preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) { + + // assign the real entry, replacing the temporary entry if it exist + $member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name; + $entry->static = @$api[$member] ? $api[$member]->static : array(); + $entry->plugin = @$api[$member] ? $api[$member]->plugin : array(); + + $api[$member] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->static[] = $alias; + } + } + else if ($entry->isStatic()) { + $api[$member]->static[] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->static[] = $alias; + } + } + else if (!$entry->isCtor()) { + $api[$member]->plugin[] = $entry; + foreach ($entry->getAliases() as $alias) { + $api[$member]->plugin[] = $alias; + } + } + } + } + + // add properties to each entry + foreach ($api as $entry) { + $entry->hash = $this->getHash($entry); + $entry->href = $this->getLineUrl($entry); + + $member = $entry->getMembers(0); + $member = ($member ? $member . ($entry->isPlugin() ? '.prototype.' : '.') : '') . $entry->getName(); + $entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member); + + // add properties to static and plugin sub-entries + foreach (array('static', 'plugin') as $kind) { + foreach ($entry->{$kind} as $subentry) { + $subentry->hash = $this->getHash($subentry); + $subentry->href = $this->getLineUrl($subentry); + $subentry->member = $member; + $subentry->separator = $this->getSeparator($subentry); + } + } + } + + /*------------------------------------------------------------------------*/ + + // custom sort for root level entries + // TODO: see how well it handles deeper namespace traversal + function sortCompare($a, $b) { + $score = array( 'a' => 0, 'b' => 0); + foreach (array( 'a' => $a, 'b' => $b) as $key => $value) { + // capitalized properties are last + if (preg_match('/[#.][A-Z]/', $value)) { + $score[$key] = 0; + } + // lowercase prototype properties are next to last + else if (preg_match('/#[a-z]/', $value)) { + $score[$key] = 1; + } + // lowercase static properties next to first + else if (preg_match('/\.[a-z]/', $value)) { + $score[$key] = 2; + } + // root properties are first + else if (preg_match('/^[^#.]+$/', $value)) { + $score[$key] = 3; + } + } + $score = $score['b'] - $score['a']; + return $score ? $score : strcasecmp($a, $b); + } + + uksort($api, 'sortCompare'); + + // sort static and plugin sub-entries + foreach ($api as $entry) { + foreach (array('static', 'plugin') as $kind) { + $sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() ); + foreach ($entry->{$kind} as $subentry) { + $name = $subentry->getName(); + // functions w/o ALL-CAPs names are last + $sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name); + // ALL-CAPs properties first + $sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name); + // lowercase alphanumeric sort + $sortBy['c'][] = strtolower($name); + } + array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind}); + } + } + + /*------------------------------------------------------------------------*/ + + // add categories + foreach ($api as $entry) { + $categories[$entry->getCategory()][] = $entry; + foreach (array('static', 'plugin') as $kind) { + foreach ($entry->{$kind} as $subentry) { + $categories[$subentry->getCategory()][] = $subentry; + } + } + } + + // sort categories + ksort($categories); + + foreach(array('Methods', 'Properties') as $category) { + if (isset($categories[$category])) { + $entries = $categories[$category]; + unset($categories[$category]); + $categories[$category] = $entries; + } + } + + /*------------------------------------------------------------------------*/ + + // compile TOC + $result[] = $openTag; + + // compile TOC by categories + if ($byCategory) { + foreach ($categories as $category => $entries) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + // assign TOC hash + if (count($result) == 2) { + $toc = $category; + } + // add category + array_push( + $result, + $openTag, '## ' . (count($result) == 2 ? '' : '') . '`' . $category . '`' + ); + // add entries + foreach ($entries as $entry) { + $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry); + } + } + } + // compile TOC by namespace + else { + foreach ($api as $entry) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + $member = $entry->member . $entry->getName(); + + // assign TOC hash + if (count($result) == 2) { + $toc = $member; + } + // add root entry + array_push( + $result, + $openTag, '## ' . (count($result) == 2 ? '' : '') . '`' . $member . '`', + Generator::interpolate('* [`' . $member . '`](##{hash})', $entry) + ); + + // add static and plugin sub-entries + foreach (array('static', 'plugin') as $kind) { + if ($kind == 'plugin' && count($entry->plugin)) { + array_push( + $result, + $closeTag, + $openTag, + '## `' . $member . ($entry->isCtor() ? '.prototype`' : '`') + ); + } + foreach ($entry->{$kind} as $subentry) { + $subentry->member = $member; + $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry); + } + } + } + } + + array_push($result, $closeTag, $closeTag); + + /*------------------------------------------------------------------------*/ + + // compile content + $compiling = false; + $result[] = $openTag; + + if ($byCategory) { + foreach ($categories as $category => $entries) { + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + if ($category != 'Methods' && $category != 'Properties') { + $category = '“' . $category . '” Methods'; + } + array_push($result, $openTag, '## `' . $category . '`'); + $this->addEntries($result, $entries); + } + } + else { + foreach ($api as $entry) { + // skip aliases + if ($entry->isAlias()) { + continue; + } + if ($compiling) { + $result[] = $closeTag; + } else { + $compiling = true; + } + // add root entry name + $member = $entry->member . $entry->getName(); + array_push($result, $openTag, '## `' . $member . '`'); + + foreach (array($entry, 'static', 'plugin') as $kind) { + $subentries = is_string($kind) ? $entry->{$kind} : array($kind); + + // add sub-entry name + if ($kind != 'static' && $entry->getType() != 'Object' && + count($subentries) && $subentries[0] != $kind) { + if ($kind == 'plugin') { + $result[] = $closeTag; + } + array_push( + $result, + $openTag, + '## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`') + ); + } + $this->addEntries($result, $subentries); + } + } + } + + // close tags add TOC link reference + array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."'); + + // cleanup whitespace + return trim(preg_replace('/[\t ]+\n/', "\n", join($result, "\n"))); + } +} +?> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json new file mode 100644 index 00000000..167c7c6a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json @@ -0,0 +1,50 @@ +{ + "author": { + "name": "Jeremy Stashewsky", + "email": "jeremy@goinstant.com", + "url": "https://github.com/stash" + }, + "name": "tough-cookie", + "description": "RFC6265 Cookies and Cookie Jar for node.js", + "keywords": [ + "HTTP", + "cookie", + "cookies", + "set-cookie", + "cookiejar", + "jar", + "RFC6265", + "RFC2965" + ], + "version": "0.9.15", + "homepage": "https://github.com/goinstant/node-cookie", + "repository": { + "type": "git", + "url": "git://github.com/goinstant/node-cookie.git" + }, + "bugs": { + "url": "https://github.com/goinstant/node-cookie/issues" + }, + "main": "./lib/cookie", + "scripts": { + "test": "vows test.js" + }, + "engines": { + "node": ">=0.4.12" + }, + "dependencies": { + "punycode": ">=0.2.0" + }, + "devDependencies": { + "vows": ">=0.6.0", + "async": ">=0.1.12" + }, + "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n", + "readmeFilename": "README.md", + "_id": "tough-cookie@0.9.15", + "dist": { + "shasum": "0fbda7fb5b5bca17e4f97909a0818dc8c2c12588" + }, + "_from": "tough-cookie@~0.9.15", + "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt new file mode 100644 index 00000000..2c201312 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt @@ -0,0 +1,5229 @@ +// ***** BEGIN LICENSE BLOCK ***** +// Version: MPL 1.1/GPL 2.0/LGPL 2.1 +// +// The contents of this file are subject to the Mozilla Public License Version +// 1.1 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the +// License. +// +// The Original Code is the Public Suffix List. +// +// The Initial Developer of the Original Code is +// Jo Hermans . +// Portions created by the Initial Developer are Copyright (C) 2007 +// the Initial Developer. All Rights Reserved. +// +// Contributor(s): +// Ruben Arakelyan +// Gervase Markham +// Pamela Greene +// David Triendl +// Jothan Frakes +// The kind representatives of many TLD registries +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** + +// ===BEGIN ICANN DOMAINS=== + +// ac : http://en.wikipedia.org/wiki/.ac +ac +com.ac +edu.ac +gov.ac +net.ac +mil.ac +org.ac + +// ad : http://en.wikipedia.org/wiki/.ad +ad +nom.ad + +// ae : http://en.wikipedia.org/wiki/.ae +// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php +ae +co.ae +net.ae +org.ae +sch.ae +ac.ae +gov.ae +mil.ae + +// aero : see http://www.information.aero/index.php?id=66 +aero +accident-investigation.aero +accident-prevention.aero +aerobatic.aero +aeroclub.aero +aerodrome.aero +agents.aero +aircraft.aero +airline.aero +airport.aero +air-surveillance.aero +airtraffic.aero +air-traffic-control.aero +ambulance.aero +amusement.aero +association.aero +author.aero +ballooning.aero +broker.aero +caa.aero +cargo.aero +catering.aero +certification.aero +championship.aero +charter.aero +civilaviation.aero +club.aero +conference.aero +consultant.aero +consulting.aero +control.aero +council.aero +crew.aero +design.aero +dgca.aero +educator.aero +emergency.aero +engine.aero +engineer.aero +entertainment.aero +equipment.aero +exchange.aero +express.aero +federation.aero +flight.aero +freight.aero +fuel.aero +gliding.aero +government.aero +groundhandling.aero +group.aero +hanggliding.aero +homebuilt.aero +insurance.aero +journal.aero +journalist.aero +leasing.aero +logistics.aero +magazine.aero +maintenance.aero +marketplace.aero +media.aero +microlight.aero +modelling.aero +navigation.aero +parachuting.aero +paragliding.aero +passenger-association.aero +pilot.aero +press.aero +production.aero +recreation.aero +repbody.aero +res.aero +research.aero +rotorcraft.aero +safety.aero +scientist.aero +services.aero +show.aero +skydiving.aero +software.aero +student.aero +taxi.aero +trader.aero +trading.aero +trainer.aero +union.aero +workinggroup.aero +works.aero + +// af : http://www.nic.af/help.jsp +af +gov.af +com.af +org.af +net.af +edu.af + +// ag : http://www.nic.ag/prices.htm +ag +com.ag +org.ag +net.ag +co.ag +nom.ag + +// ai : http://nic.com.ai/ +ai +off.ai +com.ai +net.ai +org.ai + +// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 +al +com.al +edu.al +gov.al +mil.al +net.al +org.al + +// am : http://en.wikipedia.org/wiki/.am +am + +// an : http://www.una.an/an_domreg/default.asp +an +com.an +net.an +org.an +edu.an + +// ao : http://en.wikipedia.org/wiki/.ao +// http://www.dns.ao/REGISTR.DOC +ao +ed.ao +gv.ao +og.ao +co.ao +pb.ao +it.ao + +// aq : http://en.wikipedia.org/wiki/.aq +aq + +// ar : http://en.wikipedia.org/wiki/.ar +*.ar +!congresodelalengua3.ar +!educ.ar +!gobiernoelectronico.ar +!mecon.ar +!nacion.ar +!nic.ar +!promocion.ar +!retina.ar +!uba.ar + +// arpa : http://en.wikipedia.org/wiki/.arpa +// Confirmed by registry 2008-06-18 +e164.arpa +in-addr.arpa +ip6.arpa +iris.arpa +uri.arpa +urn.arpa + +// as : http://en.wikipedia.org/wiki/.as +as +gov.as + +// asia : http://en.wikipedia.org/wiki/.asia +asia + +// at : http://en.wikipedia.org/wiki/.at +// Confirmed by registry 2008-06-17 +at +ac.at +co.at +gv.at +or.at + +// au : http://en.wikipedia.org/wiki/.au +// http://www.auda.org.au/ +// 2LDs +com.au +net.au +org.au +edu.au +gov.au +csiro.au +asn.au +id.au +// Historic 2LDs (closed to new registration, but sites still exist) +info.au +conf.au +oz.au +// CGDNs - http://www.cgdn.org.au/ +act.au +nsw.au +nt.au +qld.au +sa.au +tas.au +vic.au +wa.au +// 3LDs +act.edu.au +nsw.edu.au +nt.edu.au +qld.edu.au +sa.edu.au +tas.edu.au +vic.edu.au +wa.edu.au +act.gov.au +// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04 +// nsw.gov.au +nt.gov.au +qld.gov.au +sa.gov.au +tas.gov.au +vic.gov.au +wa.gov.au + +// aw : http://en.wikipedia.org/wiki/.aw +aw +com.aw + +// ax : http://en.wikipedia.org/wiki/.ax +ax + +// az : http://en.wikipedia.org/wiki/.az +az +com.az +net.az +int.az +gov.az +org.az +edu.az +info.az +pp.az +mil.az +name.az +pro.az +biz.az + +// ba : http://en.wikipedia.org/wiki/.ba +ba +org.ba +net.ba +edu.ba +gov.ba +mil.ba +unsa.ba +unbi.ba +co.ba +com.ba +rs.ba + +// bb : http://en.wikipedia.org/wiki/.bb +bb +biz.bb +com.bb +edu.bb +gov.bb +info.bb +net.bb +org.bb +store.bb + +// bd : http://en.wikipedia.org/wiki/.bd +*.bd + +// be : http://en.wikipedia.org/wiki/.be +// Confirmed by registry 2008-06-08 +be +ac.be + +// bf : http://en.wikipedia.org/wiki/.bf +bf +gov.bf + +// bg : http://en.wikipedia.org/wiki/.bg +// https://www.register.bg/user/static/rules/en/index.html +bg +a.bg +b.bg +c.bg +d.bg +e.bg +f.bg +g.bg +h.bg +i.bg +j.bg +k.bg +l.bg +m.bg +n.bg +o.bg +p.bg +q.bg +r.bg +s.bg +t.bg +u.bg +v.bg +w.bg +x.bg +y.bg +z.bg +0.bg +1.bg +2.bg +3.bg +4.bg +5.bg +6.bg +7.bg +8.bg +9.bg + +// bh : http://en.wikipedia.org/wiki/.bh +bh +com.bh +edu.bh +net.bh +org.bh +gov.bh + +// bi : http://en.wikipedia.org/wiki/.bi +// http://whois.nic.bi/ +bi +co.bi +com.bi +edu.bi +or.bi +org.bi + +// biz : http://en.wikipedia.org/wiki/.biz +biz + +// bj : http://en.wikipedia.org/wiki/.bj +bj +asso.bj +barreau.bj +gouv.bj + +// bm : http://www.bermudanic.bm/dnr-text.txt +bm +com.bm +edu.bm +gov.bm +net.bm +org.bm + +// bn : http://en.wikipedia.org/wiki/.bn +*.bn + +// bo : http://www.nic.bo/ +bo +com.bo +edu.bo +gov.bo +gob.bo +int.bo +org.bo +net.bo +mil.bo +tv.bo + +// br : http://registro.br/dominio/dpn.html +// Updated by registry 2011-03-01 +br +adm.br +adv.br +agr.br +am.br +arq.br +art.br +ato.br +b.br +bio.br +blog.br +bmd.br +can.br +cim.br +cng.br +cnt.br +com.br +coop.br +ecn.br +edu.br +emp.br +eng.br +esp.br +etc.br +eti.br +far.br +flog.br +fm.br +fnd.br +fot.br +fst.br +g12.br +ggf.br +gov.br +imb.br +ind.br +inf.br +jor.br +jus.br +lel.br +mat.br +med.br +mil.br +mus.br +net.br +nom.br +not.br +ntr.br +odo.br +org.br +ppg.br +pro.br +psc.br +psi.br +qsl.br +radio.br +rec.br +slg.br +srv.br +taxi.br +teo.br +tmp.br +trd.br +tur.br +tv.br +vet.br +vlog.br +wiki.br +zlg.br + +// bs : http://www.nic.bs/rules.html +bs +com.bs +net.bs +org.bs +edu.bs +gov.bs + +// bt : http://en.wikipedia.org/wiki/.bt +bt +com.bt +edu.bt +gov.bt +net.bt +org.bt + +// bv : No registrations at this time. +// Submitted by registry 2006-06-16 + +// bw : http://en.wikipedia.org/wiki/.bw +// http://www.gobin.info/domainname/bw.doc +// list of other 2nd level tlds ? +bw +co.bw +org.bw + +// by : http://en.wikipedia.org/wiki/.by +// http://tld.by/rules_2006_en.html +// list of other 2nd level tlds ? +by +gov.by +mil.by +// Official information does not indicate that com.by is a reserved +// second-level domain, but it's being used as one (see www.google.com.by and +// www.yahoo.com.by, for example), so we list it here for safety's sake. +com.by + +// http://hoster.by/ +of.by + +// bz : http://en.wikipedia.org/wiki/.bz +// http://www.belizenic.bz/ +bz +com.bz +net.bz +org.bz +edu.bz +gov.bz + +// ca : http://en.wikipedia.org/wiki/.ca +ca +// ca geographical names +ab.ca +bc.ca +mb.ca +nb.ca +nf.ca +nl.ca +ns.ca +nt.ca +nu.ca +on.ca +pe.ca +qc.ca +sk.ca +yk.ca +// gc.ca: http://en.wikipedia.org/wiki/.gc.ca +// see also: http://registry.gc.ca/en/SubdomainFAQ +gc.ca + +// cat : http://en.wikipedia.org/wiki/.cat +cat + +// cc : http://en.wikipedia.org/wiki/.cc +cc + +// cd : http://en.wikipedia.org/wiki/.cd +// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 +cd +gov.cd + +// cf : http://en.wikipedia.org/wiki/.cf +cf + +// cg : http://en.wikipedia.org/wiki/.cg +cg + +// ch : http://en.wikipedia.org/wiki/.ch +ch + +// ci : http://en.wikipedia.org/wiki/.ci +// http://www.nic.ci/index.php?page=charte +ci +org.ci +or.ci +com.ci +co.ci +edu.ci +ed.ci +ac.ci +net.ci +go.ci +asso.ci +aéroport.ci +int.ci +presse.ci +md.ci +gouv.ci + +// ck : http://en.wikipedia.org/wiki/.ck +*.ck +!www.ck + +// cl : http://en.wikipedia.org/wiki/.cl +cl +gov.cl +gob.cl +co.cl +mil.cl + +// cm : http://en.wikipedia.org/wiki/.cm +cm +gov.cm + +// cn : http://en.wikipedia.org/wiki/.cn +// Submitted by registry 2008-06-11 +cn +ac.cn +com.cn +edu.cn +gov.cn +net.cn +org.cn +mil.cn +公司.cn +网络.cn +網絡.cn +// cn geographic names +ah.cn +bj.cn +cq.cn +fj.cn +gd.cn +gs.cn +gz.cn +gx.cn +ha.cn +hb.cn +he.cn +hi.cn +hl.cn +hn.cn +jl.cn +js.cn +jx.cn +ln.cn +nm.cn +nx.cn +qh.cn +sc.cn +sd.cn +sh.cn +sn.cn +sx.cn +tj.cn +xj.cn +xz.cn +yn.cn +zj.cn +hk.cn +mo.cn +tw.cn + +// co : http://en.wikipedia.org/wiki/.co +// Submitted by registry 2008-06-11 +co +arts.co +com.co +edu.co +firm.co +gov.co +info.co +int.co +mil.co +net.co +nom.co +org.co +rec.co +web.co + +// com : http://en.wikipedia.org/wiki/.com +com + +// coop : http://en.wikipedia.org/wiki/.coop +coop + +// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do +cr +ac.cr +co.cr +ed.cr +fi.cr +go.cr +or.cr +sa.cr + +// cu : http://en.wikipedia.org/wiki/.cu +cu +com.cu +edu.cu +org.cu +net.cu +gov.cu +inf.cu + +// cv : http://en.wikipedia.org/wiki/.cv +cv + +// cx : http://en.wikipedia.org/wiki/.cx +// list of other 2nd level tlds ? +cx +gov.cx + +// cy : http://en.wikipedia.org/wiki/.cy +*.cy + +// cz : http://en.wikipedia.org/wiki/.cz +cz + +// de : http://en.wikipedia.org/wiki/.de +// Confirmed by registry (with technical +// reservations) 2008-07-01 +de + +// dj : http://en.wikipedia.org/wiki/.dj +dj + +// dk : http://en.wikipedia.org/wiki/.dk +// Confirmed by registry 2008-06-17 +dk + +// dm : http://en.wikipedia.org/wiki/.dm +dm +com.dm +net.dm +org.dm +edu.dm +gov.dm + +// do : http://en.wikipedia.org/wiki/.do +do +art.do +com.do +edu.do +gob.do +gov.do +mil.do +net.do +org.do +sld.do +web.do + +// dz : http://en.wikipedia.org/wiki/.dz +dz +com.dz +org.dz +net.dz +gov.dz +edu.dz +asso.dz +pol.dz +art.dz + +// ec : http://www.nic.ec/reg/paso1.asp +// Submitted by registry 2008-07-04 +ec +com.ec +info.ec +net.ec +fin.ec +k12.ec +med.ec +pro.ec +org.ec +edu.ec +gov.ec +gob.ec +mil.ec + +// edu : http://en.wikipedia.org/wiki/.edu +edu + +// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B +ee +edu.ee +gov.ee +riik.ee +lib.ee +med.ee +com.ee +pri.ee +aip.ee +org.ee +fie.ee + +// eg : http://en.wikipedia.org/wiki/.eg +eg +com.eg +edu.eg +eun.eg +gov.eg +mil.eg +name.eg +net.eg +org.eg +sci.eg + +// er : http://en.wikipedia.org/wiki/.er +*.er + +// es : https://www.nic.es/site_ingles/ingles/dominios/index.html +es +com.es +nom.es +org.es +gob.es +edu.es + +// et : http://en.wikipedia.org/wiki/.et +*.et + +// eu : http://en.wikipedia.org/wiki/.eu +eu + +// fi : http://en.wikipedia.org/wiki/.fi +fi +// aland.fi : http://en.wikipedia.org/wiki/.ax +// This domain is being phased out in favor of .ax. As there are still many +// domains under aland.fi, we still keep it on the list until aland.fi is +// completely removed. +// TODO: Check for updates (expected to be phased out around Q1/2009) +aland.fi + +// fj : http://en.wikipedia.org/wiki/.fj +*.fj + +// fk : http://en.wikipedia.org/wiki/.fk +*.fk + +// fm : http://en.wikipedia.org/wiki/.fm +fm + +// fo : http://en.wikipedia.org/wiki/.fo +fo + +// fr : http://www.afnic.fr/ +// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs +fr +com.fr +asso.fr +nom.fr +prd.fr +presse.fr +tm.fr +// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels +aeroport.fr +assedic.fr +avocat.fr +avoues.fr +cci.fr +chambagri.fr +chirurgiens-dentistes.fr +experts-comptables.fr +geometre-expert.fr +gouv.fr +greta.fr +huissier-justice.fr +medecin.fr +notaires.fr +pharmacien.fr +port.fr +veterinaire.fr + +// ga : http://en.wikipedia.org/wiki/.ga +ga + +// gb : This registry is effectively dormant +// Submitted by registry 2008-06-12 + +// gd : http://en.wikipedia.org/wiki/.gd +gd + +// ge : http://www.nic.net.ge/policy_en.pdf +ge +com.ge +edu.ge +gov.ge +org.ge +mil.ge +net.ge +pvt.ge + +// gf : http://en.wikipedia.org/wiki/.gf +gf + +// gg : http://www.channelisles.net/applic/avextn.shtml +gg +co.gg +org.gg +net.gg +sch.gg +gov.gg + +// gh : http://en.wikipedia.org/wiki/.gh +// see also: http://www.nic.gh/reg_now.php +// Although domains directly at second level are not possible at the moment, +// they have been possible for some time and may come back. +gh +com.gh +edu.gh +gov.gh +org.gh +mil.gh + +// gi : http://www.nic.gi/rules.html +gi +com.gi +ltd.gi +gov.gi +mod.gi +edu.gi +org.gi + +// gl : http://en.wikipedia.org/wiki/.gl +// http://nic.gl +gl + +// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm +gm + +// gn : http://psg.com/dns/gn/gn.txt +// Submitted by registry 2008-06-17 +ac.gn +com.gn +edu.gn +gov.gn +org.gn +net.gn + +// gov : http://en.wikipedia.org/wiki/.gov +gov + +// gp : http://www.nic.gp/index.php?lang=en +gp +com.gp +net.gp +mobi.gp +edu.gp +org.gp +asso.gp + +// gq : http://en.wikipedia.org/wiki/.gq +gq + +// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html +// Submitted by registry 2008-06-09 +gr +com.gr +edu.gr +net.gr +org.gr +gov.gr + +// gs : http://en.wikipedia.org/wiki/.gs +gs + +// gt : http://www.gt/politicas.html +*.gt +!www.gt + +// gu : http://gadao.gov.gu/registration.txt +*.gu + +// gw : http://en.wikipedia.org/wiki/.gw +gw + +// gy : http://en.wikipedia.org/wiki/.gy +// http://registry.gy/ +gy +co.gy +com.gy +net.gy + +// hk : https://www.hkdnr.hk +// Submitted by registry 2008-06-11 +hk +com.hk +edu.hk +gov.hk +idv.hk +net.hk +org.hk +公司.hk +教育.hk +敎育.hk +政府.hk +個人.hk +个人.hk +箇人.hk +網络.hk +网络.hk +组織.hk +網絡.hk +网絡.hk +组织.hk +組織.hk +組织.hk + +// hm : http://en.wikipedia.org/wiki/.hm +hm + +// hn : http://www.nic.hn/politicas/ps02,,05.html +hn +com.hn +edu.hn +org.hn +net.hn +mil.hn +gob.hn + +// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf +hr +iz.hr +from.hr +name.hr +com.hr + +// ht : http://www.nic.ht/info/charte.cfm +ht +com.ht +shop.ht +firm.ht +info.ht +adult.ht +net.ht +pro.ht +org.ht +med.ht +art.ht +coop.ht +pol.ht +asso.ht +edu.ht +rel.ht +gouv.ht +perso.ht + +// hu : http://www.domain.hu/domain/English/sld.html +// Confirmed by registry 2008-06-12 +hu +co.hu +info.hu +org.hu +priv.hu +sport.hu +tm.hu +2000.hu +agrar.hu +bolt.hu +casino.hu +city.hu +erotica.hu +erotika.hu +film.hu +forum.hu +games.hu +hotel.hu +ingatlan.hu +jogasz.hu +konyvelo.hu +lakas.hu +media.hu +news.hu +reklam.hu +sex.hu +shop.hu +suli.hu +szex.hu +tozsde.hu +utazas.hu +video.hu + +// id : http://en.wikipedia.org/wiki/.id +// see also: https://register.pandi.or.id/ +id +ac.id +co.id +go.id +mil.id +net.id +or.id +sch.id +web.id + +// ie : http://en.wikipedia.org/wiki/.ie +ie +gov.ie + +// il : http://en.wikipedia.org/wiki/.il +*.il + +// im : https://www.nic.im/pdfs/imfaqs.pdf +im +co.im +ltd.co.im +plc.co.im +net.im +gov.im +org.im +nic.im +ac.im + +// in : http://en.wikipedia.org/wiki/.in +// see also: http://www.inregistry.in/policies/ +// Please note, that nic.in is not an offical eTLD, but used by most +// government institutions. +in +co.in +firm.in +net.in +org.in +gen.in +ind.in +nic.in +ac.in +edu.in +res.in +gov.in +mil.in + +// info : http://en.wikipedia.org/wiki/.info +info + +// int : http://en.wikipedia.org/wiki/.int +// Confirmed by registry 2008-06-18 +int +eu.int + +// io : http://www.nic.io/rules.html +// list of other 2nd level tlds ? +io +com.io + +// iq : http://www.cmc.iq/english/iq/iqregister1.htm +iq +gov.iq +edu.iq +mil.iq +com.iq +org.iq +net.iq + +// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules +// Also see http://www.nic.ir/Internationalized_Domain_Names +// Two .ir entries added at request of , 2010-04-16 +ir +ac.ir +co.ir +gov.ir +id.ir +net.ir +org.ir +sch.ir +// xn--mgba3a4f16a.ir (.ir, Persian YEH) +ایران.ir +// xn--mgba3a4fra.ir (.ir, Arabic YEH) +ايران.ir + +// is : http://www.isnic.is/domain/rules.php +// Confirmed by registry 2008-12-06 +is +net.is +com.is +edu.is +gov.is +org.is +int.is + +// it : http://en.wikipedia.org/wiki/.it +it +gov.it +edu.it +// list of reserved geo-names : +// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf +// (There is also a list of reserved geo-names corresponding to Italian +// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is +// not included here.) +agrigento.it +ag.it +alessandria.it +al.it +ancona.it +an.it +aosta.it +aoste.it +ao.it +arezzo.it +ar.it +ascoli-piceno.it +ascolipiceno.it +ap.it +asti.it +at.it +avellino.it +av.it +bari.it +ba.it +andria-barletta-trani.it +andriabarlettatrani.it +trani-barletta-andria.it +tranibarlettaandria.it +barletta-trani-andria.it +barlettatraniandria.it +andria-trani-barletta.it +andriatranibarletta.it +trani-andria-barletta.it +traniandriabarletta.it +bt.it +belluno.it +bl.it +benevento.it +bn.it +bergamo.it +bg.it +biella.it +bi.it +bologna.it +bo.it +bolzano.it +bozen.it +balsan.it +alto-adige.it +altoadige.it +suedtirol.it +bz.it +brescia.it +bs.it +brindisi.it +br.it +cagliari.it +ca.it +caltanissetta.it +cl.it +campobasso.it +cb.it +carboniaiglesias.it +carbonia-iglesias.it +iglesias-carbonia.it +iglesiascarbonia.it +ci.it +caserta.it +ce.it +catania.it +ct.it +catanzaro.it +cz.it +chieti.it +ch.it +como.it +co.it +cosenza.it +cs.it +cremona.it +cr.it +crotone.it +kr.it +cuneo.it +cn.it +dell-ogliastra.it +dellogliastra.it +ogliastra.it +og.it +enna.it +en.it +ferrara.it +fe.it +fermo.it +fm.it +firenze.it +florence.it +fi.it +foggia.it +fg.it +forli-cesena.it +forlicesena.it +cesena-forli.it +cesenaforli.it +fc.it +frosinone.it +fr.it +genova.it +genoa.it +ge.it +gorizia.it +go.it +grosseto.it +gr.it +imperia.it +im.it +isernia.it +is.it +laquila.it +aquila.it +aq.it +la-spezia.it +laspezia.it +sp.it +latina.it +lt.it +lecce.it +le.it +lecco.it +lc.it +livorno.it +li.it +lodi.it +lo.it +lucca.it +lu.it +macerata.it +mc.it +mantova.it +mn.it +massa-carrara.it +massacarrara.it +carrara-massa.it +carraramassa.it +ms.it +matera.it +mt.it +medio-campidano.it +mediocampidano.it +campidano-medio.it +campidanomedio.it +vs.it +messina.it +me.it +milano.it +milan.it +mi.it +modena.it +mo.it +monza.it +monza-brianza.it +monzabrianza.it +monzaebrianza.it +monzaedellabrianza.it +monza-e-della-brianza.it +mb.it +napoli.it +naples.it +na.it +novara.it +no.it +nuoro.it +nu.it +oristano.it +or.it +padova.it +padua.it +pd.it +palermo.it +pa.it +parma.it +pr.it +pavia.it +pv.it +perugia.it +pg.it +pescara.it +pe.it +pesaro-urbino.it +pesarourbino.it +urbino-pesaro.it +urbinopesaro.it +pu.it +piacenza.it +pc.it +pisa.it +pi.it +pistoia.it +pt.it +pordenone.it +pn.it +potenza.it +pz.it +prato.it +po.it +ragusa.it +rg.it +ravenna.it +ra.it +reggio-calabria.it +reggiocalabria.it +rc.it +reggio-emilia.it +reggioemilia.it +re.it +rieti.it +ri.it +rimini.it +rn.it +roma.it +rome.it +rm.it +rovigo.it +ro.it +salerno.it +sa.it +sassari.it +ss.it +savona.it +sv.it +siena.it +si.it +siracusa.it +sr.it +sondrio.it +so.it +taranto.it +ta.it +tempio-olbia.it +tempioolbia.it +olbia-tempio.it +olbiatempio.it +ot.it +teramo.it +te.it +terni.it +tr.it +torino.it +turin.it +to.it +trapani.it +tp.it +trento.it +trentino.it +tn.it +treviso.it +tv.it +trieste.it +ts.it +udine.it +ud.it +varese.it +va.it +venezia.it +venice.it +ve.it +verbania.it +vb.it +vercelli.it +vc.it +verona.it +vr.it +vibo-valentia.it +vibovalentia.it +vv.it +vicenza.it +vi.it +viterbo.it +vt.it + +// je : http://www.channelisles.net/applic/avextn.shtml +je +co.je +org.je +net.je +sch.je +gov.je + +// jm : http://www.com.jm/register.html +*.jm + +// jo : http://www.dns.jo/Registration_policy.aspx +jo +com.jo +org.jo +net.jo +edu.jo +sch.jo +gov.jo +mil.jo +name.jo + +// jobs : http://en.wikipedia.org/wiki/.jobs +jobs + +// jp : http://en.wikipedia.org/wiki/.jp +// http://jprs.co.jp/en/jpdomain.html +// Submitted by registry 2008-06-11 +// Updated by registry 2008-12-04 +jp +// jp organizational type names +ac.jp +ad.jp +co.jp +ed.jp +go.jp +gr.jp +lg.jp +ne.jp +or.jp +// jp geographic type names +// http://jprs.jp/doc/rule/saisoku-1.html +*.aichi.jp +*.akita.jp +*.aomori.jp +*.chiba.jp +*.ehime.jp +*.fukui.jp +*.fukuoka.jp +*.fukushima.jp +*.gifu.jp +*.gunma.jp +*.hiroshima.jp +*.hokkaido.jp +*.hyogo.jp +*.ibaraki.jp +*.ishikawa.jp +*.iwate.jp +*.kagawa.jp +*.kagoshima.jp +*.kanagawa.jp +*.kawasaki.jp +*.kitakyushu.jp +*.kobe.jp +*.kochi.jp +*.kumamoto.jp +*.kyoto.jp +*.mie.jp +*.miyagi.jp +*.miyazaki.jp +*.nagano.jp +*.nagasaki.jp +*.nagoya.jp +*.nara.jp +*.niigata.jp +*.oita.jp +*.okayama.jp +*.okinawa.jp +*.osaka.jp +*.saga.jp +*.saitama.jp +*.sapporo.jp +*.sendai.jp +*.shiga.jp +*.shimane.jp +*.shizuoka.jp +*.tochigi.jp +*.tokushima.jp +*.tokyo.jp +*.tottori.jp +*.toyama.jp +*.wakayama.jp +*.yamagata.jp +*.yamaguchi.jp +*.yamanashi.jp +*.yokohama.jp +!metro.tokyo.jp +!pref.aichi.jp +!pref.akita.jp +!pref.aomori.jp +!pref.chiba.jp +!pref.ehime.jp +!pref.fukui.jp +!pref.fukuoka.jp +!pref.fukushima.jp +!pref.gifu.jp +!pref.gunma.jp +!pref.hiroshima.jp +!pref.hokkaido.jp +!pref.hyogo.jp +!pref.ibaraki.jp +!pref.ishikawa.jp +!pref.iwate.jp +!pref.kagawa.jp +!pref.kagoshima.jp +!pref.kanagawa.jp +!pref.kochi.jp +!pref.kumamoto.jp +!pref.kyoto.jp +!pref.mie.jp +!pref.miyagi.jp +!pref.miyazaki.jp +!pref.nagano.jp +!pref.nagasaki.jp +!pref.nara.jp +!pref.niigata.jp +!pref.oita.jp +!pref.okayama.jp +!pref.okinawa.jp +!pref.osaka.jp +!pref.saga.jp +!pref.saitama.jp +!pref.shiga.jp +!pref.shimane.jp +!pref.shizuoka.jp +!pref.tochigi.jp +!pref.tokushima.jp +!pref.tottori.jp +!pref.toyama.jp +!pref.wakayama.jp +!pref.yamagata.jp +!pref.yamaguchi.jp +!pref.yamanashi.jp +!city.chiba.jp +!city.fukuoka.jp +!city.hiroshima.jp +!city.kawasaki.jp +!city.kitakyushu.jp +!city.kobe.jp +!city.kyoto.jp +!city.nagoya.jp +!city.niigata.jp +!city.okayama.jp +!city.osaka.jp +!city.saitama.jp +!city.sapporo.jp +!city.sendai.jp +!city.shizuoka.jp +!city.yokohama.jp + +// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 +*.ke + +// kg : http://www.domain.kg/dmn_n.html +kg +org.kg +net.kg +com.kg +edu.kg +gov.kg +mil.kg + +// kh : http://www.mptc.gov.kh/dns_registration.htm +*.kh + +// ki : http://www.ki/dns/index.html +ki +edu.ki +biz.ki +net.ki +org.ki +gov.ki +info.ki +com.ki + +// km : http://en.wikipedia.org/wiki/.km +// http://www.domaine.km/documents/charte.doc +km +org.km +nom.km +gov.km +prd.km +tm.km +edu.km +mil.km +ass.km +com.km +// These are only mentioned as proposed suggestions at domaine.km, but +// http://en.wikipedia.org/wiki/.km says they're available for registration: +coop.km +asso.km +presse.km +medecin.km +notaires.km +pharmaciens.km +veterinaire.km +gouv.km + +// kn : http://en.wikipedia.org/wiki/.kn +// http://www.dot.kn/domainRules.html +kn +net.kn +org.kn +edu.kn +gov.kn + +// kp : http://www.kcce.kp/en_index.php +com.kp +edu.kp +gov.kp +org.kp +rep.kp +tra.kp + +// kr : http://en.wikipedia.org/wiki/.kr +// see also: http://domain.nida.or.kr/eng/registration.jsp +kr +ac.kr +co.kr +es.kr +go.kr +hs.kr +kg.kr +mil.kr +ms.kr +ne.kr +or.kr +pe.kr +re.kr +sc.kr +// kr geographical names +busan.kr +chungbuk.kr +chungnam.kr +daegu.kr +daejeon.kr +gangwon.kr +gwangju.kr +gyeongbuk.kr +gyeonggi.kr +gyeongnam.kr +incheon.kr +jeju.kr +jeonbuk.kr +jeonnam.kr +seoul.kr +ulsan.kr + +// kw : http://en.wikipedia.org/wiki/.kw +*.kw + +// ky : http://www.icta.ky/da_ky_reg_dom.php +// Confirmed by registry 2008-06-17 +ky +edu.ky +gov.ky +com.ky +org.ky +net.ky + +// kz : http://en.wikipedia.org/wiki/.kz +// see also: http://www.nic.kz/rules/index.jsp +kz +org.kz +edu.kz +net.kz +gov.kz +mil.kz +com.kz + +// la : http://en.wikipedia.org/wiki/.la +// Submitted by registry 2008-06-10 +la +int.la +net.la +info.la +edu.la +gov.la +per.la +com.la +org.la + +// lb : http://en.wikipedia.org/wiki/.lb +// Submitted by registry 2008-06-17 +com.lb +edu.lb +gov.lb +net.lb +org.lb + +// lc : http://en.wikipedia.org/wiki/.lc +// see also: http://www.nic.lc/rules.htm +lc +com.lc +net.lc +co.lc +org.lc +edu.lc +gov.lc + +// li : http://en.wikipedia.org/wiki/.li +li + +// lk : http://www.nic.lk/seclevpr.html +lk +gov.lk +sch.lk +net.lk +int.lk +com.lk +org.lk +edu.lk +ngo.lk +soc.lk +web.lk +ltd.lk +assn.lk +grp.lk +hotel.lk + +// lr : http://psg.com/dns/lr/lr.txt +// Submitted by registry 2008-06-17 +com.lr +edu.lr +gov.lr +org.lr +net.lr + +// ls : http://en.wikipedia.org/wiki/.ls +ls +co.ls +org.ls + +// lt : http://en.wikipedia.org/wiki/.lt +lt +// gov.lt : http://www.gov.lt/index_en.php +gov.lt + +// lu : http://www.dns.lu/en/ +lu + +// lv : http://www.nic.lv/DNS/En/generic.php +lv +com.lv +edu.lv +gov.lv +org.lv +mil.lv +id.lv +net.lv +asn.lv +conf.lv + +// ly : http://www.nic.ly/regulations.php +ly +com.ly +net.ly +gov.ly +plc.ly +edu.ly +sch.ly +med.ly +org.ly +id.ly + +// ma : http://en.wikipedia.org/wiki/.ma +// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf +ma +co.ma +net.ma +gov.ma +org.ma +ac.ma +press.ma + +// mc : http://www.nic.mc/ +mc +tm.mc +asso.mc + +// md : http://en.wikipedia.org/wiki/.md +md + +// me : http://en.wikipedia.org/wiki/.me +me +co.me +net.me +org.me +edu.me +ac.me +gov.me +its.me +priv.me + +// mg : http://www.nic.mg/tarif.htm +mg +org.mg +nom.mg +gov.mg +prd.mg +tm.mg +edu.mg +mil.mg +com.mg + +// mh : http://en.wikipedia.org/wiki/.mh +mh + +// mil : http://en.wikipedia.org/wiki/.mil +mil + +// mk : http://en.wikipedia.org/wiki/.mk +// see also: http://dns.marnet.net.mk/postapka.php +mk +com.mk +org.mk +net.mk +edu.mk +gov.mk +inf.mk +name.mk + +// ml : http://www.gobin.info/domainname/ml-template.doc +// see also: http://en.wikipedia.org/wiki/.ml +ml +com.ml +edu.ml +gouv.ml +gov.ml +net.ml +org.ml +presse.ml + +// mm : http://en.wikipedia.org/wiki/.mm +*.mm + +// mn : http://en.wikipedia.org/wiki/.mn +mn +gov.mn +edu.mn +org.mn + +// mo : http://www.monic.net.mo/ +mo +com.mo +net.mo +org.mo +edu.mo +gov.mo + +// mobi : http://en.wikipedia.org/wiki/.mobi +mobi + +// mp : http://www.dot.mp/ +// Confirmed by registry 2008-06-17 +mp + +// mq : http://en.wikipedia.org/wiki/.mq +mq + +// mr : http://en.wikipedia.org/wiki/.mr +mr +gov.mr + +// ms : http://en.wikipedia.org/wiki/.ms +ms + +// mt : https://www.nic.org.mt/dotmt/ +*.mt + +// mu : http://en.wikipedia.org/wiki/.mu +mu +com.mu +net.mu +org.mu +gov.mu +ac.mu +co.mu +or.mu + +// museum : http://about.museum/naming/ +// http://index.museum/ +museum +academy.museum +agriculture.museum +air.museum +airguard.museum +alabama.museum +alaska.museum +amber.museum +ambulance.museum +american.museum +americana.museum +americanantiques.museum +americanart.museum +amsterdam.museum +and.museum +annefrank.museum +anthro.museum +anthropology.museum +antiques.museum +aquarium.museum +arboretum.museum +archaeological.museum +archaeology.museum +architecture.museum +art.museum +artanddesign.museum +artcenter.museum +artdeco.museum +arteducation.museum +artgallery.museum +arts.museum +artsandcrafts.museum +asmatart.museum +assassination.museum +assisi.museum +association.museum +astronomy.museum +atlanta.museum +austin.museum +australia.museum +automotive.museum +aviation.museum +axis.museum +badajoz.museum +baghdad.museum +bahn.museum +bale.museum +baltimore.museum +barcelona.museum +baseball.museum +basel.museum +baths.museum +bauern.museum +beauxarts.museum +beeldengeluid.museum +bellevue.museum +bergbau.museum +berkeley.museum +berlin.museum +bern.museum +bible.museum +bilbao.museum +bill.museum +birdart.museum +birthplace.museum +bonn.museum +boston.museum +botanical.museum +botanicalgarden.museum +botanicgarden.museum +botany.museum +brandywinevalley.museum +brasil.museum +bristol.museum +british.museum +britishcolumbia.museum +broadcast.museum +brunel.museum +brussel.museum +brussels.museum +bruxelles.museum +building.museum +burghof.museum +bus.museum +bushey.museum +cadaques.museum +california.museum +cambridge.museum +can.museum +canada.museum +capebreton.museum +carrier.museum +cartoonart.museum +casadelamoneda.museum +castle.museum +castres.museum +celtic.museum +center.museum +chattanooga.museum +cheltenham.museum +chesapeakebay.museum +chicago.museum +children.museum +childrens.museum +childrensgarden.museum +chiropractic.museum +chocolate.museum +christiansburg.museum +cincinnati.museum +cinema.museum +circus.museum +civilisation.museum +civilization.museum +civilwar.museum +clinton.museum +clock.museum +coal.museum +coastaldefence.museum +cody.museum +coldwar.museum +collection.museum +colonialwilliamsburg.museum +coloradoplateau.museum +columbia.museum +columbus.museum +communication.museum +communications.museum +community.museum +computer.museum +computerhistory.museum +comunicações.museum +contemporary.museum +contemporaryart.museum +convent.museum +copenhagen.museum +corporation.museum +correios-e-telecomunicações.museum +corvette.museum +costume.museum +countryestate.museum +county.museum +crafts.museum +cranbrook.museum +creation.museum +cultural.museum +culturalcenter.museum +culture.museum +cyber.museum +cymru.museum +dali.museum +dallas.museum +database.museum +ddr.museum +decorativearts.museum +delaware.museum +delmenhorst.museum +denmark.museum +depot.museum +design.museum +detroit.museum +dinosaur.museum +discovery.museum +dolls.museum +donostia.museum +durham.museum +eastafrica.museum +eastcoast.museum +education.museum +educational.museum +egyptian.museum +eisenbahn.museum +elburg.museum +elvendrell.museum +embroidery.museum +encyclopedic.museum +england.museum +entomology.museum +environment.museum +environmentalconservation.museum +epilepsy.museum +essex.museum +estate.museum +ethnology.museum +exeter.museum +exhibition.museum +family.museum +farm.museum +farmequipment.museum +farmers.museum +farmstead.museum +field.museum +figueres.museum +filatelia.museum +film.museum +fineart.museum +finearts.museum +finland.museum +flanders.museum +florida.museum +force.museum +fortmissoula.museum +fortworth.museum +foundation.museum +francaise.museum +frankfurt.museum +franziskaner.museum +freemasonry.museum +freiburg.museum +fribourg.museum +frog.museum +fundacio.museum +furniture.museum +gallery.museum +garden.museum +gateway.museum +geelvinck.museum +gemological.museum +geology.museum +georgia.museum +giessen.museum +glas.museum +glass.museum +gorge.museum +grandrapids.museum +graz.museum +guernsey.museum +halloffame.museum +hamburg.museum +handson.museum +harvestcelebration.museum +hawaii.museum +health.museum +heimatunduhren.museum +hellas.museum +helsinki.museum +hembygdsforbund.museum +heritage.museum +histoire.museum +historical.museum +historicalsociety.museum +historichouses.museum +historisch.museum +historisches.museum +history.museum +historyofscience.museum +horology.museum +house.museum +humanities.museum +illustration.museum +imageandsound.museum +indian.museum +indiana.museum +indianapolis.museum +indianmarket.museum +intelligence.museum +interactive.museum +iraq.museum +iron.museum +isleofman.museum +jamison.museum +jefferson.museum +jerusalem.museum +jewelry.museum +jewish.museum +jewishart.museum +jfk.museum +journalism.museum +judaica.museum +judygarland.museum +juedisches.museum +juif.museum +karate.museum +karikatur.museum +kids.museum +koebenhavn.museum +koeln.museum +kunst.museum +kunstsammlung.museum +kunstunddesign.museum +labor.museum +labour.museum +lajolla.museum +lancashire.museum +landes.museum +lans.museum +läns.museum +larsson.museum +lewismiller.museum +lincoln.museum +linz.museum +living.museum +livinghistory.museum +localhistory.museum +london.museum +losangeles.museum +louvre.museum +loyalist.museum +lucerne.museum +luxembourg.museum +luzern.museum +mad.museum +madrid.museum +mallorca.museum +manchester.museum +mansion.museum +mansions.museum +manx.museum +marburg.museum +maritime.museum +maritimo.museum +maryland.museum +marylhurst.museum +media.museum +medical.museum +medizinhistorisches.museum +meeres.museum +memorial.museum +mesaverde.museum +michigan.museum +midatlantic.museum +military.museum +mill.museum +miners.museum +mining.museum +minnesota.museum +missile.museum +missoula.museum +modern.museum +moma.museum +money.museum +monmouth.museum +monticello.museum +montreal.museum +moscow.museum +motorcycle.museum +muenchen.museum +muenster.museum +mulhouse.museum +muncie.museum +museet.museum +museumcenter.museum +museumvereniging.museum +music.museum +national.museum +nationalfirearms.museum +nationalheritage.museum +nativeamerican.museum +naturalhistory.museum +naturalhistorymuseum.museum +naturalsciences.museum +nature.museum +naturhistorisches.museum +natuurwetenschappen.museum +naumburg.museum +naval.museum +nebraska.museum +neues.museum +newhampshire.museum +newjersey.museum +newmexico.museum +newport.museum +newspaper.museum +newyork.museum +niepce.museum +norfolk.museum +north.museum +nrw.museum +nuernberg.museum +nuremberg.museum +nyc.museum +nyny.museum +oceanographic.museum +oceanographique.museum +omaha.museum +online.museum +ontario.museum +openair.museum +oregon.museum +oregontrail.museum +otago.museum +oxford.museum +pacific.museum +paderborn.museum +palace.museum +paleo.museum +palmsprings.museum +panama.museum +paris.museum +pasadena.museum +pharmacy.museum +philadelphia.museum +philadelphiaarea.museum +philately.museum +phoenix.museum +photography.museum +pilots.museum +pittsburgh.museum +planetarium.museum +plantation.museum +plants.museum +plaza.museum +portal.museum +portland.museum +portlligat.museum +posts-and-telecommunications.museum +preservation.museum +presidio.museum +press.museum +project.museum +public.museum +pubol.museum +quebec.museum +railroad.museum +railway.museum +research.museum +resistance.museum +riodejaneiro.museum +rochester.museum +rockart.museum +roma.museum +russia.museum +saintlouis.museum +salem.museum +salvadordali.museum +salzburg.museum +sandiego.museum +sanfrancisco.museum +santabarbara.museum +santacruz.museum +santafe.museum +saskatchewan.museum +satx.museum +savannahga.museum +schlesisches.museum +schoenbrunn.museum +schokoladen.museum +school.museum +schweiz.museum +science.museum +scienceandhistory.museum +scienceandindustry.museum +sciencecenter.museum +sciencecenters.museum +science-fiction.museum +sciencehistory.museum +sciences.museum +sciencesnaturelles.museum +scotland.museum +seaport.museum +settlement.museum +settlers.museum +shell.museum +sherbrooke.museum +sibenik.museum +silk.museum +ski.museum +skole.museum +society.museum +sologne.museum +soundandvision.museum +southcarolina.museum +southwest.museum +space.museum +spy.museum +square.museum +stadt.museum +stalbans.museum +starnberg.museum +state.museum +stateofdelaware.museum +station.museum +steam.museum +steiermark.museum +stjohn.museum +stockholm.museum +stpetersburg.museum +stuttgart.museum +suisse.museum +surgeonshall.museum +surrey.museum +svizzera.museum +sweden.museum +sydney.museum +tank.museum +tcm.museum +technology.museum +telekommunikation.museum +television.museum +texas.museum +textile.museum +theater.museum +time.museum +timekeeping.museum +topology.museum +torino.museum +touch.museum +town.museum +transport.museum +tree.museum +trolley.museum +trust.museum +trustee.museum +uhren.museum +ulm.museum +undersea.museum +university.museum +usa.museum +usantiques.museum +usarts.museum +uscountryestate.museum +usculture.museum +usdecorativearts.museum +usgarden.museum +ushistory.museum +ushuaia.museum +uslivinghistory.museum +utah.museum +uvic.museum +valley.museum +vantaa.museum +versailles.museum +viking.museum +village.museum +virginia.museum +virtual.museum +virtuel.museum +vlaanderen.museum +volkenkunde.museum +wales.museum +wallonie.museum +war.museum +washingtondc.museum +watchandclock.museum +watch-and-clock.museum +western.museum +westfalen.museum +whaling.museum +wildlife.museum +williamsburg.museum +windmill.museum +workshop.museum +york.museum +yorkshire.museum +yosemite.museum +youth.museum +zoological.museum +zoology.museum +ירושלים.museum +иком.museum + +// mv : http://en.wikipedia.org/wiki/.mv +// "mv" included because, contra Wikipedia, google.mv exists. +mv +aero.mv +biz.mv +com.mv +coop.mv +edu.mv +gov.mv +info.mv +int.mv +mil.mv +museum.mv +name.mv +net.mv +org.mv +pro.mv + +// mw : http://www.registrar.mw/ +mw +ac.mw +biz.mw +co.mw +com.mw +coop.mw +edu.mw +gov.mw +int.mw +museum.mw +net.mw +org.mw + +// mx : http://www.nic.mx/ +// Submitted by registry 2008-06-19 +mx +com.mx +org.mx +gob.mx +edu.mx +net.mx + +// my : http://www.mynic.net.my/ +my +com.my +net.my +org.my +gov.my +edu.my +mil.my +name.my + +// mz : http://www.gobin.info/domainname/mz-template.doc +*.mz + +// na : http://www.na-nic.com.na/ +// http://www.info.na/domain/ +na +info.na +pro.na +name.na +school.na +or.na +dr.na +us.na +mx.na +ca.na +in.na +cc.na +tv.na +ws.na +mobi.na +co.na +com.na +org.na + +// name : has 2nd-level tlds, but there's no list of them +name + +// nc : http://www.cctld.nc/ +nc +asso.nc + +// ne : http://en.wikipedia.org/wiki/.ne +ne + +// net : http://en.wikipedia.org/wiki/.net +net + +// nf : http://en.wikipedia.org/wiki/.nf +nf +com.nf +net.nf +per.nf +rec.nf +web.nf +arts.nf +firm.nf +info.nf +other.nf +store.nf + +// ng : http://psg.com/dns/ng/ +// Submitted by registry 2008-06-17 +ac.ng +com.ng +edu.ng +gov.ng +net.ng +org.ng + +// ni : http://www.nic.ni/dominios.htm +*.ni + +// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html +// Confirmed by registry (with technical +// reservations) 2008-06-08 +nl + +// BV.nl will be a registry for dutch BV's (besloten vennootschap) +bv.nl + +// no : http://www.norid.no/regelverk/index.en.html +// The Norwegian registry has declined to notify us of updates. The web pages +// referenced below are the official source of the data. There is also an +// announce mailing list: +// https://postlister.uninett.no/sympa/info/norid-diskusjon +no +// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html +fhs.no +vgs.no +fylkesbibl.no +folkebibl.no +museum.no +idrett.no +priv.no +// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html +mil.no +stat.no +dep.no +kommune.no +herad.no +// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html +// counties +aa.no +ah.no +bu.no +fm.no +hl.no +hm.no +jan-mayen.no +mr.no +nl.no +nt.no +of.no +ol.no +oslo.no +rl.no +sf.no +st.no +svalbard.no +tm.no +tr.no +va.no +vf.no +// primary and lower secondary schools per county +gs.aa.no +gs.ah.no +gs.bu.no +gs.fm.no +gs.hl.no +gs.hm.no +gs.jan-mayen.no +gs.mr.no +gs.nl.no +gs.nt.no +gs.of.no +gs.ol.no +gs.oslo.no +gs.rl.no +gs.sf.no +gs.st.no +gs.svalbard.no +gs.tm.no +gs.tr.no +gs.va.no +gs.vf.no +// cities +akrehamn.no +åkrehamn.no +algard.no +ålgård.no +arna.no +brumunddal.no +bryne.no +bronnoysund.no +brønnøysund.no +drobak.no +drøbak.no +egersund.no +fetsund.no +floro.no +florø.no +fredrikstad.no +hokksund.no +honefoss.no +hønefoss.no +jessheim.no +jorpeland.no +jørpeland.no +kirkenes.no +kopervik.no +krokstadelva.no +langevag.no +langevåg.no +leirvik.no +mjondalen.no +mjøndalen.no +mo-i-rana.no +mosjoen.no +mosjøen.no +nesoddtangen.no +orkanger.no +osoyro.no +osøyro.no +raholt.no +råholt.no +sandnessjoen.no +sandnessjøen.no +skedsmokorset.no +slattum.no +spjelkavik.no +stathelle.no +stavern.no +stjordalshalsen.no +stjørdalshalsen.no +tananger.no +tranby.no +vossevangen.no +// communities +afjord.no +åfjord.no +agdenes.no +al.no +ål.no +alesund.no +ålesund.no +alstahaug.no +alta.no +áltá.no +alaheadju.no +álaheadju.no +alvdal.no +amli.no +åmli.no +amot.no +åmot.no +andebu.no +andoy.no +andøy.no +andasuolo.no +ardal.no +årdal.no +aremark.no +arendal.no +ås.no +aseral.no +åseral.no +asker.no +askim.no +askvoll.no +askoy.no +askøy.no +asnes.no +åsnes.no +audnedaln.no +aukra.no +aure.no +aurland.no +aurskog-holand.no +aurskog-høland.no +austevoll.no +austrheim.no +averoy.no +averøy.no +balestrand.no +ballangen.no +balat.no +bálát.no +balsfjord.no +bahccavuotna.no +báhccavuotna.no +bamble.no +bardu.no +beardu.no +beiarn.no +bajddar.no +bájddar.no +baidar.no +báidár.no +berg.no +bergen.no +berlevag.no +berlevåg.no +bearalvahki.no +bearalváhki.no +bindal.no +birkenes.no +bjarkoy.no +bjarkøy.no +bjerkreim.no +bjugn.no +bodo.no +bodø.no +badaddja.no +bådåddjå.no +budejju.no +bokn.no +bremanger.no +bronnoy.no +brønnøy.no +bygland.no +bykle.no +barum.no +bærum.no +bo.telemark.no +bø.telemark.no +bo.nordland.no +bø.nordland.no +bievat.no +bievát.no +bomlo.no +bømlo.no +batsfjord.no +båtsfjord.no +bahcavuotna.no +báhcavuotna.no +dovre.no +drammen.no +drangedal.no +dyroy.no +dyrøy.no +donna.no +dønna.no +eid.no +eidfjord.no +eidsberg.no +eidskog.no +eidsvoll.no +eigersund.no +elverum.no +enebakk.no +engerdal.no +etne.no +etnedal.no +evenes.no +evenassi.no +evenášši.no +evje-og-hornnes.no +farsund.no +fauske.no +fuossko.no +fuoisku.no +fedje.no +fet.no +finnoy.no +finnøy.no +fitjar.no +fjaler.no +fjell.no +flakstad.no +flatanger.no +flekkefjord.no +flesberg.no +flora.no +fla.no +flå.no +folldal.no +forsand.no +fosnes.no +frei.no +frogn.no +froland.no +frosta.no +frana.no +fræna.no +froya.no +frøya.no +fusa.no +fyresdal.no +forde.no +førde.no +gamvik.no +gangaviika.no +gáŋgaviika.no +gaular.no +gausdal.no +gildeskal.no +gildeskål.no +giske.no +gjemnes.no +gjerdrum.no +gjerstad.no +gjesdal.no +gjovik.no +gjøvik.no +gloppen.no +gol.no +gran.no +grane.no +granvin.no +gratangen.no +grimstad.no +grong.no +kraanghke.no +kråanghke.no +grue.no +gulen.no +hadsel.no +halden.no +halsa.no +hamar.no +hamaroy.no +habmer.no +hábmer.no +hapmir.no +hápmir.no +hammerfest.no +hammarfeasta.no +hámmárfeasta.no +haram.no +hareid.no +harstad.no +hasvik.no +aknoluokta.no +ákŋoluokta.no +hattfjelldal.no +aarborte.no +haugesund.no +hemne.no +hemnes.no +hemsedal.no +heroy.more-og-romsdal.no +herøy.møre-og-romsdal.no +heroy.nordland.no +herøy.nordland.no +hitra.no +hjartdal.no +hjelmeland.no +hobol.no +hobøl.no +hof.no +hol.no +hole.no +holmestrand.no +holtalen.no +holtålen.no +hornindal.no +horten.no +hurdal.no +hurum.no +hvaler.no +hyllestad.no +hagebostad.no +hægebostad.no +hoyanger.no +høyanger.no +hoylandet.no +høylandet.no +ha.no +hå.no +ibestad.no +inderoy.no +inderøy.no +iveland.no +jevnaker.no +jondal.no +jolster.no +jølster.no +karasjok.no +karasjohka.no +kárášjohka.no +karlsoy.no +galsa.no +gálsá.no +karmoy.no +karmøy.no +kautokeino.no +guovdageaidnu.no +klepp.no +klabu.no +klæbu.no +kongsberg.no +kongsvinger.no +kragero.no +kragerø.no +kristiansand.no +kristiansund.no +krodsherad.no +krødsherad.no +kvalsund.no +rahkkeravju.no +ráhkkerávju.no +kvam.no +kvinesdal.no +kvinnherad.no +kviteseid.no +kvitsoy.no +kvitsøy.no +kvafjord.no +kvæfjord.no +giehtavuoatna.no +kvanangen.no +kvænangen.no +navuotna.no +návuotna.no +kafjord.no +kåfjord.no +gaivuotna.no +gáivuotna.no +larvik.no +lavangen.no +lavagis.no +loabat.no +loabát.no +lebesby.no +davvesiida.no +leikanger.no +leirfjord.no +leka.no +leksvik.no +lenvik.no +leangaviika.no +leaŋgaviika.no +lesja.no +levanger.no +lier.no +lierne.no +lillehammer.no +lillesand.no +lindesnes.no +lindas.no +lindås.no +lom.no +loppa.no +lahppi.no +láhppi.no +lund.no +lunner.no +luroy.no +lurøy.no +luster.no +lyngdal.no +lyngen.no +ivgu.no +lardal.no +lerdal.no +lærdal.no +lodingen.no +lødingen.no +lorenskog.no +lørenskog.no +loten.no +løten.no +malvik.no +masoy.no +måsøy.no +muosat.no +muosát.no +mandal.no +marker.no +marnardal.no +masfjorden.no +meland.no +meldal.no +melhus.no +meloy.no +meløy.no +meraker.no +meråker.no +moareke.no +moåreke.no +midsund.no +midtre-gauldal.no +modalen.no +modum.no +molde.no +moskenes.no +moss.no +mosvik.no +malselv.no +målselv.no +malatvuopmi.no +málatvuopmi.no +namdalseid.no +aejrie.no +namsos.no +namsskogan.no +naamesjevuemie.no +nååmesjevuemie.no +laakesvuemie.no +nannestad.no +narvik.no +narviika.no +naustdal.no +nedre-eiker.no +nes.akershus.no +nes.buskerud.no +nesna.no +nesodden.no +nesseby.no +unjarga.no +unjárga.no +nesset.no +nissedal.no +nittedal.no +nord-aurdal.no +nord-fron.no +nord-odal.no +norddal.no +nordkapp.no +davvenjarga.no +davvenjárga.no +nordre-land.no +nordreisa.no +raisa.no +ráisa.no +nore-og-uvdal.no +notodden.no +naroy.no +nærøy.no +notteroy.no +nøtterøy.no +odda.no +oksnes.no +øksnes.no +oppdal.no +oppegard.no +oppegård.no +orkdal.no +orland.no +ørland.no +orskog.no +ørskog.no +orsta.no +ørsta.no +os.hedmark.no +os.hordaland.no +osen.no +osteroy.no +osterøy.no +ostre-toten.no +østre-toten.no +overhalla.no +ovre-eiker.no +øvre-eiker.no +oyer.no +øyer.no +oygarden.no +øygarden.no +oystre-slidre.no +øystre-slidre.no +porsanger.no +porsangu.no +porsáŋgu.no +porsgrunn.no +radoy.no +radøy.no +rakkestad.no +rana.no +ruovat.no +randaberg.no +rauma.no +rendalen.no +rennebu.no +rennesoy.no +rennesøy.no +rindal.no +ringebu.no +ringerike.no +ringsaker.no +rissa.no +risor.no +risør.no +roan.no +rollag.no +rygge.no +ralingen.no +rælingen.no +rodoy.no +rødøy.no +romskog.no +rømskog.no +roros.no +røros.no +rost.no +røst.no +royken.no +røyken.no +royrvik.no +røyrvik.no +rade.no +råde.no +salangen.no +siellak.no +saltdal.no +salat.no +sálát.no +sálat.no +samnanger.no +sande.more-og-romsdal.no +sande.møre-og-romsdal.no +sande.vestfold.no +sandefjord.no +sandnes.no +sandoy.no +sandøy.no +sarpsborg.no +sauda.no +sauherad.no +sel.no +selbu.no +selje.no +seljord.no +sigdal.no +siljan.no +sirdal.no +skaun.no +skedsmo.no +ski.no +skien.no +skiptvet.no +skjervoy.no +skjervøy.no +skierva.no +skiervá.no +skjak.no +skjåk.no +skodje.no +skanland.no +skånland.no +skanit.no +skánit.no +smola.no +smøla.no +snillfjord.no +snasa.no +snåsa.no +snoasa.no +snaase.no +snåase.no +sogndal.no +sokndal.no +sola.no +solund.no +songdalen.no +sortland.no +spydeberg.no +stange.no +stavanger.no +steigen.no +steinkjer.no +stjordal.no +stjørdal.no +stokke.no +stor-elvdal.no +stord.no +stordal.no +storfjord.no +omasvuotna.no +strand.no +stranda.no +stryn.no +sula.no +suldal.no +sund.no +sunndal.no +surnadal.no +sveio.no +svelvik.no +sykkylven.no +sogne.no +søgne.no +somna.no +sømna.no +sondre-land.no +søndre-land.no +sor-aurdal.no +sør-aurdal.no +sor-fron.no +sør-fron.no +sor-odal.no +sør-odal.no +sor-varanger.no +sør-varanger.no +matta-varjjat.no +mátta-várjjat.no +sorfold.no +sørfold.no +sorreisa.no +sørreisa.no +sorum.no +sørum.no +tana.no +deatnu.no +time.no +tingvoll.no +tinn.no +tjeldsund.no +dielddanuorri.no +tjome.no +tjøme.no +tokke.no +tolga.no +torsken.no +tranoy.no +tranøy.no +tromso.no +tromsø.no +tromsa.no +romsa.no +trondheim.no +troandin.no +trysil.no +trana.no +træna.no +trogstad.no +trøgstad.no +tvedestrand.no +tydal.no +tynset.no +tysfjord.no +divtasvuodna.no +divttasvuotna.no +tysnes.no +tysvar.no +tysvær.no +tonsberg.no +tønsberg.no +ullensaker.no +ullensvang.no +ulvik.no +utsira.no +vadso.no +vadsø.no +cahcesuolo.no +čáhcesuolo.no +vaksdal.no +valle.no +vang.no +vanylven.no +vardo.no +vardø.no +varggat.no +várggát.no +vefsn.no +vaapste.no +vega.no +vegarshei.no +vegårshei.no +vennesla.no +verdal.no +verran.no +vestby.no +vestnes.no +vestre-slidre.no +vestre-toten.no +vestvagoy.no +vestvågøy.no +vevelstad.no +vik.no +vikna.no +vindafjord.no +volda.no +voss.no +varoy.no +værøy.no +vagan.no +vågan.no +voagat.no +vagsoy.no +vågsøy.no +vaga.no +vågå.no +valer.ostfold.no +våler.østfold.no +valer.hedmark.no +våler.hedmark.no + +// np : http://www.mos.com.np/register.html +*.np + +// nr : http://cenpac.net.nr/dns/index.html +// Confirmed by registry 2008-06-17 +nr +biz.nr +info.nr +gov.nr +edu.nr +org.nr +net.nr +com.nr + +// nu : http://en.wikipedia.org/wiki/.nu +nu + +// nz : http://en.wikipedia.org/wiki/.nz +*.nz + +// om : http://en.wikipedia.org/wiki/.om +*.om +!mediaphone.om +!nawrastelecom.om +!nawras.om +!omanmobile.om +!omanpost.om +!omantel.om +!rakpetroleum.om +!siemens.om +!songfest.om +!statecouncil.om + +// org : http://en.wikipedia.org/wiki/.org +org + +// pa : http://www.nic.pa/ +// Some additional second level "domains" resolve directly as hostnames, such as +// pannet.pa, so we add a rule for "pa". +pa +ac.pa +gob.pa +com.pa +org.pa +sld.pa +edu.pa +net.pa +ing.pa +abo.pa +med.pa +nom.pa + +// pe : https://www.nic.pe/InformeFinalComision.pdf +pe +edu.pe +gob.pe +nom.pe +mil.pe +org.pe +com.pe +net.pe + +// pf : http://www.gobin.info/domainname/formulaire-pf.pdf +pf +com.pf +org.pf +edu.pf + +// pg : http://en.wikipedia.org/wiki/.pg +*.pg + +// ph : http://www.domains.ph/FAQ2.asp +// Submitted by registry 2008-06-13 +ph +com.ph +net.ph +org.ph +gov.ph +edu.ph +ngo.ph +mil.ph +i.ph + +// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK +pk +com.pk +net.pk +edu.pk +org.pk +fam.pk +biz.pk +web.pk +gov.pk +gob.pk +gok.pk +gon.pk +gop.pk +gos.pk +info.pk + +// pl : http://www.dns.pl/english/ +pl +// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html +aid.pl +agro.pl +atm.pl +auto.pl +biz.pl +com.pl +edu.pl +gmina.pl +gsm.pl +info.pl +mail.pl +miasta.pl +media.pl +mil.pl +net.pl +nieruchomosci.pl +nom.pl +org.pl +pc.pl +powiat.pl +priv.pl +realestate.pl +rel.pl +sex.pl +shop.pl +sklep.pl +sos.pl +szkola.pl +targi.pl +tm.pl +tourism.pl +travel.pl +turystyka.pl +// ICM functional domains (icm.edu.pl) +6bone.pl +art.pl +mbone.pl +// Government domains (administred by ippt.gov.pl) +gov.pl +uw.gov.pl +um.gov.pl +ug.gov.pl +upow.gov.pl +starostwo.gov.pl +so.gov.pl +sr.gov.pl +po.gov.pl +pa.gov.pl +// other functional domains +ngo.pl +irc.pl +usenet.pl +// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html +augustow.pl +babia-gora.pl +bedzin.pl +beskidy.pl +bialowieza.pl +bialystok.pl +bielawa.pl +bieszczady.pl +boleslawiec.pl +bydgoszcz.pl +bytom.pl +cieszyn.pl +czeladz.pl +czest.pl +dlugoleka.pl +elblag.pl +elk.pl +glogow.pl +gniezno.pl +gorlice.pl +grajewo.pl +ilawa.pl +jaworzno.pl +jelenia-gora.pl +jgora.pl +kalisz.pl +kazimierz-dolny.pl +karpacz.pl +kartuzy.pl +kaszuby.pl +katowice.pl +kepno.pl +ketrzyn.pl +klodzko.pl +kobierzyce.pl +kolobrzeg.pl +konin.pl +konskowola.pl +kutno.pl +lapy.pl +lebork.pl +legnica.pl +lezajsk.pl +limanowa.pl +lomza.pl +lowicz.pl +lubin.pl +lukow.pl +malbork.pl +malopolska.pl +mazowsze.pl +mazury.pl +mielec.pl +mielno.pl +mragowo.pl +naklo.pl +nowaruda.pl +nysa.pl +olawa.pl +olecko.pl +olkusz.pl +olsztyn.pl +opoczno.pl +opole.pl +ostroda.pl +ostroleka.pl +ostrowiec.pl +ostrowwlkp.pl +pila.pl +pisz.pl +podhale.pl +podlasie.pl +polkowice.pl +pomorze.pl +pomorskie.pl +prochowice.pl +pruszkow.pl +przeworsk.pl +pulawy.pl +radom.pl +rawa-maz.pl +rybnik.pl +rzeszow.pl +sanok.pl +sejny.pl +siedlce.pl +slask.pl +slupsk.pl +sosnowiec.pl +stalowa-wola.pl +skoczow.pl +starachowice.pl +stargard.pl +suwalki.pl +swidnica.pl +swiebodzin.pl +swinoujscie.pl +szczecin.pl +szczytno.pl +tarnobrzeg.pl +tgory.pl +turek.pl +tychy.pl +ustka.pl +walbrzych.pl +warmia.pl +warszawa.pl +waw.pl +wegrow.pl +wielun.pl +wlocl.pl +wloclawek.pl +wodzislaw.pl +wolomin.pl +wroclaw.pl +zachpomor.pl +zagan.pl +zarow.pl +zgora.pl +zgorzelec.pl +// TASK geographical domains (www.task.gda.pl/uslugi/dns) +gda.pl +gdansk.pl +gdynia.pl +med.pl +sopot.pl +// other geographical domains +gliwice.pl +krakow.pl +poznan.pl +wroc.pl +zakopane.pl + +// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +pm + +// pn : http://www.government.pn/PnRegistry/policies.htm +pn +gov.pn +co.pn +org.pn +edu.pn +net.pn + +// pr : http://www.nic.pr/index.asp?f=1 +pr +com.pr +net.pr +org.pr +gov.pr +edu.pr +isla.pr +pro.pr +biz.pr +info.pr +name.pr +// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr +est.pr +prof.pr +ac.pr + +// pro : http://www.nic.pro/support_faq.htm +pro +aca.pro +bar.pro +cpa.pro +jur.pro +law.pro +med.pro +eng.pro + +// ps : http://en.wikipedia.org/wiki/.ps +// http://www.nic.ps/registration/policy.html#reg +ps +edu.ps +gov.ps +sec.ps +plo.ps +com.ps +org.ps +net.ps + +// pt : http://online.dns.pt/dns/start_dns +pt +net.pt +gov.pt +org.pt +edu.pt +int.pt +publ.pt +com.pt +nome.pt + +// pw : http://en.wikipedia.org/wiki/.pw +pw +co.pw +ne.pw +or.pw +ed.pw +go.pw +belau.pw + +// py : http://www.nic.py/faq_a.html#faq_b +*.py + +// qa : http://domains.qa/en/ +qa +com.qa +edu.qa +gov.qa +mil.qa +name.qa +net.qa +org.qa +sch.qa + +// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs +re +com.re +asso.re +nom.re + +// ro : http://www.rotld.ro/ +ro +com.ro +org.ro +tm.ro +nt.ro +nom.ro +info.ro +rec.ro +arts.ro +firm.ro +store.ro +www.ro + +// rs : http://en.wikipedia.org/wiki/.rs +rs +co.rs +org.rs +edu.rs +ac.rs +gov.rs +in.rs + +// ru : http://www.cctld.ru/ru/docs/aktiv_8.php +// Industry domains +ru +ac.ru +com.ru +edu.ru +int.ru +net.ru +org.ru +pp.ru +// Geographical domains +adygeya.ru +altai.ru +amur.ru +arkhangelsk.ru +astrakhan.ru +bashkiria.ru +belgorod.ru +bir.ru +bryansk.ru +buryatia.ru +cbg.ru +chel.ru +chelyabinsk.ru +chita.ru +chukotka.ru +chuvashia.ru +dagestan.ru +dudinka.ru +e-burg.ru +grozny.ru +irkutsk.ru +ivanovo.ru +izhevsk.ru +jar.ru +joshkar-ola.ru +kalmykia.ru +kaluga.ru +kamchatka.ru +karelia.ru +kazan.ru +kchr.ru +kemerovo.ru +khabarovsk.ru +khakassia.ru +khv.ru +kirov.ru +koenig.ru +komi.ru +kostroma.ru +krasnoyarsk.ru +kuban.ru +kurgan.ru +kursk.ru +lipetsk.ru +magadan.ru +mari.ru +mari-el.ru +marine.ru +mordovia.ru +mosreg.ru +msk.ru +murmansk.ru +nalchik.ru +nnov.ru +nov.ru +novosibirsk.ru +nsk.ru +omsk.ru +orenburg.ru +oryol.ru +palana.ru +penza.ru +perm.ru +pskov.ru +ptz.ru +rnd.ru +ryazan.ru +sakhalin.ru +samara.ru +saratov.ru +simbirsk.ru +smolensk.ru +spb.ru +stavropol.ru +stv.ru +surgut.ru +tambov.ru +tatarstan.ru +tom.ru +tomsk.ru +tsaritsyn.ru +tsk.ru +tula.ru +tuva.ru +tver.ru +tyumen.ru +udm.ru +udmurtia.ru +ulan-ude.ru +vladikavkaz.ru +vladimir.ru +vladivostok.ru +volgograd.ru +vologda.ru +voronezh.ru +vrn.ru +vyatka.ru +yakutia.ru +yamal.ru +yaroslavl.ru +yekaterinburg.ru +yuzhno-sakhalinsk.ru +// More geographical domains +amursk.ru +baikal.ru +cmw.ru +fareast.ru +jamal.ru +kms.ru +k-uralsk.ru +kustanai.ru +kuzbass.ru +magnitka.ru +mytis.ru +nakhodka.ru +nkz.ru +norilsk.ru +oskol.ru +pyatigorsk.ru +rubtsovsk.ru +snz.ru +syzran.ru +vdonsk.ru +zgrad.ru +// State domains +gov.ru +mil.ru +// Technical domains +test.ru + +// rw : http://www.nic.rw/cgi-bin/policy.pl +rw +gov.rw +net.rw +edu.rw +ac.rw +com.rw +co.rw +int.rw +mil.rw +gouv.rw + +// sa : http://www.nic.net.sa/ +sa +com.sa +net.sa +org.sa +gov.sa +med.sa +pub.sa +edu.sa +sch.sa + +// sb : http://www.sbnic.net.sb/ +// Submitted by registry 2008-06-08 +sb +com.sb +edu.sb +gov.sb +net.sb +org.sb + +// sc : http://www.nic.sc/ +sc +com.sc +gov.sc +net.sc +org.sc +edu.sc + +// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm +// Submitted by registry 2008-06-17 +sd +com.sd +net.sd +org.sd +edu.sd +med.sd +gov.sd +info.sd + +// se : http://en.wikipedia.org/wiki/.se +// Submitted by registry 2008-06-24 +se +a.se +ac.se +b.se +bd.se +brand.se +c.se +d.se +e.se +f.se +fh.se +fhsk.se +fhv.se +g.se +h.se +i.se +k.se +komforb.se +kommunalforbund.se +komvux.se +l.se +lanbib.se +m.se +n.se +naturbruksgymn.se +o.se +org.se +p.se +parti.se +pp.se +press.se +r.se +s.se +sshn.se +t.se +tm.se +u.se +w.se +x.se +y.se +z.se + +// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html +sg +com.sg +net.sg +org.sg +gov.sg +edu.sg +per.sg + +// sh : http://www.nic.sh/rules.html +// list of 2nd level domains ? +sh + +// si : http://en.wikipedia.org/wiki/.si +si + +// sj : No registrations at this time. +// Submitted by registry 2008-06-16 + +// sk : http://en.wikipedia.org/wiki/.sk +// list of 2nd level domains ? +sk + +// sl : http://www.nic.sl +// Submitted by registry 2008-06-12 +sl +com.sl +net.sl +edu.sl +gov.sl +org.sl + +// sm : http://en.wikipedia.org/wiki/.sm +sm + +// sn : http://en.wikipedia.org/wiki/.sn +sn +art.sn +com.sn +edu.sn +gouv.sn +org.sn +perso.sn +univ.sn + +// so : http://www.soregistry.com/ +so +com.so +net.so +org.so + +// sr : http://en.wikipedia.org/wiki/.sr +sr + +// st : http://www.nic.st/html/policyrules/ +st +co.st +com.st +consulado.st +edu.st +embaixada.st +gov.st +mil.st +net.st +org.st +principe.st +saotome.st +store.st + +// su : http://en.wikipedia.org/wiki/.su +su + +// sv : http://www.svnet.org.sv/svpolicy.html +*.sv + +// sy : http://en.wikipedia.org/wiki/.sy +// see also: http://www.gobin.info/domainname/sy.doc +sy +edu.sy +gov.sy +net.sy +mil.sy +com.sy +org.sy + +// sz : http://en.wikipedia.org/wiki/.sz +// http://www.sispa.org.sz/ +sz +co.sz +ac.sz +org.sz + +// tc : http://en.wikipedia.org/wiki/.tc +tc + +// td : http://en.wikipedia.org/wiki/.td +td + +// tel: http://en.wikipedia.org/wiki/.tel +// http://www.telnic.org/ +tel + +// tf : http://en.wikipedia.org/wiki/.tf +tf + +// tg : http://en.wikipedia.org/wiki/.tg +// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains, +// although this contradicts wikipedia. +tg + +// th : http://en.wikipedia.org/wiki/.th +// Submitted by registry 2008-06-17 +th +ac.th +co.th +go.th +in.th +mi.th +net.th +or.th + +// tj : http://www.nic.tj/policy.htm +tj +ac.tj +biz.tj +co.tj +com.tj +edu.tj +go.tj +gov.tj +int.tj +mil.tj +name.tj +net.tj +nic.tj +org.tj +test.tj +web.tj + +// tk : http://en.wikipedia.org/wiki/.tk +tk + +// tl : http://en.wikipedia.org/wiki/.tl +tl +gov.tl + +// tm : http://www.nic.tm/rules.html +// list of 2nd level tlds ? +tm + +// tn : http://en.wikipedia.org/wiki/.tn +// http://whois.ati.tn/ +tn +com.tn +ens.tn +fin.tn +gov.tn +ind.tn +intl.tn +nat.tn +net.tn +org.tn +info.tn +perso.tn +tourism.tn +edunet.tn +rnrt.tn +rns.tn +rnu.tn +mincom.tn +agrinet.tn +defense.tn +turen.tn + +// to : http://en.wikipedia.org/wiki/.to +// Submitted by registry 2008-06-17 +to +com.to +gov.to +net.to +org.to +edu.to +mil.to + +// tr : http://en.wikipedia.org/wiki/.tr +*.tr +!nic.tr +// Used by government in the TRNC +// http://en.wikipedia.org/wiki/.nc.tr +gov.nc.tr + +// travel : http://en.wikipedia.org/wiki/.travel +travel + +// tt : http://www.nic.tt/ +tt +co.tt +com.tt +org.tt +net.tt +biz.tt +info.tt +pro.tt +int.tt +coop.tt +jobs.tt +mobi.tt +travel.tt +museum.tt +aero.tt +name.tt +gov.tt +edu.tt + +// tv : http://en.wikipedia.org/wiki/.tv +// Not listing any 2LDs as reserved since none seem to exist in practice, +// Wikipedia notwithstanding. +tv + +// tw : http://en.wikipedia.org/wiki/.tw +tw +edu.tw +gov.tw +mil.tw +com.tw +net.tw +org.tw +idv.tw +game.tw +ebiz.tw +club.tw +網路.tw +組織.tw +商業.tw + +// tz : http://en.wikipedia.org/wiki/.tz +// Submitted by registry 2008-06-17 +// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25 +ac.tz +co.tz +go.tz +mil.tz +ne.tz +or.tz +sc.tz + +// ua : http://www.nic.net.ua/ +ua +com.ua +edu.ua +gov.ua +in.ua +net.ua +org.ua +// ua geo-names +cherkassy.ua +chernigov.ua +chernovtsy.ua +ck.ua +cn.ua +crimea.ua +cv.ua +dn.ua +dnepropetrovsk.ua +donetsk.ua +dp.ua +if.ua +ivano-frankivsk.ua +kh.ua +kharkov.ua +kherson.ua +khmelnitskiy.ua +kiev.ua +kirovograd.ua +km.ua +kr.ua +ks.ua +kv.ua +lg.ua +lugansk.ua +lutsk.ua +lviv.ua +mk.ua +nikolaev.ua +od.ua +odessa.ua +pl.ua +poltava.ua +rovno.ua +rv.ua +sebastopol.ua +sumy.ua +te.ua +ternopil.ua +uzhgorod.ua +vinnica.ua +vn.ua +zaporizhzhe.ua +zp.ua +zhitomir.ua +zt.ua + +// Private registries in .ua +co.ua +pp.ua + +// ug : http://www.registry.co.ug/ +ug +co.ug +ac.ug +sc.ug +go.ug +ne.ug +or.ug + +// uk : http://en.wikipedia.org/wiki/.uk +*.uk +*.sch.uk +!bl.uk +!british-library.uk +!icnet.uk +!jet.uk +!mod.uk +!nel.uk +!nhs.uk +!nic.uk +!nls.uk +!national-library-scotland.uk +!parliament.uk +!police.uk + +// us : http://en.wikipedia.org/wiki/.us +us +dni.us +fed.us +isa.us +kids.us +nsn.us +// us geographic names +ak.us +al.us +ar.us +as.us +az.us +ca.us +co.us +ct.us +dc.us +de.us +fl.us +ga.us +gu.us +hi.us +ia.us +id.us +il.us +in.us +ks.us +ky.us +la.us +ma.us +md.us +me.us +mi.us +mn.us +mo.us +ms.us +mt.us +nc.us +nd.us +ne.us +nh.us +nj.us +nm.us +nv.us +ny.us +oh.us +ok.us +or.us +pa.us +pr.us +ri.us +sc.us +sd.us +tn.us +tx.us +ut.us +vi.us +vt.us +va.us +wa.us +wi.us +wv.us +wy.us +// The registrar notes several more specific domains available in each state, +// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat +// haphazard; in some states these domains resolve as addresses, while in others +// only subdomains are available, or even nothing at all. We include the +// most common ones where it's clear that different sites are different +// entities. +k12.ak.us +k12.al.us +k12.ar.us +k12.as.us +k12.az.us +k12.ca.us +k12.co.us +k12.ct.us +k12.dc.us +k12.de.us +k12.fl.us +k12.ga.us +k12.gu.us +// k12.hi.us Hawaii has a state-wide DOE login: bug 614565 +k12.ia.us +k12.id.us +k12.il.us +k12.in.us +k12.ks.us +k12.ky.us +k12.la.us +k12.ma.us +k12.md.us +k12.me.us +k12.mi.us +k12.mn.us +k12.mo.us +k12.ms.us +k12.mt.us +k12.nc.us +k12.nd.us +k12.ne.us +k12.nh.us +k12.nj.us +k12.nm.us +k12.nv.us +k12.ny.us +k12.oh.us +k12.ok.us +k12.or.us +k12.pa.us +k12.pr.us +k12.ri.us +k12.sc.us +k12.sd.us +k12.tn.us +k12.tx.us +k12.ut.us +k12.vi.us +k12.vt.us +k12.va.us +k12.wa.us +k12.wi.us +k12.wv.us +k12.wy.us + +cc.ak.us +cc.al.us +cc.ar.us +cc.as.us +cc.az.us +cc.ca.us +cc.co.us +cc.ct.us +cc.dc.us +cc.de.us +cc.fl.us +cc.ga.us +cc.gu.us +cc.hi.us +cc.ia.us +cc.id.us +cc.il.us +cc.in.us +cc.ks.us +cc.ky.us +cc.la.us +cc.ma.us +cc.md.us +cc.me.us +cc.mi.us +cc.mn.us +cc.mo.us +cc.ms.us +cc.mt.us +cc.nc.us +cc.nd.us +cc.ne.us +cc.nh.us +cc.nj.us +cc.nm.us +cc.nv.us +cc.ny.us +cc.oh.us +cc.ok.us +cc.or.us +cc.pa.us +cc.pr.us +cc.ri.us +cc.sc.us +cc.sd.us +cc.tn.us +cc.tx.us +cc.ut.us +cc.vi.us +cc.vt.us +cc.va.us +cc.wa.us +cc.wi.us +cc.wv.us +cc.wy.us + +lib.ak.us +lib.al.us +lib.ar.us +lib.as.us +lib.az.us +lib.ca.us +lib.co.us +lib.ct.us +lib.dc.us +lib.de.us +lib.fl.us +lib.ga.us +lib.gu.us +lib.hi.us +lib.ia.us +lib.id.us +lib.il.us +lib.in.us +lib.ks.us +lib.ky.us +lib.la.us +lib.ma.us +lib.md.us +lib.me.us +lib.mi.us +lib.mn.us +lib.mo.us +lib.ms.us +lib.mt.us +lib.nc.us +lib.nd.us +lib.ne.us +lib.nh.us +lib.nj.us +lib.nm.us +lib.nv.us +lib.ny.us +lib.oh.us +lib.ok.us +lib.or.us +lib.pa.us +lib.pr.us +lib.ri.us +lib.sc.us +lib.sd.us +lib.tn.us +lib.tx.us +lib.ut.us +lib.vi.us +lib.vt.us +lib.va.us +lib.wa.us +lib.wi.us +lib.wv.us +lib.wy.us + +// k12.ma.us contains school districts in Massachusetts. The 4LDs are +// managed indepedently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated dorectly to the +// 5LD operators. +pvt.k12.ma.us +chtr.k12.ma.us +paroch.k12.ma.us + +// uy : http://www.antel.com.uy/ +*.uy + +// uz : http://www.reg.uz/registerr.html +// are there other 2nd level tlds ? +uz +com.uz +co.uz + +// va : http://en.wikipedia.org/wiki/.va +va + +// vc : http://en.wikipedia.org/wiki/.vc +// Submitted by registry 2008-06-13 +vc +com.vc +net.vc +org.vc +gov.vc +mil.vc +edu.vc + +// ve : http://registro.nic.ve/nicve/registro/index.html +*.ve + +// vg : http://en.wikipedia.org/wiki/.vg +vg + +// vi : http://www.nic.vi/newdomainform.htm +// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other +// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they +// are available for registration (which they do not seem to be). +vi +co.vi +com.vi +k12.vi +net.vi +org.vi + +// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp +vn +com.vn +net.vn +org.vn +edu.vn +gov.vn +int.vn +ac.vn +biz.vn +info.vn +name.vn +pro.vn +health.vn + +// vu : http://en.wikipedia.org/wiki/.vu +// list of 2nd level tlds ? +vu + +// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +wf + +// ws : http://en.wikipedia.org/wiki/.ws +// http://samoanic.ws/index.dhtml +ws +com.ws +net.ws +org.ws +gov.ws +edu.ws + +// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf +yt + +// IDN ccTLDs +// Please sort by ISO 3166 ccTLD, then punicode string +// when submitting patches and follow this format: +// ("" ) : +// [optional sponsoring org] +// + +// xn--mgbaam7a8h ("Emerat" Arabic) : AE +//http://nic.ae/english/arabicdomain/rules.jsp +امارات + +// xn--54b7fta0cc ("Bangla" Bangla) : BD +বাংলা + +// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +中国 + +// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +中國 + +// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ +الجزائر + +// xn--wgbh1c ("Egypt" Arabic .masr) : EG +// http://www.dotmasr.eg/ +مصر + +// xn--node ("ge" Georgian (Mkhedruli)) : GE +გე + +// xn--j6w193g ("Hong Kong" Chinese-Han) : HK +// https://www2.hkirc.hk/register/rules.jsp +香港 + +// xn--h2brj9c ("Bharat" Devanagari) : IN +// India +भारत + +// xn--mgbbh1a71e ("Bharat" Arabic) : IN +// India +بھارت + +// xn--fpcrj9c3d ("Bharat" Telugu) : IN +// India +భారత్ + +// xn--gecrj9c ("Bharat" Gujarati) : IN +// India +ભારત + +// xn--s9brj9c ("Bharat" Gurmukhi) : IN +// India +ਭਾਰਤ + +// xn--45brj9c ("Bharat" Bengali) : IN +// India +ভারত + +// xn--xkc2dl3a5ee0h ("India" Tamil) : IN +// India +இந்தியா + +// xn--mgba3a4f16a ("Iran" Persian) : IR +ایران + +// xn--mgba3a4fra ("Iran" Arabic) : IR +ايران + +//xn--mgbayh7gpa ("al-Ordon" Arabic) JO +//National Information Technology Center (NITC) +//Royal Scientific Society, Al-Jubeiha +الاردن + +// xn--3e0b707e ("Republic of Korea" Hangul) : KR +한국 + +// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK +// http://nic.lk +ලංකා + +// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK +// http://nic.lk +இலங்கை + +// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA +المغرب + +// xn--mgb9awbf ("Oman" Arabic) : OM +عمان + +// xn--ygbi2ammx ("Falasteen" Arabic) : PS +// The Palestinian National Internet Naming Authority (PNINA) +// http://www.pnina.ps +فلسطين + +// xn--90a3ac ("srb" Cyrillic) : RS +срб + +// xn--p1ai ("rf" Russian-Cyrillic) : RU +// http://www.cctld.ru/en/docs/rulesrf.php +рф + +// xn--wgbl6a ("Qatar" Arabic) : QA +// http://www.ict.gov.qa/ +قطر + +// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA +// http://www.nic.net.sa/ +السعودية + +// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA +السعودیة + +// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA +السعودیۃ + +// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA +السعوديه + +// xn--ogbpf8fl ("Syria" Arabic) : SY +سورية + +// xn--mgbtf8fl ("Syria" Arabic) variant : SY +سوريا + +// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG +新加坡 + +// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG +சிங்கப்பூர் + +// xn--o3cw4h ("Thai" Thai) : TH +// http://www.thnic.co.th +ไทย + +// xn--pgbs0dh ("Tunis") : TN +// http://nic.tn +تونس + +// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台灣 + +// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台湾 + +// xn--nnx388a ("Taiwan") variant : TW +臺灣 + +// xn--j1amh ("ukr" Cyrillic) : UA +укр + +// xn--mgb2ddes ("AlYemen" Arabic) : YE +اليمن + +// xxx : http://icmregistry.com +xxx + +// ye : http://www.y.net.ye/services/domain_name.htm +*.ye + +// za : http://www.zadna.org.za/slds.html +*.za + +// zm : http://en.wikipedia.org/wiki/.zm +*.zm + +// zw : http://en.wikipedia.org/wiki/.zw +*.zw + +// ===END ICANN DOMAINS=== +// ===BEGIN PRIVATE DOMAINS=== + +// info.at : http://www.info.at/ +biz.at +info.at + +// priv.at : http://www.nic.priv.at/ +// Submitted by registry 2008-06-09 +priv.at + +// co.ca : http://registry.co.ca +co.ca + +// CentralNic : http://www.centralnic.com/names/domains +// Confirmed by registry 2008-06-09 +ar.com +br.com +cn.com +de.com +eu.com +gb.com +gr.com +hu.com +jpn.com +kr.com +no.com +qc.com +ru.com +sa.com +se.com +uk.com +us.com +uy.com +za.com +gb.net +jp.net +se.net +uk.net +ae.org +us.org +com.de + +// Opera Software, A.S.A. +// Requested by Yngve Pettersen 2009-11-26 +operaunite.com + +// Google, Inc. +// Requested by Eduardo Vela 2010-09-06 +appspot.com + +// iki.fi : Submitted by Hannu Aronsson 2009-11-05 +iki.fi + +// c.la : http://www.c.la/ +c.la + +// ZaNiC : http://www.za.net/ +// Confirmed by registry 2009-10-03 +za.net +za.org + +// CoDNS B.V. +// Added 2010-05-23. +co.nl +co.no + +// Mainseek Sp. z o.o. : http://www.co.pl/ +co.pl + +// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ +dyndns-at-home.com +dyndns-at-work.com +dyndns-blog.com +dyndns-free.com +dyndns-home.com +dyndns-ip.com +dyndns-mail.com +dyndns-office.com +dyndns-pics.com +dyndns-remote.com +dyndns-server.com +dyndns-web.com +dyndns-wiki.com +dyndns-work.com +dyndns.biz +dyndns.info +dyndns.org +dyndns.tv +at-band-camp.net +ath.cx +barrel-of-knowledge.info +barrell-of-knowledge.info +better-than.tv +blogdns.com +blogdns.net +blogdns.org +blogsite.org +boldlygoingnowhere.org +broke-it.net +buyshouses.net +cechire.com +dnsalias.com +dnsalias.net +dnsalias.org +dnsdojo.com +dnsdojo.net +dnsdojo.org +does-it.net +doesntexist.com +doesntexist.org +dontexist.com +dontexist.net +dontexist.org +doomdns.com +doomdns.org +dvrdns.org +dyn-o-saur.com +dynalias.com +dynalias.net +dynalias.org +dynathome.net +dyndns.ws +endofinternet.net +endofinternet.org +endoftheinternet.org +est-a-la-maison.com +est-a-la-masion.com +est-le-patron.com +est-mon-blogueur.com +for-better.biz +for-more.biz +for-our.info +for-some.biz +for-the.biz +forgot.her.name +forgot.his.name +from-ak.com +from-al.com +from-ar.com +from-az.net +from-ca.com +from-co.net +from-ct.com +from-dc.com +from-de.com +from-fl.com +from-ga.com +from-hi.com +from-ia.com +from-id.com +from-il.com +from-in.com +from-ks.com +from-ky.com +from-la.net +from-ma.com +from-md.com +from-me.org +from-mi.com +from-mn.com +from-mo.com +from-ms.com +from-mt.com +from-nc.com +from-nd.com +from-ne.com +from-nh.com +from-nj.com +from-nm.com +from-nv.com +from-ny.net +from-oh.com +from-ok.com +from-or.com +from-pa.com +from-pr.com +from-ri.com +from-sc.com +from-sd.com +from-tn.com +from-tx.com +from-ut.com +from-va.com +from-vt.com +from-wa.com +from-wi.com +from-wv.com +from-wy.com +ftpaccess.cc +fuettertdasnetz.de +game-host.org +game-server.cc +getmyip.com +gets-it.net +go.dyndns.org +gotdns.com +gotdns.org +groks-the.info +groks-this.info +ham-radio-op.net +here-for-more.info +hobby-site.com +hobby-site.org +home.dyndns.org +homedns.org +homeftp.net +homeftp.org +homeip.net +homelinux.com +homelinux.net +homelinux.org +homeunix.com +homeunix.net +homeunix.org +iamallama.com +in-the-band.net +is-a-anarchist.com +is-a-blogger.com +is-a-bookkeeper.com +is-a-bruinsfan.org +is-a-bulls-fan.com +is-a-candidate.org +is-a-caterer.com +is-a-celticsfan.org +is-a-chef.com +is-a-chef.net +is-a-chef.org +is-a-conservative.com +is-a-cpa.com +is-a-cubicle-slave.com +is-a-democrat.com +is-a-designer.com +is-a-doctor.com +is-a-financialadvisor.com +is-a-geek.com +is-a-geek.net +is-a-geek.org +is-a-green.com +is-a-guru.com +is-a-hard-worker.com +is-a-hunter.com +is-a-knight.org +is-a-landscaper.com +is-a-lawyer.com +is-a-liberal.com +is-a-libertarian.com +is-a-linux-user.org +is-a-llama.com +is-a-musician.com +is-a-nascarfan.com +is-a-nurse.com +is-a-painter.com +is-a-patsfan.org +is-a-personaltrainer.com +is-a-photographer.com +is-a-player.com +is-a-republican.com +is-a-rockstar.com +is-a-socialist.com +is-a-soxfan.org +is-a-student.com +is-a-teacher.com +is-a-techie.com +is-a-therapist.com +is-an-accountant.com +is-an-actor.com +is-an-actress.com +is-an-anarchist.com +is-an-artist.com +is-an-engineer.com +is-an-entertainer.com +is-by.us +is-certified.com +is-found.org +is-gone.com +is-into-anime.com +is-into-cars.com +is-into-cartoons.com +is-into-games.com +is-leet.com +is-lost.org +is-not-certified.com +is-saved.org +is-slick.com +is-uberleet.com +is-very-bad.org +is-very-evil.org +is-very-good.org +is-very-nice.org +is-very-sweet.org +is-with-theband.com +isa-geek.com +isa-geek.net +isa-geek.org +isa-hockeynut.com +issmarterthanyou.com +isteingeek.de +istmein.de +kicks-ass.net +kicks-ass.org +knowsitall.info +land-4-sale.us +lebtimnetz.de +leitungsen.de +likes-pie.com +likescandy.com +merseine.nu +mine.nu +misconfused.org +mypets.ws +myphotos.cc +neat-url.com +office-on-the.net +on-the-web.tv +podzone.net +podzone.org +readmyblog.org +saves-the-whales.com +scrapper-site.net +scrapping.cc +selfip.biz +selfip.com +selfip.info +selfip.net +selfip.org +sells-for-less.com +sells-for-u.com +sells-it.net +sellsyourhome.org +servebbs.com +servebbs.net +servebbs.org +serveftp.net +serveftp.org +servegame.org +shacknet.nu +simple-url.com +space-to-rent.com +stuff-4-sale.org +stuff-4-sale.us +teaches-yoga.com +thruhere.net +traeumtgerade.de +webhop.biz +webhop.info +webhop.net +webhop.org +worse-than.tv +writesthisblog.com + +// ===END PRIVATE DOMAINS=== diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js new file mode 100644 index 00000000..3cce815e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js @@ -0,0 +1,1340 @@ +/* + * Copyright GoInstant, Inc. and other contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +var vows = require('vows'); +var assert = require('assert'); +var async = require('async'); + +// NOTE use require("tough-cookie") in your own code: +var tough = require('./lib/cookie'); +var Cookie = tough.Cookie; +var CookieJar = tough.CookieJar; + + +function dateVows(table) { + var theVows = { }; + var keys = Object.keys(table).forEach(function(date) { + var expect = table[date]; + theVows[date] = function() { + var got = tough.parseDate(date) ? 'valid' : 'invalid'; + assert.equal(got, expect ? 'valid' : 'invalid'); + }; + }); + return { "date parsing": theVows }; +} + +function matchVows(func,table) { + var theVows = {}; + table.forEach(function(item) { + var str = item[0]; + var dom = item[1]; + var expect = item[2]; + var label = str+(expect?" matches ":" doesn't match ")+dom; + theVows[label] = function() { + assert.equal(func(str,dom),expect); + }; + }); + return theVows; +} + +function defaultPathVows(table) { + var theVows = {}; + table.forEach(function(item) { + var str = item[0]; + var expect = item[1]; + var label = str+" gives "+expect; + theVows[label] = function() { + assert.equal(tough.defaultPath(str),expect); + }; + }); + return theVows; +} + +var atNow = Date.now(); +function at(offset) { return {now: new Date(atNow+offset)} } + +vows.describe('Cookie Jar') +.addBatch({ + "all defined": function() { + assert.ok(Cookie); + assert.ok(CookieJar); + }, +}) +.addBatch( + dateVows({ + "Wed, 09 Jun 2021 10:18:14 GMT": true, + "Wed, 09 Jun 2021 22:18:14 GMT": true, + "Tue, 18 Oct 2011 07:42:42.123 GMT": true, + "18 Oct 2011 07:42:42 GMT": true, + "8 Oct 2011 7:42:42 GMT": true, + "8 Oct 2011 7:2:42 GMT": false, + "Oct 18 2011 07:42:42 GMT": true, + "Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)": true, + "09 Jun 2021 10:18:14 GMT": true, + "99 Jix 3038 48:86:72 ZMT": false, + '01 Jan 1970 00:00:00 GMT': true, + '01 Jan 1600 00:00:00 GMT': false, // before 1601 + '01 Jan 1601 00:00:00 GMT': true, + '10 Feb 81 13:00:00 GMT': true, // implicit year + 'Thu, 01 Jan 1970 00:00:010 GMT': true, // strange time, non-strict OK + 'Thu, 17-Apr-2014 02:12:29 GMT': true, // dashes + 'Thu, 17-Apr-2014 02:12:29 UTC': true, // dashes and UTC + }) +) +.addBatch({ + "strict date parse of Thu, 01 Jan 1970 00:00:010 GMT": { + topic: function() { + return tough.parseDate('Thu, 01 Jan 1970 00:00:010 GMT', true) ? true : false; + }, + "invalid": function(date) { + assert.equal(date,false); + }, + } +}) +.addBatch({ + "formatting": { + "a simple cookie": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b'); + }, + }, + "a cookie with spaces in the value": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'beta gamma'; + return c; + }, + "doesn't validate": function(c) { + assert.ok(!c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a="beta gamma"'); + }, + }, + "with an empty value and HttpOnly": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.httpOnly = true; + return c; + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=; HttpOnly'); + } + }, + "with an expiry": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT'); + }, + "to short string": function(c) { + assert.equal(c.cookieString(), 'a=b'); + }, + }, + "with a max-age": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + c.maxAge = 12345; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); // mabe this one *shouldn't*? + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345'); + }, + }, + "with a bunch of things": function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.setExpires("Oct 18 2011 07:05:03 GMT"); + c.maxAge = 12345; + c.domain = 'example.com'; + c.path = '/foo'; + c.secure = true; + c.httpOnly = true; + c.extensions = ['MyExtension']; + assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345; Domain=example.com; Path=/foo; Secure; HttpOnly; MyExtension'); + }, + "a host-only cookie": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.hostOnly = true; + c.domain = 'shouldnt-stringify.example.com'; + c.path = '/should-stringify'; + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + assert.equal(c.toString(), 'a=b; Path=/should-stringify'); + }, + }, + "minutes are '10'": { + topic: function() { + var c = new Cookie(); + c.key = 'a'; + c.value = 'b'; + c.expires = new Date(1284113410000); + return c; + }, + "validates": function(c) { + assert.ok(c.validate()); + }, + "to string": function(c) { + var str = c.toString(); + assert.notEqual(str, 'a=b; Expires=Fri, 010 Sep 2010 010:010:010 GMT'); + assert.equal(str, 'a=b; Expires=Fri, 10 Sep 2010 10:10:10 GMT'); + }, + } + } +}) +.addBatch({ + "TTL with max-age": function() { + var c = new Cookie(); + c.maxAge = 123; + assert.equal(c.TTL(), 123000); + assert.equal(c.expiryTime(new Date(9000000)), 9123000); + }, + "TTL with zero max-age": function() { + var c = new Cookie(); + c.key = 'a'; c.value = 'b'; + c.maxAge = 0; // should be treated as "earliest representable" + assert.equal(c.TTL(), 0); + assert.equal(c.expiryTime(new Date(9000000)), -Infinity); + assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT + }, + "TTL with negative max-age": function() { + var c = new Cookie(); + c.key = 'a'; c.value = 'b'; + c.maxAge = -1; // should be treated as "earliest representable" + assert.equal(c.TTL(), 0); + assert.equal(c.expiryTime(new Date(9000000)), -Infinity); + assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT + }, + "TTL with max-age and expires": function() { + var c = new Cookie(); + c.maxAge = 123; + c.expires = new Date(Date.now()+9000); + assert.equal(c.TTL(), 123000); + assert.ok(c.isPersistent()); + }, + "TTL with expires": function() { + var c = new Cookie(); + var now = Date.now(); + c.expires = new Date(now+9000); + assert.equal(c.TTL(now), 9000); + assert.equal(c.expiryTime(), c.expires.getTime()); + }, + "TTL with old expires": function() { + var c = new Cookie(); + c.setExpires('17 Oct 2010 00:00:00 GMT'); + assert.ok(c.TTL() < 0); + assert.ok(c.isPersistent()); + }, + "default TTL": { + topic: function() { return new Cookie() }, + "is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) }, + "is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) }, + }, +}).addBatch({ + "Parsing": { + "simple": { + topic: function() { + return Cookie.parse('a=bcd',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'a') }, + "value": function(c) { assert.equal(c.value, 'bcd') }, + "no path": function(c) { assert.equal(c.path, null) }, + "no domain": function(c) { assert.equal(c.domain, null) }, + "no extensions": function(c) { assert.ok(!c.extensions) }, + }, + "with expiry": { + topic: function() { + return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'a') }, + "value": function(c) { assert.equal(c.value, 'bcd') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + }, + "with expiry and path": { + topic: function() { + return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc',true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'abc') }, + "value": function(c) { assert.equal(c.value, 'xyzzy!') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + "has path": function(c) { assert.equal(c.path, '/aBc'); }, + "no httponly or secure": function(c) { + assert.ok(!c.httpOnly); + assert.ok(!c.secure); + }, + }, + "with everything": { + topic: function() { + return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz', true) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'abc') }, + "value": function(c) { assert.equal(c.value, 'xyzzy!') }, + "has expires": function(c) { + assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); + assert.equal(c.expires.getTime(), 1318921503000); + }, + "has path": function(c) { assert.equal(c.path, '/aBc'); }, + "has domain": function(c) { assert.equal(c.domain, 'example.com'); }, + "has httponly": function(c) { assert.equal(c.httpOnly, true); }, + "has secure": function(c) { assert.equal(c.secure, true); }, + "has max-age": function(c) { assert.equal(c.maxAge, 1234); }, + "has extensions": function(c) { + assert.ok(c.extensions); + assert.equal(c.extensions[0], 'Foo=Bar'); + assert.equal(c.extensions[1], 'Baz'); + }, + }, + "invalid expires": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Expires=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Expires=xyzzy"); + assert.ok(c); + assert.equal(c.expires, Infinity); + }, + }, + "zero max-age": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=0", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Max-Age=0"); + assert.ok(c); + assert.equal(c.maxAge, 0); + }, + }, + "negative max-age": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=-1", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Max-Age=-1"); + assert.ok(c); + assert.equal(c.maxAge, -1); + }, + }, + "empty domain": { + "strict": function() { assert.ok(!Cookie.parse("a=b; domain=", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; domain="); + assert.ok(c); + assert.equal(c.domain, null); + }, + }, + "dot domain": { + "strict": function() { assert.ok(!Cookie.parse("a=b; domain=.", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; domain=."); + assert.ok(c); + assert.equal(c.domain, null); + }, + }, + "uppercase domain": { + "strict lowercases": function() { + var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); + assert.ok(c); + assert.equal(c.domain, 'example.com'); + }, + "non-strict lowercases": function() { + var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); + assert.ok(c); + assert.equal(c.domain, 'example.com'); + }, + }, + "trailing dot in domain": { + topic: function() { + return Cookie.parse("a=b; Domain=example.com.", true) || null; + }, + "has the domain": function(c) { assert.equal(c.domain,"example.com.") }, + "but doesn't validate": function(c) { assert.equal(c.validate(),false) }, + }, + "empty path": { + "strict": function() { assert.ok(!Cookie.parse("a=b; path=", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; path="); + assert.ok(c); + assert.equal(c.path, null); + }, + }, + "no-slash path": { + "strict": function() { assert.ok(!Cookie.parse("a=b; path=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; path=xyzzy"); + assert.ok(c); + assert.equal(c.path, null); + }, + }, + "trailing semi-colons after path": { + topic: function () { + return [ + "a=b; path=/;", + "c=d;;;;" + ]; + }, + "strict": function (t) { + assert.ok(!Cookie.parse(t[0], true)); + assert.ok(!Cookie.parse(t[1], true)); + }, + "non-strict": function (t) { + var c1 = Cookie.parse(t[0]); + var c2 = Cookie.parse(t[1]); + assert.ok(c1); + assert.ok(c2); + assert.equal(c1.path, '/'); + } + }, + "secure-with-value": { + "strict": function() { assert.ok(!Cookie.parse("a=b; Secure=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; Secure=xyzzy"); + assert.ok(c); + assert.equal(c.secure, true); + }, + }, + "httponly-with-value": { + "strict": function() { assert.ok(!Cookie.parse("a=b; HttpOnly=xyzzy", true)) }, + "non-strict": function() { + var c = Cookie.parse("a=b; HttpOnly=xyzzy"); + assert.ok(c); + assert.equal(c.httpOnly, true); + }, + }, + "garbage": { + topic: function() { + return Cookie.parse("\x08", true) || null; + }, + "doesn't parse": function(c) { assert.equal(c,null) }, + }, + "public suffix domain": { + topic: function() { + return Cookie.parse("a=b; domain=kyoto.jp", true) || null; + }, + "parses fine": function(c) { + assert.ok(c); + assert.equal(c.domain, 'kyoto.jp'); + }, + "but fails validation": function(c) { + assert.ok(c); + assert.ok(!c.validate()); + }, + }, + "Ironically, Google 'GAPS' cookie has very little whitespace": { + topic: function() { + return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly"); + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'GAPS') }, + "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') }, + "path": function(c) { + assert.notEqual(c.path, '/;Expires'); // BUG + assert.equal(c.path, '/'); + }, + "expires": function(c) { + assert.notEqual(c.expires, Infinity); + assert.equal(c.expires.getTime(), 1397700749000); + }, + "secure": function(c) { assert.ok(c.secure) }, + "httponly": function(c) { assert.ok(c.httpOnly) }, + }, + "lots of equal signs": { + topic: function() { + return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly"); + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'queryPref') }, + "value": function(c) { assert.equal(c.value, 'b=c&d=e') }, + "path": function(c) { + assert.equal(c.path, '/f=g'); + }, + "expires": function(c) { + assert.notEqual(c.expires, Infinity); + assert.equal(c.expires.getTime(), 1397700749000); + }, + "httponly": function(c) { assert.ok(c.httpOnly) }, + } + } +}) +.addBatch({ + "domain normalization": { + "simple": function() { + var c = new Cookie(); + c.domain = "EXAMPLE.com"; + assert.equal(c.canonicalizedDomain(), "example.com"); + }, + "extra dots": function() { + var c = new Cookie(); + c.domain = ".EXAMPLE.com"; + assert.equal(c.cdomain(), "example.com"); + }, + "weird trailing dot": function() { + var c = new Cookie(); + c.domain = "EXAMPLE.ca."; + assert.equal(c.canonicalizedDomain(), "example.ca."); + }, + "weird internal dots": function() { + var c = new Cookie(); + c.domain = "EXAMPLE...ca."; + assert.equal(c.canonicalizedDomain(), "example...ca."); + }, + "IDN": function() { + var c = new Cookie(); + c.domain = "δοκιμή.δοκιμή"; // "test.test" in greek + assert.equal(c.canonicalizedDomain(), "xn--jxalpdlp.xn--jxalpdlp"); + } + } +}) +.addBatch({ + "Domain Match":matchVows(tough.domainMatch, [ + // str, dom, expect + ["example.com", "example.com", true], + ["eXaMpLe.cOm", "ExAmPlE.CoM", true], + ["no.ca", "yes.ca", false], + ["wwwexample.com", "example.com", false], + ["www.example.com", "example.com", true], + ["example.com", "www.example.com", false], + ["www.subdom.example.com", "example.com", true], + ["www.subdom.example.com", "subdom.example.com", true], + ["example.com", "example.com.", false], // RFC6265 S4.1.2.3 + ["192.168.0.1", "168.0.1", false], // S5.1.3 "The string is a host name" + [null, "example.com", null], + ["example.com", null, null], + [null, null, null], + [undefined, undefined, null], + ]) +}) +.addBatch({ + "default-path": defaultPathVows([ + [null,"/"], + ["/","/"], + ["/file","/"], + ["/dir/file","/dir"], + ["noslash","/"], + ]) +}) +.addBatch({ + "Path-Match": matchVows(tough.pathMatch, [ + // request, cookie, match + ["/","/",true], + ["/dir","/",true], + ["/","/dir",false], + ["/dir/","/dir/", true], + ["/dir/file","/dir/",true], + ["/dir/file","/dir",true], + ["/directory","/dir",false], + ]) +}) +.addBatch({ + "Cookie Sorting": { + topic: function() { + var cookies = []; + var now = Date.now(); + cookies.push(Cookie.parse("a=0; Domain=example.com")); + cookies.push(Cookie.parse("b=1; Domain=www.example.com")); + cookies.push(Cookie.parse("c=2; Domain=example.com; Path=/pathA")); + cookies.push(Cookie.parse("d=3; Domain=www.example.com; Path=/pathA")); + cookies.push(Cookie.parse("e=4; Domain=example.com; Path=/pathA/pathB")); + cookies.push(Cookie.parse("f=5; Domain=www.example.com; Path=/pathA/pathB")); + + // force a stable creation time consistent with the order above since + // some may have been created at now + 1ms. + var i = cookies.length; + cookies.forEach(function(cookie) { + cookie.creation = new Date(now - 100*(i--)); + }); + + // weak shuffle: + cookies = cookies.sort(function(){return Math.random()-0.5}); + + cookies = cookies.sort(tough.cookieCompare); + return cookies; + }, + "got": function(cookies) { + assert.lengthOf(cookies, 6); + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['e','f','c','d','a','b']); + }, + } +}) +.addBatch({ + "CookieJar": { + "Setting a basic cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "works": function(c) { assert.instanceOf(c,Cookie) }, // C is for Cookie, good enough for me + "gets timestamped": function(c) { + assert.ok(c.creation); + assert.ok(Date.now() - c.creation.getTime() < 5000); // recently stamped + assert.ok(c.lastAccessed); + assert.equal(c.creation, c.lastAccessed); + assert.equal(c.TTL(), Infinity); + assert.ok(!c.isPersistent()); + }, + }, + "Setting a no-path cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "domain": function(c) { assert.equal(c.domain, 'example.com') }, + "path is /": function(c) { assert.equal(c.path, '/') }, + "path was derived": function(c) { assert.strictEqual(c.pathIsDefault, true) }, + }, + "Setting a cookie already marked as host-only": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + c.hostOnly = true; + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "domain": function(c) { assert.equal(c.domain, 'example.com') }, + "still hostOnly": function(c) { assert.strictEqual(c.hostOnly, true) }, + }, + "Setting a session cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b"); + assert.strictEqual(c.path, null); + cj.setCookie(c, 'http://www.example.com/dir/index.html', this.callback); + }, + "works": function(c) { assert.instanceOf(c,Cookie) }, + "gets the domain": function(c) { assert.equal(c.domain, 'www.example.com') }, + "gets the default path": function(c) { assert.equal(c.path, '/dir') }, + "is 'hostOnly'": function(c) { assert.ok(c.hostOnly) }, + }, + "Setting wrong domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=fooxample.com; Path=/"); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "fails": function(err,c) { + assert.ok(err.message.match(/domain/i)); + assert.ok(!c); + }, + }, + "Setting sub-domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=www.example.com; Path=/"); + cj.setCookie(c, 'http://example.com/index.html', this.callback); + }, + "fails": function(err,c) { + assert.ok(err.message.match(/domain/i)); + assert.ok(!c); + }, + }, + "Setting super-domain cookie": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/"); + cj.setCookie(c, 'http://www.app.example.com/index.html', this.callback); + }, + "success": function(err,c) { + assert.ok(!err); + assert.equal(c.domain, 'example.com'); + }, + }, + "Setting HttpOnly cookie over non-HTTP API": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/; HttpOnly"); + cj.setCookie(c, 'http://example.com/index.html', {http:false}, this.callback); + }, + "fails": function(err,c) { + assert.match(err.message, /HttpOnly/i); + assert.ok(!c); + }, + }, + }, + "Cookie Jar store eight cookies": { + topic: function() { + var cj = new CookieJar(); + var ex = 'http://example.com/index.html'; + var tasks = []; + tasks.push(function(next) { + cj.setCookie('a=1; Domain=example.com; Path=/',ex,at(0),next); + }); + tasks.push(function(next) { + cj.setCookie('b=2; Domain=example.com; Path=/; HttpOnly',ex,at(1000),next); + }); + tasks.push(function(next) { + cj.setCookie('c=3; Domain=example.com; Path=/; Secure',ex,at(2000),next); + }); + tasks.push(function(next) { // path + cj.setCookie('d=4; Domain=example.com; Path=/foo',ex,at(3000),next); + }); + tasks.push(function(next) { // host only + cj.setCookie('e=5',ex,at(4000),next); + }); + tasks.push(function(next) { // other domain + cj.setCookie('f=6; Domain=nodejs.org; Path=/','http://nodejs.org',at(5000),next); + }); + tasks.push(function(next) { // expired + cj.setCookie('g=7; Domain=example.com; Path=/; Expires=Tue, 18 Oct 2011 00:00:00 GMT',ex,at(6000),next); + }); + tasks.push(function(next) { // expired via Max-Age + cj.setCookie('h=8; Domain=example.com; Path=/; Max-Age=1',ex,next); + }); + var cb = this.callback; + async.parallel(tasks, function(err,results){ + setTimeout(function() { + cb(err,cj,results); + }, 2000); // so that 'h=8' expires + }); + }, + "setup ok": function(err,cj,results) { + assert.ok(1); + }, + "then retrieving for http://nodejs.org": { + topic: function(cj,results) { + cj.getCookies('http://nodejs.org',this.callback); + }, + "get a nodejs cookie": function(cookies) { + assert.lengthOf(cookies, 1); + var cookie = cookies[0]; + assert.equal(cookie.domain, 'nodejs.org'); + }, + }, + "then retrieving for https://example.com": { + topic: function(cj,results) { + cj.getCookies('https://example.com',{secure:true},this.callback); + }, + "get a secure example cookie with others": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','c','e']); + }, + }, + "then retrieving for https://example.com (missing options)": { + topic: function(cj,results) { + cj.getCookies('https://example.com',this.callback); + }, + "get a secure example cookie with others": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','c','e']); + }, + }, + "then retrieving for http://example.com": { + topic: function(cj,results) { + cj.getCookies('http://example.com',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','e']); + }, + }, + "then retrieving for http://EXAMPlE.com": { + topic: function(cj,results) { + cj.getCookies('http://EXAMPlE.com',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','b','e']); + }, + }, + "then retrieving for http://example.com, non-HTTP": { + topic: function(cj,results) { + cj.getCookies('http://example.com',{http:false},this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['a','e']); + }, + }, + "then retrieving for http://example.com/foo/bar": { + topic: function(cj,results) { + cj.getCookies('http://example.com/foo/bar',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['d','a','b','e']); + }, + }, + "then retrieving for http://example.com as a string": { + topic: function(cj,results) { + cj.getCookieString('http://example.com',this.callback); + }, + "get a single string": function(cookieHeader) { + assert.equal(cookieHeader, "a=1; b=2; e=5"); + }, + }, + "then retrieving for http://example.com as a set-cookie header": { + topic: function(cj,results) { + cj.getSetCookieStrings('http://example.com',this.callback); + }, + "get a single string": function(cookieHeaders) { + assert.lengthOf(cookieHeaders, 3); + assert.equal(cookieHeaders[0], "a=1; Domain=example.com; Path=/"); + assert.equal(cookieHeaders[1], "b=2; Domain=example.com; Path=/; HttpOnly"); + assert.equal(cookieHeaders[2], "e=5; Path=/"); + }, + }, + "then retrieving for http://www.example.com/": { + topic: function(cj,results) { + cj.getCookies('http://www.example.com/foo/bar',this.callback); + }, + "get a bunch of cookies": function(cookies) { + var names = cookies.map(function(c) {return c.key}); + assert.deepEqual(names, ['d','a','b']); // note lack of 'e' + }, + }, + }, + "Repeated names": { + topic: function() { + var cb = this.callback; + var cj = new CookieJar(); + var ex = 'http://www.example.com/'; + var sc = cj.setCookie; + var tasks = []; + var now = Date.now(); + tasks.push(sc.bind(cj,'aaaa=xxxx',ex,at(0))); + tasks.push(sc.bind(cj,'aaaa=1111; Domain=www.example.com',ex,at(1000))); + tasks.push(sc.bind(cj,'aaaa=2222; Domain=example.com',ex,at(2000))); + tasks.push(sc.bind(cj,'aaaa=3333; Domain=www.example.com; Path=/pathA',ex,at(3000))); + async.series(tasks,function(err,results) { + results = results.filter(function(e) {return e !== undefined}); + cb(err,{cj:cj, cookies:results, now:now}); + }); + }, + "all got set": function(err,t) { + assert.lengthOf(t.cookies,4); + }, + "then getting 'em back": { + topic: function(t) { + var cj = t.cj; + cj.getCookies('http://www.example.com/pathA',this.callback); + }, + "there's just three": function (err,cookies) { + var vals = cookies.map(function(c) {return c.value}); + // may break with sorting; sorting should put 3333 first due to longest path: + assert.deepEqual(vals, ['3333','1111','2222']); + } + }, + }, + "CookieJar setCookie errors": { + "public-suffix domain": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('i=9; Domain=kyoto.jp; Path=/','kyoto.jp',this.callback); + }, + "errors": function(err,cookie) { + assert.ok(err); + assert.ok(!cookie); + assert.match(err.message, /public suffix/i); + }, + }, + "wrong domain": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('j=10; Domain=google.com; Path=/','google.ca',this.callback); + }, + "errors": function(err,cookie) { + assert.ok(err); + assert.ok(!cookie); + assert.match(err.message, /not in this host's domain/i); + }, + }, + "old cookie is HttpOnly": { + topic: function() { + var cb = this.callback; + var next = function (err,c) { + return cb(err,cj); + }; + var cj = new CookieJar(); + cj.setCookie('k=11; Domain=example.ca; Path=/; HttpOnly','http://example.ca',{http:true},next); + }, + "initial cookie is set": function(err,cj) { + assert.ok(!err); + }, + "but when trying to overwrite": { + topic: function(cj) { + var cb = this.callback; + cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},function(err,c) {cb(null,err)}); + }, + "it's an error": function(err) { + assert.ok(err); + }, + "then, checking the original": { + topic: function(ignored,cj) { + assert.ok(cj instanceof CookieJar); + cj.getCookies('http://example.ca',{http:true},this.callback); + }, + "cookie has original value": function(err,cookies) { + assert.equal(err,null); + assert.lengthOf(cookies, 1); + assert.equal(cookies[0].value,11); + }, + }, + }, + }, + }, +}) +.addBatch({ + "JSON": { + "serialization": { + topic: function() { + var c = Cookie.parse('alpha=beta; Domain=example.com; Path=/foo; Expires=Tue, 19 Jan 2038 03:14:07 GMT; HttpOnly'); + return JSON.stringify(c); + }, + "gives a string": function(str) { + assert.equal(typeof str, "string"); + }, + "date is in ISO format": function(str) { + assert.match(str, /"expires":"2038-01-19T03:14:07\.000Z"/, 'expires is in ISO format'); + }, + }, + "deserialization": { + topic: function() { + var json = '{"key":"alpha","value":"beta","domain":"example.com","path":"/foo","expires":"2038-01-19T03:14:07.000Z","httpOnly":true,"lastAccessed":2000000000123}'; + return Cookie.fromJSON(json); + }, + "works": function(c) { + assert.ok(c); + }, + "key": function(c) { assert.equal(c.key, "alpha") }, + "value": function(c) { assert.equal(c.value, "beta") }, + "domain": function(c) { assert.equal(c.domain, "example.com") }, + "path": function(c) { assert.equal(c.path, "/foo") }, + "httpOnly": function(c) { assert.strictEqual(c.httpOnly, true) }, + "secure": function(c) { assert.strictEqual(c.secure, false) }, + "hostOnly": function(c) { assert.strictEqual(c.hostOnly, null) }, + "expires is a date object": function(c) { + assert.equal(c.expires.getTime(), 2147483647000); + }, + "lastAccessed is a date object": function(c) { + assert.equal(c.lastAccessed.getTime(), 2000000000123); + }, + "creation defaulted": function(c) { + assert.ok(c.creation.getTime()); + } + }, + "null deserialization": { + topic: function() { + return Cookie.fromJSON(null); + }, + "is null": function(cookie) { + assert.equal(cookie,null); + }, + }, + }, + "expiry deserialization": { + "Infinity": { + topic: Cookie.fromJSON.bind(null, '{"expires":"Infinity"}'), + "is infinite": function(c) { + assert.strictEqual(c.expires, "Infinity"); + assert.equal(c.expires, Infinity); + }, + }, + }, + "maxAge serialization": { + topic: function() { + return function(toSet) { + var c = new Cookie(); + c.key = 'foo'; c.value = 'bar'; + c.setMaxAge(toSet); + return JSON.stringify(c); + }; + }, + "zero": { + topic: function(f) { return f(0) }, + "looks good": function(str) { + assert.match(str, /"maxAge":0/); + }, + }, + "Infinity": { + topic: function(f) { return f(Infinity) }, + "looks good": function(str) { + assert.match(str, /"maxAge":"Infinity"/); + }, + }, + "-Infinity": { + topic: function(f) { return f(-Infinity) }, + "looks good": function(str) { + assert.match(str, /"maxAge":"-Infinity"/); + }, + }, + "null": { + topic: function(f) { return f(null) }, + "looks good": function(str) { + assert.match(str, /"maxAge":null/); + }, + }, + }, + "maxAge deserialization": { + "number": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":123}'), + "is the number": function(c) { + assert.strictEqual(c.maxAge, 123); + }, + }, + "null": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":null}'), + "is null": function(c) { + assert.strictEqual(c.maxAge, null); + }, + }, + "less than zero": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":-123}'), + "is -123": function(c) { + assert.strictEqual(c.maxAge, -123); + }, + }, + "Infinity": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"Infinity"}'), + "is inf-as-string": function(c) { + assert.strictEqual(c.maxAge, "Infinity"); + }, + }, + "-Infinity": { + topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"-Infinity"}'), + "is inf-as-string": function(c) { + assert.strictEqual(c.maxAge, "-Infinity"); + }, + }, + } +}) +.addBatch({ + "permuteDomain": { + "base case": { + topic: tough.permuteDomain.bind(null,'example.com'), + "got the domain": function(list) { + assert.deepEqual(list, ['example.com']); + }, + }, + "two levels": { + topic: tough.permuteDomain.bind(null,'foo.bar.example.com'), + "got three things": function(list) { + assert.deepEqual(list, ['example.com','bar.example.com','foo.bar.example.com']); + }, + }, + "invalid domain": { + topic: tough.permuteDomain.bind(null,'foo.bar.example.localduhmain'), + "got three things": function(list) { + assert.equal(list, null); + }, + }, + }, + "permutePath": { + "base case": { + topic: tough.permutePath.bind(null,'/'), + "just slash": function(list) { + assert.deepEqual(list,['/']); + }, + }, + "single case": { + topic: tough.permutePath.bind(null,'/foo'), + "two things": function(list) { + assert.deepEqual(list,['/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo',e)); + }); + }, + }, + "double case": { + topic: tough.permutePath.bind(null,'/foo/bar'), + "four things": function(list) { + assert.deepEqual(list,['/foo/bar','/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo/bar',e)); + }); + }, + }, + "trailing slash": { + topic: tough.permutePath.bind(null,'/foo/bar/'), + "three things": function(list) { + assert.deepEqual(list,['/foo/bar','/foo','/']); + }, + "path matching": function(list) { + list.forEach(function(e) { + assert.ok(tough.pathMatch('/foo/bar/',e)); + }); + }, + }, + } +}) +.addBatch({ + "Issue 1": { + topic: function() { + var cj = new CookieJar(); + cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function(err,cookie) { + this.callback(err,{cj:cj, cookie:cookie}); + }.bind(this)); + }, + "stored a cookie": function(t) { + assert.ok(t.cookie); + }, + "cookie's path was modified to remove unnecessary slash": function(t) { + assert.equal(t.cookie.path, '/some/path'); + }, + "getting it back": { + topic: function(t) { + t.cj.getCookies('http://domain/some/path/file', function(err,cookies) { + this.callback(err, {cj:t.cj, cookies:cookies||[]}); + }.bind(this)); + }, + "got one cookie": function(t) { + assert.lengthOf(t.cookies, 1); + }, + "it's the right one": function(t) { + var c = t.cookies[0]; + assert.equal(c.key, 'hello'); + assert.equal(c.value, 'world'); + }, + } + } +}) +.addBatch({ + "expiry option": { + topic: function() { + var cb = this.callback; + var cj = new CookieJar(); + cj.setCookie('near=expiry; Domain=example.com; Path=/; Max-Age=1','http://www.example.com',at(-1), function(err,cookie) { + + cb(err, {cj:cj, cookie:cookie}); + }); + }, + "set the cookie": function(t) { + assert.ok(t.cookie, "didn't set?!"); + assert.equal(t.cookie.key, 'near'); + }, + "then, retrieving": { + topic: function(t) { + var cb = this.callback; + setTimeout(function() { + t.cj.getCookies('http://www.example.com', {http:true, expire:false}, function(err,cookies) { + t.cookies = cookies; + cb(err,t); + }); + },2000); + }, + "got the cookie": function(t) { + assert.lengthOf(t.cookies, 1); + assert.equal(t.cookies[0].key, 'near'); + }, + } + } +}) +.addBatch({ + "trailing semi-colon set into cj": { + topic: function () { + var cb = this.callback; + var cj = new CookieJar(); + var ex = 'http://www.example.com'; + var tasks = []; + tasks.push(function(next) { + cj.setCookie('broken_path=testme; path=/;',ex,at(-1),next); + }); + tasks.push(function(next) { + cj.setCookie('b=2; Path=/;;;;',ex,at(-1),next); + }); + async.parallel(tasks, function (err, cookies) { + cb(null, { + cj: cj, + cookies: cookies + }); + }); + }, + "check number of cookies": function (t) { + assert.lengthOf(t.cookies, 2, "didn't set"); + }, + "check *broken_path* was set properly": function (t) { + assert.equal(t.cookies[0].key, "broken_path"); + assert.equal(t.cookies[0].value, "testme"); + assert.equal(t.cookies[0].path, "/"); + }, + "check *b* was set properly": function (t) { + assert.equal(t.cookies[1].key, "b"); + assert.equal(t.cookies[1].value, "2"); + assert.equal(t.cookies[1].path, "/"); + }, + "retrieve the cookie": { + topic: function (t) { + var cb = this.callback; + t.cj.getCookies('http://www.example.com', {}, function (err, cookies) { + t.cookies = cookies; + cb(err, t); + }); + }, + "get the cookie": function(t) { + assert.lengthOf(t.cookies, 2); + assert.equal(t.cookies[0].key, 'broken_path'); + assert.equal(t.cookies[0].value, 'testme'); + assert.equal(t.cookies[1].key, "b"); + assert.equal(t.cookies[1].value, "2"); + assert.equal(t.cookies[1].path, "/"); + }, + }, + } +}) +.addBatch({ + "Constructor":{ + topic: function () { + return new Cookie({ + key: 'test', + value: 'b', + maxAge: 60 + }); + }, + 'check for key property': function (c) { + assert.ok(c); + assert.equal(c.key, 'test'); + }, + 'check for value property': function (c) { + assert.equal(c.value, 'b'); + }, + 'check for maxAge': function (c) { + assert.equal(c.maxAge, 60); + }, + 'check for default values for unspecified properties': function (c) { + assert.equal(c.expires, "Infinity"); + assert.equal(c.secure, false); + assert.equal(c.httpOnly, false); + } + } +}) +.addBatch({ + "allPaths option": { + topic: function() { + var cj = new CookieJar(); + var tasks = []; + tasks.push(cj.setCookie.bind(cj, 'nopath_dom=qq; Path=/; Domain=example.com', 'http://example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'path_dom=qq; Path=/foo; Domain=example.com', 'http://example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'nopath_host=qq; Path=/', 'http://www.example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'path_host=qq; Path=/foo', 'http://www.example.com', {})); + tasks.push(cj.setCookie.bind(cj, 'other=qq; Path=/', 'http://other.example.com/', {})); + tasks.push(cj.setCookie.bind(cj, 'other2=qq; Path=/foo', 'http://other.example.com/foo', {})); + var cb = this.callback; + async.parallel(tasks, function(err,results) { + cb(err, {cj:cj, cookies: results}); + }); + }, + "all set": function(t) { + assert.equal(t.cookies.length, 6); + assert.ok(t.cookies.every(function(c) { return !!c })); + }, + "getting without allPaths": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/', {}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found just two cookies": function(t) { + assert.equal(t.cookies.length, 2); + }, + "all are path=/": function(t) { + assert.ok(t.cookies.every(function(c) { return c.path === '/' })); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + "getting without allPaths for /foo": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/foo', {}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found four cookies": function(t) { + assert.equal(t.cookies.length, 4); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + "getting with allPaths:true": { + topic: function(t) { + var cb = this.callback; + var cj = t.cj; + cj.getCookies('http://www.example.com/', {allPaths:true}, function(err,cookies) { + cb(err, {cj:cj, cookies:cookies}); + }); + }, + "found four cookies": function(t) { + assert.equal(t.cookies.length, 4); + }, + "no 'other' cookies": function(t) { + assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); + }, + }, + } +}) +.export(module); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE new file mode 100644 index 00000000..a4a9aee0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md new file mode 100644 index 00000000..bb533d56 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md @@ -0,0 +1,4 @@ +tunnel-agent +============ + +HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js new file mode 100644 index 00000000..3f7bbb90 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js @@ -0,0 +1,227 @@ +'use strict' + +var net = require('net') + , tls = require('tls') + , http = require('http') + , https = require('https') + , events = require('events') + , assert = require('assert') + , util = require('util') + ; + +exports.httpOverHttp = httpOverHttp +exports.httpsOverHttp = httpsOverHttp +exports.httpOverHttps = httpOverHttps +exports.httpsOverHttps = httpsOverHttps + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + return agent +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options) + agent.request = http.request + agent.createSocket = createSecureSocket + return agent +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + return agent +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options) + agent.request = https.request + agent.createSocket = createSecureSocket + return agent +} + + +function TunnelingAgent(options) { + var self = this + self.options = options || {} + self.proxyOptions = self.options.proxy || {} + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets + self.requests = [] + self.sockets = [] + + self.on('free', function onFree(socket, host, port) { + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i] + if (pending.host === host && pending.port === port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1) + pending.request.onSocket(socket) + return + } + } + socket.destroy() + self.removeSocket(socket) + }) +} +util.inherits(TunnelingAgent, events.EventEmitter) + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) { + var self = this + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push({host: host, port: port, request: req}) + return + } + + // If we are under maxSockets create a new one. + self.createSocket({host: host, port: port, request: req}, function(socket) { + socket.on('free', onFree) + socket.on('close', onCloseOrRemove) + socket.on('agentRemove', onCloseOrRemove) + req.onSocket(socket) + + function onFree() { + self.emit('free', socket, host, port) + } + + function onCloseOrRemove(err) { + self.removeSocket() + socket.removeListener('free', onFree) + socket.removeListener('close', onCloseOrRemove) + socket.removeListener('agentRemove', onCloseOrRemove) + } + }) +} + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this + var placeholder = {} + self.sockets.push(placeholder) + + var connectOptions = mergeOptions({}, self.proxyOptions, + { method: 'CONNECT' + , path: options.host + ':' + options.port + , agent: false + } + ) + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {} + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64') + } + + debug('making CONNECT request') + var connectReq = self.request(connectOptions) + connectReq.useChunkedEncodingByDefault = false // for v0.6 + connectReq.once('response', onResponse) // for v0.6 + connectReq.once('upgrade', onUpgrade) // for v0.6 + connectReq.once('connect', onConnect) // for v0.7 or later + connectReq.once('error', onError) + connectReq.end() + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head) + }) + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners() + socket.removeAllListeners() + + if (res.statusCode === 200) { + assert.equal(head.length, 0) + debug('tunneling connection has established') + self.sockets[self.sockets.indexOf(placeholder)] = socket + cb(socket) + } else { + debug('tunneling socket could not be established, statusCode=%d', res.statusCode) + var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } + } + + function onError(cause) { + connectReq.removeAllListeners() + + debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) + var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) + error.code = 'ECONNRESET' + options.request.emit('error', error) + self.removeSocket(placeholder) + } +} + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) return + + this.sockets.splice(pos, 1) + + var pending = this.requests.shift() + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket) + }) + } +} + +function createSecureSocket(options, cb) { + var self = this + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, mergeOptions({}, self.options, + { servername: options.host + , socket: socket + } + )) + cb(secureSocket) + }) +} + + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i] + if (typeof overrides === 'object') { + var keys = Object.keys(overrides) + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j] + if (overrides[k] !== undefined) { + target[k] = overrides[k] + } + } + } + } + return target +} + + +var debug +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments) + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0] + } else { + args.unshift('TUNNEL:') + } + console.error.apply(console, args) + } +} else { + debug = function() {} +} +exports.debug = debug // for test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json new file mode 100644 index 00000000..acfa6e1c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json @@ -0,0 +1,32 @@ +{ + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "name": "tunnel-agent", + "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", + "version": "0.3.0", + "repository": { + "url": "https://github.com/mikeal/tunnel-agent" + }, + "main": "index.js", + "dependencies": {}, + "devDependencies": {}, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/mikeal/tunnel-agent/issues" + }, + "homepage": "https://github.com/mikeal/tunnel-agent", + "_id": "tunnel-agent@0.3.0", + "dist": { + "shasum": "ad681b68f5321ad2827c4cfb1b7d5df2cfe942ee" + }, + "_from": "tunnel-agent@~0.3.0", + "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json new file mode 100755 index 00000000..57c99c02 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json @@ -0,0 +1,61 @@ +{ + "name": "request", + "description": "Simplified HTTP request client.", + "tags": [ + "http", + "simple", + "util", + "utility" + ], + "version": "2.31.0", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com" + }, + "repository": { + "type": "git", + "url": "http://github.com/mikeal/request.git" + }, + "bugs": { + "url": "http://github.com/mikeal/request/issues" + }, + "engines": [ + "node >= 0.8.0" + ], + "main": "index.js", + "dependencies": { + "qs": "~0.6.0", + "json-stringify-safe": "~5.0.0", + "forever-agent": "~0.5.0", + "node-uuid": "~1.4.0", + "mime": "~1.2.9", + "tough-cookie": "~0.9.15", + "form-data": "~0.1.0", + "tunnel-agent": "~0.3.0", + "http-signature": "~0.10.0", + "oauth-sign": "~0.3.0", + "hawk": "~1.0.0", + "aws-sign2": "~0.5.0" + }, + "optionalDependencies": { + "tough-cookie": "~0.9.15", + "form-data": "~0.1.0", + "tunnel-agent": "~0.3.0", + "http-signature": "~0.10.0", + "oauth-sign": "~0.3.0", + "hawk": "~1.0.0", + "aws-sign2": "~0.5.0" + }, + "scripts": { + "test": "node tests/run.js" + }, + "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```javascript\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\nNote that `setCookie` requires at least three parameters, and the last is required to be a callback.\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.setCookie(cookie, uri, function (err, cookie){})\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/mikeal/request", + "_id": "request@2.31.0", + "dist": { + "shasum": "4c8ac967c9a4b9410cb4ba1a61fdb644267eeeff" + }, + "_from": "request@~2.31.0", + "_resolved": "https://registry.npmjs.org/request/-/request-2.31.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js new file mode 100644 index 00000000..3c03c47d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js @@ -0,0 +1,1260 @@ +var optional = require('./lib/optional') + , http = require('http') + , https = optional('https') + , tls = optional('tls') + , url = require('url') + , util = require('util') + , stream = require('stream') + , qs = require('qs') + , querystring = require('querystring') + , crypto = require('crypto') + + , oauth = optional('oauth-sign') + , hawk = optional('hawk') + , aws = optional('aws-sign') + , httpSignature = optional('http-signature') + , uuid = require('node-uuid') + , mime = require('mime') + , tunnel = optional('tunnel-agent') + , _safeStringify = require('json-stringify-safe') + + , ForeverAgent = require('forever-agent') + , FormData = optional('form-data') + + , Cookie = optional('tough-cookie') + , CookieJar = Cookie && Cookie.CookieJar + , cookieJar = CookieJar && new CookieJar + + , copy = require('./lib/copy') + , debug = require('./lib/debug') + , getSafe = require('./lib/getSafe') + ; + +function safeStringify (obj) { + var ret + try { ret = JSON.stringify(obj) } + catch (e) { ret = _safeStringify(obj) } + return ret +} + +var globalPool = {} +var isUrl = /^https?:/i + + +// Hacky fix for pre-0.4.4 https +if (https && !https.Agent) { + https.Agent = function (options) { + http.Agent.call(this, options) + } + util.inherits(https.Agent, http.Agent) + https.Agent.prototype._getConnection = function (host, port, cb) { + var s = tls.connect(port, host, this.options, function () { + // do other checks here? + if (cb) cb() + }) + return s + } +} + +function isReadStream (rs) { + if (rs.readable && rs.path && rs.mode) { + return true + } +} + +function toBase64 (str) { + return (new Buffer(str || "", "ascii")).toString("base64") +} + +function md5 (str) { + return crypto.createHash('md5').update(str).digest('hex') +} + +function Request (options) { + stream.Stream.call(this) + this.readable = true + this.writable = true + + if (typeof options === 'string') { + options = {uri:options} + } + + var reserved = Object.keys(Request.prototype) + for (var i in options) { + if (reserved.indexOf(i) === -1) { + this[i] = options[i] + } else { + if (typeof options[i] === 'function') { + delete options[i] + } + } + } + + if (options.method) { + this.explicitMethod = true + } + + this.canTunnel = options.tunnel !== false && tunnel; + + this.init(options) +} +util.inherits(Request, stream.Stream) +Request.prototype.init = function (options) { + // init() contains all the code to setup the request object. + // the actual outgoing request is not started until start() is called + // this function is called from both the constructor and on redirect. + var self = this + if (!options) options = {} + + if (!self.method) self.method = options.method || 'GET' + self.localAddress = options.localAddress + + debug(options) + if (!self.pool && self.pool !== false) self.pool = globalPool + self.dests = self.dests || [] + self.__isRequestRequest = true + + // Protect against double callback + if (!self._callback && self.callback) { + self._callback = self.callback + self.callback = function () { + if (self._callbackCalled) return // Print a warning maybe? + self._callbackCalled = true + self._callback.apply(self, arguments) + } + self.on('error', self.callback.bind()) + self.on('complete', self.callback.bind(self, null)) + } + + if (self.url && !self.uri) { + // People use this property instead all the time so why not just support it. + self.uri = self.url + delete self.url + } + + if (!self.uri) { + // this will throw if unhandled but is handleable when in a redirect + return self.emit('error', new Error("options.uri is a required argument")) + } else { + if (typeof self.uri == "string") self.uri = url.parse(self.uri) + } + + if (self.strictSSL === false) { + self.rejectUnauthorized = false + } + + if (self.proxy) { + if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy) + + // do the HTTP CONNECT dance using koichik/node-tunnel + if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) { + var tunnelFn = self.proxy.protocol === "http:" + ? tunnel.httpsOverHttp : tunnel.httpsOverHttps + + var tunnelOptions = { proxy: { host: self.proxy.hostname + , port: +self.proxy.port + , proxyAuth: self.proxy.auth + , headers: { Host: self.uri.hostname + ':' + + (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }} + , rejectUnauthorized: self.rejectUnauthorized + , ca: this.ca } + + self.agent = tunnelFn(tunnelOptions) + self.tunnel = true + } + } + + if (!self.uri.pathname) {self.uri.pathname = '/'} + + if (!self.uri.host) { + // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar + // Detect and reject it as soon as possible + var faultyUri = url.format(self.uri) + var message = 'Invalid URI "' + faultyUri + '"' + if (Object.keys(options).length === 0) { + // No option ? This can be the sign of a redirect + // As this is a case where the user cannot do anything (they didn't call request directly with this URL) + // they should be warned that it can be caused by a redirection (can save some hair) + message += '. This can be caused by a crappy redirection.' + } + self.emit('error', new Error(message)) + return // This error was fatal + } + + self._redirectsFollowed = self._redirectsFollowed || 0 + self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10 + self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true + self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false + if (self.followRedirect || self.followAllRedirects) + self.redirects = self.redirects || [] + + self.headers = self.headers ? copy(self.headers) : {} + + self.setHost = false + if (!self.hasHeader('host')) { + self.setHeader('host', self.uri.hostname) + if (self.uri.port) { + if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && + !(self.uri.port === 443 && self.uri.protocol === 'https:') ) + self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) ) + } + self.setHost = true + } + + self.jar(self._jar || options.jar) + + if (!self.uri.port) { + if (self.uri.protocol == 'http:') {self.uri.port = 80} + else if (self.uri.protocol == 'https:') {self.uri.port = 443} + } + + if (self.proxy && !self.tunnel) { + self.port = self.proxy.port + self.host = self.proxy.hostname + } else { + self.port = self.uri.port + self.host = self.uri.hostname + } + + self.clientErrorHandler = function (error) { + if (self._aborted) return + if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' + && self.agent.addRequestNoreuse) { + self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } + self.start() + self.req.end() + return + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + self.emit('error', error) + } + + self._parserErrorHandler = function (error) { + if (this.res) { + if (this.res.request) { + this.res.request.emit('error', error) + } else { + this.res.emit('error', error) + } + } else { + this._httpMessage.emit('error', error) + } + } + + if (options.form) { + self.form(options.form) + } + + if (options.qs) self.qs(options.qs) + + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || "") + } + + if (self.path.length === 0) self.path = '/' + + + // Auth must happen last in case signing is dependent on other headers + if (options.oauth) { + self.oauth(options.oauth) + } + + if (options.aws) { + self.aws(options.aws) + } + + if (options.hawk) { + self.hawk(options.hawk) + } + + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } + + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password + + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately + ) + } + + if (self.uri.auth && !self.hasHeader('authorization')) { + var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) + self.auth(authPieces[0], authPieces.slice(1).join(':'), true) + } + if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { + self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) + } + + + if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + + if (options.json) { + self.json(options.json) + } else if (options.multipart) { + self.boundary = uuid() + self.multipart(options.multipart) + } + + if (self.body) { + var length = 0 + if (!Buffer.isBuffer(self.body)) { + if (Array.isArray(self.body)) { + for (var i = 0; i < self.body.length; i++) { + length += self.body[i].length + } + } else { + self.body = new Buffer(self.body) + length = self.body.length + } + } else { + length = self.body.length + } + if (length) { + if (!self.hasHeader('content-length')) self.setHeader('content-length', length) + } else { + throw new Error('Argument error, options.body.') + } + } + + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + , defaultModules = {'http:':http, 'https:':https} + , httpModules = self.httpModules || {} + ; + self.httpModule = httpModules[protocol] || defaultModules[protocol] + + if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) + + if (options.ca) self.ca = options.ca + + if (!self.agent) { + if (options.agentOptions) self.agentOptions = options.agentOptions + + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + } + } + + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getAgent() + if (self.maxSockets) { + // Don't use our pooling if node has the refactored client + self.agent.maxSockets = self.maxSockets + } + if (self.pool.maxSockets) { + // Don't use our pooling if node has the refactored client + self.agent.maxSockets = self.pool.maxSockets + } + } + + self.on('pipe', function (src) { + if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) + } + } + } + if (self._json && !self.hasHeader('content-type')) + self.setHeader('content-type', 'application/json') + if (src.method && !self.explicitMethod) { + self.method = src.method + } + } + + // self.on('pipe', function () { + // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") + // }) + }) + + process.nextTick(function () { + if (self._aborted) return + + if (self._form) { + self.setHeaders(self._form.getHeaders()) + self._form.pipe(self) + } + if (self.body) { + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } else if (self.requestBodyStream) { + console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() + } + self.ntick = true + }) +} + +// Must call this when following a redirect from https to http or vice versa +// Attempts to keep everything as identical as possible, but update the +// httpModule, Tunneling agent, and/or Forever Agent in use. +Request.prototype._updateProtocol = function () { + var self = this + var protocol = self.uri.protocol + + if (protocol === 'https:') { + // previously was doing http, now doing https + // if it's https, then we might need to tunnel now. + if (self.proxy && self.canTunnel) { + self.tunnel = true + var tunnelFn = self.proxy.protocol === 'http:' + ? tunnel.httpsOverHttp : tunnel.httpsOverHttps + var tunnelOptions = { proxy: { host: self.proxy.hostname + , port: +self.proxy.port + , proxyAuth: self.proxy.auth } + , rejectUnauthorized: self.rejectUnauthorized + , ca: self.ca } + self.agent = tunnelFn(tunnelOptions) + return + } + + self.httpModule = https + switch (self.agentClass) { + case ForeverAgent: + self.agentClass = ForeverAgent.SSL + break + case http.Agent: + self.agentClass = https.Agent + break + default: + // nothing we can do. Just hope for the best. + return + } + + // if there's an agent, we need to get a new one. + if (self.agent) self.agent = self.getAgent() + + } else { + // previously was doing https, now doing http + // stop any tunneling. + if (self.tunnel) self.tunnel = false + self.httpModule = http + switch (self.agentClass) { + case ForeverAgent.SSL: + self.agentClass = ForeverAgent + break + case https.Agent: + self.agentClass = http.Agent + break + default: + // nothing we can do. just hope for the best + return + } + + // if there's an agent, then get a new one. + if (self.agent) { + self.agent = null + self.agent = self.getAgent() + } + } +} + +Request.prototype.getAgent = function () { + var Agent = this.agentClass + var options = {} + if (this.agentOptions) { + for (var i in this.agentOptions) { + options[i] = this.agentOptions[i] + } + } + if (this.ca) options.ca = this.ca + if (this.ciphers) options.ciphers = this.ciphers + if (this.secureProtocol) options.secureProtocol = this.secureProtocol + if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized + + if (this.cert && this.key) { + options.key = this.key + options.cert = this.cert + } + + var poolKey = '' + + // different types of agents are in different pools + if (Agent !== this.httpModule.Agent) { + poolKey += Agent.name + } + + if (!this.httpModule.globalAgent) { + // node 0.4.x + options.host = this.host + options.port = this.port + if (poolKey) poolKey += ':' + poolKey += this.host + ':' + this.port + } + + // ca option is only relevant if proxy or destination are https + var proxy = this.proxy + if (typeof proxy === 'string') proxy = url.parse(proxy) + var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + if (isHttps) { + if (options.ca) { + if (poolKey) poolKey += ':' + poolKey += options.ca + } + + if (typeof options.rejectUnauthorized !== 'undefined') { + if (poolKey) poolKey += ':' + poolKey += options.rejectUnauthorized + } + + if (options.cert) + poolKey += options.cert.toString('ascii') + options.key.toString('ascii') + + if (options.ciphers) { + if (poolKey) poolKey += ':' + poolKey += options.ciphers + } + + if (options.secureProtocol) { + if (poolKey) poolKey += ':' + poolKey += options.secureProtocol + } + } + + if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) { + // not doing anything special. Use the globalAgent + return this.httpModule.globalAgent + } + + // we're using a stored agent. Make sure it's protocol-specific + poolKey = this.uri.protocol + poolKey + + // already generated an agent for this setting + if (this.pool[poolKey]) return this.pool[poolKey] + + return this.pool[poolKey] = new Agent(options) +} + +Request.prototype.start = function () { + // start() is called once we are ready to send the outgoing HTTP request. + // this is usually called on the first write(), end() or on nextTick() + var self = this + + if (self._aborted) return + + self._started = true + self.method = self.method || 'GET' + self.href = self.uri.href + + if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { + self.setHeader('content-length', self.src.stat.size) + } + if (self._aws) { + self.aws(self._aws, true) + } + + // We have a method named auth, which is completely different from the http.request + // auth option. If we don't remove it, we're gonna have a bad time. + var reqOptions = copy(self) + delete reqOptions.auth + + debug('make request', self.uri.href) + self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self)) + + if (self.timeout && !self.timeoutTimer) { + self.timeoutTimer = setTimeout(function () { + self.req.abort() + var e = new Error("ETIMEDOUT") + e.code = "ETIMEDOUT" + self.emit("error", e) + }, self.timeout) + + // Set additional timeout on socket - in case if remote + // server freeze after sending headers + if (self.req.setTimeout) { // only works on node 0.6+ + self.req.setTimeout(self.timeout, function () { + if (self.req) { + self.req.abort() + var e = new Error("ESOCKETTIMEDOUT") + e.code = "ESOCKETTIMEDOUT" + self.emit("error", e) + } + }) + } + } + + self.req.on('error', self.clientErrorHandler) + self.req.on('drain', function() { + self.emit('drain') + }) + self.on('end', function() { + if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler) + }) + self.emit('request', self.req) +} +Request.prototype.onResponse = function (response) { + var self = this + debug('onResponse', self.uri.href, response.statusCode, response.headers) + response.on('end', function() { + debug('response end', self.uri.href, response.statusCode, response.headers) + }); + + if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { + response.connection.once('error', self._parserErrorHandler) + } + if (self._aborted) { + debug('aborted', self.uri.href) + response.resume() + return + } + if (self._paused) response.pause() + else response.resume() + + self.response = response + response.request = self + response.toJSON = toJSON + + // XXX This is different on 0.10, because SSL is strict by default + if (self.httpModule === https && + self.strictSSL && + !response.client.authorized) { + debug('strict ssl error', self.uri.href) + var sslErr = response.client.authorizationError + self.emit('error', new Error('SSL Error: '+ sslErr)) + return + } + + if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')] + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + + var addCookie = function (cookie) { + if (self._jar){ + var targetCookieJar = self._jar.setCookie?self._jar:cookieJar; + + //set the cookie if it's domain in the href's domain. + targetCookieJar.setCookie(cookie, self.uri.href, function(err){ + if (err){ + console.warn('set cookie failed,'+ err) + } + }) + } + + } + + if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) { + var headerName = hasHeader('set-cookie', response.headers) + if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie) + else addCookie(response.headers[headerName]) + } + + var redirectTo = null + if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) { + var location = response.headers[hasHeader('location', response.headers)] + debug('redirect', location) + + if (self.followAllRedirects) { + redirectTo = location + } else if (self.followRedirect) { + switch (self.method) { + case 'PATCH': + case 'PUT': + case 'POST': + case 'DELETE': + // Do not follow redirects + break + default: + redirectTo = location + break + } + } + } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) { + var authHeader = response.headers[hasHeader('www-authenticate', response.headers)] + var authVerb = authHeader && authHeader.split(' ')[0] + debug('reauth', authVerb) + + switch (authVerb) { + case 'Basic': + self.auth(self._user, self._pass, true) + redirectTo = self.uri + break + + case 'Digest': + // TODO: More complete implementation of RFC 2617. + // - check challenge.algorithm + // - support algorithm="MD5-sess" + // - handle challenge.domain + // - support qop="auth-int" only + // - handle Authentication-Info (not necessarily?) + // - check challenge.stale (not necessarily?) + // - increase nc (not necessarily?) + // For reference: + // http://tools.ietf.org/html/rfc2617#section-3 + // https://github.com/bagder/curl/blob/master/lib/http_digest.c + + var challenge = {} + var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi + for (;;) { + var match = re.exec(authHeader) + if (!match) break + challenge[match[1]] = match[2] || match[3]; + } + + var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass) + var ha2 = md5(self.method + ':' + self.uri.path) + var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' + var nc = qop && '00000001' + var cnonce = qop && uuid().replace(/-/g, '') + var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2) + var authValues = { + username: self._user, + realm: challenge.realm, + nonce: challenge.nonce, + uri: self.uri.path, + qop: qop, + response: digestResponse, + nc: nc, + cnonce: cnonce, + algorithm: challenge.algorithm, + opaque: challenge.opaque + } + + authHeader = [] + for (var k in authValues) { + if (!authValues[k]) { + //ignore + } else if (k === 'qop' || k === 'nc' || k === 'algorithm') { + authHeader.push(k + '=' + authValues[k]) + } else { + authHeader.push(k + '="' + authValues[k] + '"') + } + } + authHeader = 'Digest ' + authHeader.join(', ') + self.setHeader('authorization', authHeader) + self._sentAuth = true + + redirectTo = self.uri + break + } + } + + if (redirectTo) { + debug('redirect to', redirectTo) + + // ignore any potential response body. it cannot possibly be useful + // to us at this point. + if (self._paused) response.resume() + + if (self._redirectsFollowed >= self.maxRedirects) { + self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href)) + return + } + self._redirectsFollowed += 1 + + if (!isUrl.test(redirectTo)) { + redirectTo = url.resolve(self.uri.href, redirectTo) + } + + var uriPrev = self.uri + self.uri = url.parse(redirectTo) + + // handle the case where we change protocol from https to http or vice versa + if (self.uri.protocol !== uriPrev.protocol) { + self._updateProtocol() + } + + self.redirects.push( + { statusCode : response.statusCode + , redirectUri: redirectTo + } + ) + if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET' + // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215 + delete self.src + delete self.req + delete self.agent + delete self._started + if (response.statusCode != 401) { + // Remove parameters from the previous response, unless this is the second request + // for a server that requires digest authentication. + delete self.body + delete self._form + if (self.headers) { + if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')] + if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')] + if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')] + } + } + + self.emit('redirect'); + + self.init() + return // Ignore the rest of the response + } else { + self._redirectsFollowed = self._redirectsFollowed || 0 + // Be a good stream and emit end when the response is finished. + // Hack to emit end on close because of a core bug that never fires end + response.on('close', function () { + if (!self._ended) self.response.emit('end') + }) + + if (self.encoding) { + if (self.dests.length !== 0) { + console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") + } else { + response.setEncoding(self.encoding) + } + } + + self.emit('response', response) + + self.dests.forEach(function (dest) { + self.pipeDest(dest) + }) + + response.on("data", function (chunk) { + self._destdata = true + self.emit("data", chunk) + }) + response.on("end", function (chunk) { + self._ended = true + self.emit("end", chunk) + }) + response.on("close", function () {self.emit("close")}) + + if (self.callback) { + var buffer = [] + var bodyLen = 0 + self.on("data", function (chunk) { + buffer.push(chunk) + bodyLen += chunk.length + }) + self.on("end", function () { + debug('end event', self.uri.href) + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + + if (buffer.length && Buffer.isBuffer(buffer[0])) { + debug('has body', self.uri.href, bodyLen) + var body = new Buffer(bodyLen) + var i = 0 + buffer.forEach(function (chunk) { + chunk.copy(body, i, 0, chunk.length) + i += chunk.length + }) + if (self.encoding === null) { + response.body = body + } else { + response.body = body.toString(self.encoding) + } + } else if (buffer.length) { + // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. + // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). + if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") { + buffer[0] = buffer[0].substring(1) + } + response.body = buffer.join('') + } + + if (self._json) { + try { + response.body = JSON.parse(response.body) + } catch (e) {} + } + debug('emitting complete', self.uri.href) + if(response.body == undefined && !self._json) { + response.body = ""; + } + self.emit('complete', response, response.body) + }) + } + //if no callback + else{ + self.on("end", function () { + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + self.emit('complete', response); + }); + } + } + debug('finish init function', self.uri.href) +} + +Request.prototype.abort = function () { + this._aborted = true + + if (this.req) { + this.req.abort() + } + else if (this.response) { + this.response.abort() + } + + this.emit("abort") +} + +Request.prototype.pipeDest = function (dest) { + var response = this.response + // Called after the response is received + if (dest.headers && !dest.headersSent) { + if (hasHeader('content-type', response.headers)) { + var ctname = hasHeader('content-type', response.headers) + if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname]) + else dest.headers[ctname] = response.headers[ctname] + } + + if (hasHeader('content-length', response.headers)) { + var clname = hasHeader('content-length', response.headers) + if (dest.setHeader) dest.setHeader(clname, response.headers[clname]) + else dest.headers[clname] = response.headers[clname] + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i in response.headers) { + dest.setHeader(i, response.headers[i]) + } + dest.statusCode = response.statusCode + } + if (this.pipefilter) this.pipefilter(response, dest) +} + +// Composable API +Request.prototype.setHeader = function (name, value, clobber) { + if (clobber === undefined) clobber = true + if (clobber || !this.hasHeader(name)) this.headers[name] = value + else this.headers[this.hasHeader(name)] += ',' + value + return this +} +Request.prototype.setHeaders = function (headers) { + for (var i in headers) {this.setHeader(i, headers[i])} + return this +} +Request.prototype.hasHeader = function (header, headers) { + var headers = Object.keys(headers || this.headers) + , lheaders = headers.map(function (h) {return h.toLowerCase()}) + ; + header = header.toLowerCase() + for (var i=0;i + +[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) + + + +**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** + +Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. + +```js +fs.createReadStream('ex.txt') + .pipe(through2(function (chunk, enc, callback) { + + for (var i = 0; i < chunk.length; i++) + if (chunk[i] == 97) + chunk[i] = 122 // swap 'a' for 'z' + + this.push(chunk) + + callback() + + })) + .pipe(fs.createWriteStream('out.txt')) +``` + +Or object streams: + +```js +var all = [] + +fs.createReadStream('data.csv') + .pipe(csv2()) + .pipe(through2.obj(function (chunk, enc, callback) { + + var data = { + name : chunk[0] + , address : chunk[3] + , phone : chunk[10] + } + + this.push(data) + + callback() + + })) + .on('data', function (data) { + all.push(data) + }) + .on('end', function () { + doSomethingSpecial(all) + }) +``` + +Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. + +## API + +through2([ options, ] [ transformFunction ] [, flushFunction ]) + +Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). + +### options + +The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). + +The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { + + this.push(new Buffer('wut?')) + cb() + + }) + .pipe(fs.createWriteStream('/tmp/wut.txt')) +``` + +### transformFunction + +The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. + +To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. + +If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. + +### flushFunction + +The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. + +through2.ctor([ options, ] transformFunction[, flushFunction ]) + +Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. + +```js +var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { + if (record.temp != null && record.unit = "F") { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = "C" + } + this.push(record) + callback() +}) + +// Create instances of FToC like so: +var converter = new FToC() +// Or: +var converter = FToC() +// Or specify/override options when you instantiate, if you prefer: +var converter = FToC({objectMode: true}) +``` + +## License + +**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore new file mode 100644 index 00000000..38344f87 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE new file mode 100644 index 00000000..0c44ae71 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md new file mode 100644 index 00000000..be976683 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md @@ -0,0 +1,768 @@ +# readable-stream + +A new class of streams for Node.js + +This module provides the new Stream base classes introduced in Node +v0.10, for use in Node v0.8. You can use it to have programs that +have to work with node v0.8, while being forward-compatible for v0.10 +and beyond. When you drop support for v0.8, you can remove this +module, and only use the native streams. + +This is almost exactly the same codebase as appears in Node v0.10. +However: + +1. The exported object is actually the Readable class. Decorating the + native `stream` module would be global pollution. +2. In v0.10, you can safely use `base64` as an argument to + `setEncoding` in Readable streams. However, in v0.8, the + StringDecoder class has no `end()` method, which is problematic for + Base64. So, don't use that, because it'll break and be weird. + +Other than that, the API is the same as `require('stream')` in v0.10, +so the API docs are reproduced below. + +---------- + + Stability: 2 - Unstable + +A stream is an abstract interface implemented by various objects in +Node. For example a request to an HTTP server is a stream, as is +stdout. Streams are readable, writable, or both. All streams are +instances of [EventEmitter][] + +You can load the Stream base classes by doing `require('stream')`. +There are base classes provided for Readable streams, Writable +streams, Duplex streams, and Transform streams. + +## Compatibility + +In earlier versions of Node, the Readable stream interface was +simpler, but also less powerful and less useful. + +* Rather than waiting for you to call the `read()` method, `'data'` + events would start emitting immediately. If you needed to do some + I/O to decide how to handle data, then you had to store the chunks + in some kind of buffer so that they would not be lost. +* The `pause()` method was advisory, rather than guaranteed. This + meant that you still had to be prepared to receive `'data'` events + even when the stream was in a paused state. + +In Node v0.10, the Readable class described below was added. For +backwards compatibility with older Node programs, Readable streams +switch into "old mode" when a `'data'` event handler is added, or when +the `pause()` or `resume()` methods are called. The effect is that, +even if you are not using the new `read()` method and `'readable'` +event, you no longer have to worry about losing `'data'` chunks. + +Most programs will continue to function normally. However, this +introduces an edge case in the following conditions: + +* No `'data'` event handler is added. +* The `pause()` and `resume()` methods are never called. + +For example, consider the following code: + +```javascript +// WARNING! BROKEN! +net.createServer(function(socket) { + + // we add an 'end' method, but never consume the data + socket.on('end', function() { + // It will never get here. + socket.end('I got your message (but didnt read it)\n'); + }); + +}).listen(1337); +``` + +In versions of node prior to v0.10, the incoming message data would be +simply discarded. However, in Node v0.10 and beyond, the socket will +remain paused forever. + +The workaround in this situation is to call the `resume()` method to +trigger "old mode" behavior: + +```javascript +// Workaround +net.createServer(function(socket) { + + socket.on('end', function() { + socket.end('I got your message (but didnt read it)\n'); + }); + + // start the flow of data, discarding it. + socket.resume(); + +}).listen(1337); +``` + +In addition to new Readable streams switching into old-mode, pre-v0.10 +style streams can be wrapped in a Readable class using the `wrap()` +method. + +## Class: stream.Readable + + + +A `Readable Stream` has the following methods, members, and events. + +Note that `stream.Readable` is an abstract class designed to be +extended with an underlying implementation of the `_read(size)` +method. (See below.) + +### new stream.Readable([options]) + +* `options` {Object} + * `highWaterMark` {Number} The maximum number of bytes to store in + the internal buffer before ceasing to read from the underlying + resource. Default=16kb + * `encoding` {String} If specified, then buffers will be decoded to + strings using the specified encoding. Default=null + * `objectMode` {Boolean} Whether this stream should behave + as a stream of objects. Meaning that stream.read(n) returns + a single value instead of a Buffer of size n + +In classes that extend the Readable class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### readable.\_read(size) + +* `size` {Number} Number of bytes to read asynchronously + +Note: **This function should NOT be called directly.** It should be +implemented by child classes, and called by the internal Readable +class methods only. + +All Readable stream implementations must provide a `_read` method +to fetch data from the underlying resource. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +When data is available, put it into the read queue by calling +`readable.push(chunk)`. If `push` returns false, then you should stop +reading. When `_read` is called again, you should start pushing more +data. + +The `size` argument is advisory. Implementations where a "read" is a +single call that returns data can use this to know how much data to +fetch. Implementations where that is not relevant, such as TCP or +TLS, may ignore this argument, and simply provide data whenever it +becomes available. There is no need, for example to "wait" until +`size` bytes are available before calling `stream.push(chunk)`. + +### readable.push(chunk) + +* `chunk` {Buffer | null | String} Chunk of data to push into the read queue +* return {Boolean} Whether or not more pushes should be performed + +Note: **This function should be called by Readable implementors, NOT +by consumers of Readable subclasses.** The `_read()` function will not +be called again until at least one `push(chunk)` call is made. If no +data is available, then you MAY call `push('')` (an empty string) to +allow a future `_read` call, without adding any data to the queue. + +The `Readable` class works by putting data into a read queue to be +pulled out later by calling the `read()` method when the `'readable'` +event fires. + +The `push()` method will explicitly insert some data into the read +queue. If it is called with `null` then it will signal the end of the +data. + +In some cases, you may be wrapping a lower-level source which has some +sort of pause/resume mechanism, and a data callback. In those cases, +you could wrap the low-level source object by doing something like +this: + +```javascript +// source is an object with readStop() and readStart() methods, +// and an `ondata` member that gets called when it has data, and +// an `onend` member that gets called when the data is over. + +var stream = new Readable(); + +source.ondata = function(chunk) { + // if push() returns false, then we need to stop reading from source + if (!stream.push(chunk)) + source.readStop(); +}; + +source.onend = function() { + stream.push(null); +}; + +// _read will be called when the stream wants to pull more data in +// the advisory size argument is ignored in this case. +stream._read = function(n) { + source.readStart(); +}; +``` + +### readable.unshift(chunk) + +* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue +* return {Boolean} Whether or not more pushes should be performed + +This is the corollary of `readable.push(chunk)`. Rather than putting +the data at the *end* of the read queue, it puts it at the *front* of +the read queue. + +This is useful in certain use-cases where a stream is being consumed +by a parser, which needs to "un-consume" some data that it has +optimistically pulled out of the source. + +```javascript +// A parser for a simple data protocol. +// The "header" is a JSON object, followed by 2 \n characters, and +// then a message body. +// +// Note: This can be done more simply as a Transform stream. See below. + +function SimpleProtocol(source, options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Readable.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + + // source is a readable stream, such as a socket or file + this._source = source; + + var self = this; + source.on('end', function() { + self.push(null); + }); + + // give it a kick whenever the source is readable + // read(0) will not consume any bytes + source.on('readable', function() { + self.read(0); + }); + + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype = Object.create( + Readable.prototype, { constructor: { value: SimpleProtocol }}); + +SimpleProtocol.prototype._read = function(n) { + if (!this._inBody) { + var chunk = this._source.read(); + + // if the source doesn't have data, we don't have data yet. + if (chunk === null) + return this.push(''); + + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + this.push(''); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // now, because we got some extra data, unshift the rest + // back into the read queue so that our consumer will see it. + var b = chunk.slice(split); + this.unshift(b); + + // and let them know that we are done parsing the header. + this.emit('header', this.header); + } + } else { + // from there on, just provide the data to our consumer. + // careful not to push(null), since that would indicate EOF. + var chunk = this._source.read(); + if (chunk) this.push(chunk); + } +}; + +// Usage: +var parser = new SimpleProtocol(source); +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + +### readable.wrap(stream) + +* `stream` {Stream} An "old style" readable stream + +If you are using an older Node library that emits `'data'` events and +has a `pause()` method that is advisory only, then you can use the +`wrap()` method to create a Readable stream that uses the old stream +as its data source. + +For example: + +```javascript +var OldReader = require('./old-api-module.js').OldReader; +var oreader = new OldReader; +var Readable = require('stream').Readable; +var myReader = new Readable().wrap(oreader); + +myReader.on('readable', function() { + myReader.read(); // etc. +}); +``` + +### Event: 'readable' + +When there is data ready to be consumed, this event will fire. + +When this event emits, call the `read()` method to consume the data. + +### Event: 'end' + +Emitted when the stream has received an EOF (FIN in TCP terminology). +Indicates that no more `'data'` events will happen. If the stream is +also writable, it may be possible to continue writing. + +### Event: 'data' + +The `'data'` event emits either a `Buffer` (by default) or a string if +`setEncoding()` was used. + +Note that adding a `'data'` event listener will switch the Readable +stream into "old mode", where data is emitted as soon as it is +available, rather than waiting for you to call `read()` to consume it. + +### Event: 'error' + +Emitted if there was an error receiving data. + +### Event: 'close' + +Emitted when the underlying resource (for example, the backing file +descriptor) has been closed. Not all streams will emit this. + +### readable.setEncoding(encoding) + +Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` +can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. + +The encoding can also be set by specifying an `encoding` field to the +constructor. + +### readable.read([size]) + +* `size` {Number | null} Optional number of bytes to read. +* Return: {Buffer | String | null} + +Note: **This function SHOULD be called by Readable stream users.** + +Call this method to consume data once the `'readable'` event is +emitted. + +The `size` argument will set a minimum number of bytes that you are +interested in. If not set, then the entire content of the internal +buffer is returned. + +If there is no data to consume, or if there are fewer bytes in the +internal buffer than the `size` argument, then `null` is returned, and +a future `'readable'` event will be emitted when more is available. + +Calling `stream.read(0)` will always return `null`, and will trigger a +refresh of the internal buffer, but otherwise be a no-op. + +### readable.pipe(destination, [options]) + +* `destination` {Writable Stream} +* `options` {Object} Optional + * `end` {Boolean} Default=true + +Connects this readable stream to `destination` WriteStream. Incoming +data on this stream gets written to `destination`. Properly manages +back-pressure so that a slow destination will not be overwhelmed by a +fast readable stream. + +This function returns the `destination` stream. + +For example, emulating the Unix `cat` command: + + process.stdin.pipe(process.stdout); + +By default `end()` is called on the destination when the source stream +emits `end`, so that `destination` is no longer writable. Pass `{ end: +false }` as `options` to keep the destination stream open. + +This keeps `writer` open so that "Goodbye" can be written at the +end. + + reader.pipe(writer, { end: false }); + reader.on("end", function() { + writer.end("Goodbye\n"); + }); + +Note that `process.stderr` and `process.stdout` are never closed until +the process exits, regardless of the specified options. + +### readable.unpipe([destination]) + +* `destination` {Writable Stream} Optional + +Undo a previously established `pipe()`. If no destination is +provided, then all previously established pipes are removed. + +### readable.pause() + +Switches the readable stream into "old mode", where data is emitted +using a `'data'` event rather than being buffered for consumption via +the `read()` method. + +Ceases the flow of data. No `'data'` events are emitted while the +stream is in a paused state. + +### readable.resume() + +Switches the readable stream into "old mode", where data is emitted +using a `'data'` event rather than being buffered for consumption via +the `read()` method. + +Resumes the incoming `'data'` events after a `pause()`. + + +## Class: stream.Writable + + + +A `Writable` Stream has the following methods, members, and events. + +Note that `stream.Writable` is an abstract class designed to be +extended with an underlying implementation of the +`_write(chunk, encoding, cb)` method. (See below.) + +### new stream.Writable([options]) + +* `options` {Object} + * `highWaterMark` {Number} Buffer level when `write()` starts + returning false. Default=16kb + * `decodeStrings` {Boolean} Whether or not to decode strings into + Buffers before passing them to `_write()`. Default=true + +In classes that extend the Writable class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### writable.\_write(chunk, encoding, callback) + +* `chunk` {Buffer | String} The chunk to be written. Will always + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. Ignore chunk is a buffer. Note that chunk will + **always** be a buffer unless the `decodeStrings` option is + explicitly set to `false`. +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. + +All Writable stream implementations must provide a `_write` method to +send data to the underlying resource. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Writable +class methods only. + +Call the callback using the standard `callback(error)` pattern to +signal that the write completed successfully or with an error. + +If the `decodeStrings` flag is set in the constructor options, then +`chunk` may be a string rather than a Buffer, and `encoding` will +indicate the sort of string that it is. This is to support +implementations that have an optimized handling for certain string +data encodings. If you do not explicitly set the `decodeStrings` +option to `false`, then you can safely ignore the `encoding` argument, +and assume that `chunk` will always be a Buffer. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + + +### writable.write(chunk, [encoding], [callback]) + +* `chunk` {Buffer | String} Data to be written +* `encoding` {String} Optional. If `chunk` is a string, then encoding + defaults to `'utf8'` +* `callback` {Function} Optional. Called when this chunk is + successfully written. +* Returns {Boolean} + +Writes `chunk` to the stream. Returns `true` if the data has been +flushed to the underlying resource. Returns `false` to indicate that +the buffer is full, and the data will be sent out in the future. The +`'drain'` event will indicate when the buffer is empty again. + +The specifics of when `write()` will return false, is determined by +the `highWaterMark` option provided to the constructor. + +### writable.end([chunk], [encoding], [callback]) + +* `chunk` {Buffer | String} Optional final data to be written +* `encoding` {String} Optional. If `chunk` is a string, then encoding + defaults to `'utf8'` +* `callback` {Function} Optional. Called when the final chunk is + successfully written. + +Call this method to signal the end of the data being written to the +stream. + +### Event: 'drain' + +Emitted when the stream's write queue empties and it's safe to write +without buffering again. Listen for it when `stream.write()` returns +`false`. + +### Event: 'close' + +Emitted when the underlying resource (for example, the backing file +descriptor) has been closed. Not all streams will emit this. + +### Event: 'finish' + +When `end()` is called and there are no more chunks to write, this +event is emitted. + +### Event: 'pipe' + +* `source` {Readable Stream} + +Emitted when the stream is passed to a readable stream's pipe method. + +### Event 'unpipe' + +* `source` {Readable Stream} + +Emitted when a previously established `pipe()` is removed using the +source Readable stream's `unpipe()` method. + +## Class: stream.Duplex + + + +A "duplex" stream is one that is both Readable and Writable, such as a +TCP socket connection. + +Note that `stream.Duplex` is an abstract class designed to be +extended with an underlying implementation of the `_read(size)` +and `_write(chunk, encoding, callback)` methods as you would with a Readable or +Writable stream class. + +Since JavaScript doesn't have multiple prototypal inheritance, this +class prototypally inherits from Readable, and then parasitically from +Writable. It is thus up to the user to implement both the lowlevel +`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method +on extension duplex classes. + +### new stream.Duplex(options) + +* `options` {Object} Passed to both Writable and Readable + constructors. Also has the following fields: + * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then + the stream will automatically end the readable side when the + writable side ends and vice versa. + +In classes that extend the Duplex class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +## Class: stream.Transform + +A "transform" stream is a duplex stream where the output is causally +connected in some way to the input, such as a zlib stream or a crypto +stream. + +There is no requirement that the output be the same size as the input, +the same number of chunks, or arrive at the same time. For example, a +Hash stream will only ever have a single chunk of output which is +provided when the input is ended. A zlib stream will either produce +much smaller or much larger than its input. + +Rather than implement the `_read()` and `_write()` methods, Transform +classes must implement the `_transform()` method, and may optionally +also implement the `_flush()` method. (See below.) + +### new stream.Transform([options]) + +* `options` {Object} Passed to both Writable and Readable + constructors. + +In classes that extend the Transform class, make sure to call the +constructor so that the buffering settings can be properly +initialized. + +### transform.\_transform(chunk, encoding, callback) + +* `chunk` {Buffer | String} The chunk to be transformed. Will always + be a buffer unless the `decodeStrings` option was set to `false`. +* `encoding` {String} If the chunk is a string, then this is the + encoding type. (Ignore if `decodeStrings` chunk is a buffer.) +* `callback` {Function} Call this function (optionally with an error + argument) when you are done processing the supplied chunk. + +Note: **This function MUST NOT be called directly.** It should be +implemented by child classes, and called by the internal Transform +class methods only. + +All Transform stream implementations must provide a `_transform` +method to accept input and produce output. + +`_transform` should do whatever has to be done in this specific +Transform class, to handle the bytes being written, and pass them off +to the readable portion of the interface. Do asynchronous I/O, +process things, and so on. + +Call `transform.push(outputChunk)` 0 or more times to generate output +from this input chunk, depending on how much data you want to output +as a result of this chunk. + +Call the callback function only when the current chunk is completely +consumed. Note that there may or may not be output as a result of any +particular input chunk. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +### transform.\_flush(callback) + +* `callback` {Function} Call this function (optionally with an error + argument) when you are done flushing any remaining data. + +Note: **This function MUST NOT be called directly.** It MAY be implemented +by child classes, and if so, will be called by the internal Transform +class methods only. + +In some cases, your transform operation may need to emit a bit more +data at the end of the stream. For example, a `Zlib` compression +stream will store up some internal state so that it can optimally +compress the output. At the end, however, it needs to do the best it +can with what is left, so that the data will be complete. + +In those cases, you can implement a `_flush` method, which will be +called at the very end, after all the written data is consumed, but +before emitting `end` to signal the end of the readable side. Just +like with `_transform`, call `transform.push(chunk)` zero or more +times, as appropriate, and call `callback` when the flush operation is +complete. + +This method is prefixed with an underscore because it is internal to +the class that defines it, and should not be called directly by user +programs. However, you **are** expected to override this method in +your own extension classes. + +### Example: `SimpleProtocol` parser + +The example above of a simple protocol parser can be implemented much +more simply by using the higher level `Transform` stream class. + +In this example, rather than providing the input as an argument, it +would be piped into the parser, which is a more idiomatic Node stream +approach. + +```javascript +function SimpleProtocol(options) { + if (!(this instanceof SimpleProtocol)) + return new SimpleProtocol(options); + + Transform.call(this, options); + this._inBody = false; + this._sawFirstCr = false; + this._rawHeader = []; + this.header = null; +} + +SimpleProtocol.prototype = Object.create( + Transform.prototype, { constructor: { value: SimpleProtocol }}); + +SimpleProtocol.prototype._transform = function(chunk, encoding, done) { + if (!this._inBody) { + // check if the chunk has a \n\n + var split = -1; + for (var i = 0; i < chunk.length; i++) { + if (chunk[i] === 10) { // '\n' + if (this._sawFirstCr) { + split = i; + break; + } else { + this._sawFirstCr = true; + } + } else { + this._sawFirstCr = false; + } + } + + if (split === -1) { + // still waiting for the \n\n + // stash the chunk, and try again. + this._rawHeader.push(chunk); + } else { + this._inBody = true; + var h = chunk.slice(0, split); + this._rawHeader.push(h); + var header = Buffer.concat(this._rawHeader).toString(); + try { + this.header = JSON.parse(header); + } catch (er) { + this.emit('error', new Error('invalid simple protocol data')); + return; + } + // and let them know that we are done parsing the header. + this.emit('header', this.header); + + // now, because we got some extra data, emit this first. + this.push(b); + } + } else { + // from there on, just provide the data to our consumer as-is. + this.push(b); + } + done(); +}; + +var parser = new SimpleProtocol(); +source.pipe(parser) + +// Now parser is a readable stream that will emit 'header' +// with the parsed header data. +``` + + +## Class: stream.PassThrough + +This is a trivial implementation of a `Transform` stream that simply +passes the input bytes across to the output. Its purpose is mainly +for examples and testing, but there are occasionally use cases where +it can come in handy. + + +[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js new file mode 100644 index 00000000..ca807af8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch new file mode 100644 index 00000000..0ad71a1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch @@ -0,0 +1,68 @@ +diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js +index c5a741c..a2e0d8e 100644 +--- a/lib/_stream_duplex.js ++++ b/lib/_stream_duplex.js +@@ -26,8 +26,8 @@ + + module.exports = Duplex; + var util = require('util'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('./_stream_readable'); ++var Writable = require('./_stream_writable'); + + util.inherits(Duplex, Readable); + +diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js +index a5e9864..330c247 100644 +--- a/lib/_stream_passthrough.js ++++ b/lib/_stream_passthrough.js +@@ -25,7 +25,7 @@ + + module.exports = PassThrough; + +-var Transform = require('_stream_transform'); ++var Transform = require('./_stream_transform'); + var util = require('util'); + util.inherits(PassThrough, Transform); + +diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js +index 2259d2e..e6681ee 100644 +--- a/lib/_stream_readable.js ++++ b/lib/_stream_readable.js +@@ -23,6 +23,9 @@ module.exports = Readable; + Readable.ReadableState = ReadableState; + + var EE = require('events').EventEmitter; ++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { ++ return emitter.listeners(type).length; ++}; + var Stream = require('stream'); + var util = require('util'); + var StringDecoder; +diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js +index e925b4b..f08b05e 100644 +--- a/lib/_stream_transform.js ++++ b/lib/_stream_transform.js +@@ -64,7 +64,7 @@ + + module.exports = Transform; + +-var Duplex = require('_stream_duplex'); ++var Duplex = require('./_stream_duplex'); + var util = require('util'); + util.inherits(Transform, Duplex); + +diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js +index a26f711..56ca47d 100644 +--- a/lib/_stream_writable.js ++++ b/lib/_stream_writable.js +@@ -109,7 +109,7 @@ function WritableState(options, stream) { + function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. +- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) ++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000..a2e0d8e0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,69 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +module.exports = Duplex; +var util = require('util'); +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +Object.keys(Writable.prototype).forEach(function(method) { + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; +}); + +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000..330c247d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,41 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); +var util = require('util'); +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000..323f3305 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,927 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +module.exports = Readable; +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +var Stream = require('stream'); +var util = require('util'); +var StringDecoder; + +util.inherits(Readable, Stream); + +function ReadableState(options, stream) { + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = false; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // In streams that never have any data, and do push(null) right away, + // the consumer can miss the 'end' event if they do some I/O before + // consuming the stream. So, we don't emit('end') until some reading + // happens. + this.calledRead = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (typeof chunk === 'string' && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null || chunk === undefined) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) { + state.buffer.unshift(chunk); + } else { + state.reading = false; + state.buffer.push(chunk); + } + + if (state.needReadable) + emitReadable(stream); + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (isNaN(n) || n === null) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + var state = this._readableState; + state.calledRead = true; + var nOrig = n; + + if (typeof n !== 'number' || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + + // if we currently have less than the highWaterMark, then also read some + if (state.length - n <= state.highWaterMark) + doRead = true; + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) + doRead = false; + + if (doRead) { + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read called its callback synchronously, then `reading` + // will be false, and we need to re-evaluate how much data we + // can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we happened to read() exactly the remaining amount in the + // buffer, and the EOF has been seen at this point, then make sure + // that we emit 'end' on the very next tick. + if (state.ended && !state.endEmitted && state.length === 0) + endReadable(this); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode && + !er) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // if we've ended and we have some data left, then emit + // 'readable' now to make sure it gets picked up. + if (state.length > 0) + emitReadable(stream); + else + endReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (state.emittedReadable) + return; + + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); +} + +function emitReadable_(stream) { + stream.emit('readable'); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + if (readable !== src) return; + cleanup(); + } + + function onend() { + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (!dest._writableState || dest._writableState.needDrain) + ondrain(); + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (Array.isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; + + + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + // the handler that waits for readable events after all + // the data gets sucked out in flow. + // This would be easier to follow with a .once() handler + // in flow(), but that is too slow. + this.on('readable', pipeOnReadable); + + state.flowing = true; + process.nextTick(function() { + flow(src); + }); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var dest = this; + var state = src._readableState; + state.awaitDrain--; + if (state.awaitDrain === 0) + flow(src); + }; +} + +function flow(src) { + var state = src._readableState; + var chunk; + state.awaitDrain = 0; + + function write(dest, i, list) { + var written = dest.write(chunk); + if (false === written) { + state.awaitDrain++; + } + } + + while (state.pipesCount && null !== (chunk = src.read())) { + + if (state.pipesCount === 1) + write(state.pipes, 0, null); + else + state.pipes.forEach(write); + + src.emit('data', chunk); + + // if anyone needs a drain, then we have to wait for that. + if (state.awaitDrain > 0) + return; + } + + // if every destination was unpiped, either before entering this + // function, or in the while loop, then stop flowing. + // + // NB: This is a pretty rare edge case. + if (state.pipesCount === 0) { + state.flowing = false; + + // if there were data event listeners added, then switch to old mode. + if (EE.listenerCount(src, 'data') > 0) + emitDataEvents(src); + return; + } + + // at this point, no one needed a drain, so we just ran out of data + // on the next readable event, start it over again. + state.ranOut = true; +} + +function pipeOnReadable() { + if (this._readableState.ranOut) { + this._readableState.ranOut = false; + flow(this); + } +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = state.pipes.indexOf(dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data' && !this._readableState.flowing) + emitDataEvents(this); + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + this.read(0); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + emitDataEvents(this); + this.read(0); + this.emit('resume'); +}; + +Readable.prototype.pause = function() { + emitDataEvents(this, true); + this.emit('pause'); +}; + +function emitDataEvents(stream, startPaused) { + var state = stream._readableState; + + if (state.flowing) { + // https://github.com/isaacs/readable-stream/issues/16 + throw new Error('Cannot switch to old mode now.'); + } + + var paused = startPaused || false; + var readable = false; + + // convert to an old-style stream. + stream.readable = true; + stream.pipe = Stream.prototype.pipe; + stream.on = stream.addListener = Stream.prototype.on; + + stream.on('readable', function() { + readable = true; + + var c; + while (!paused && (null !== (c = stream.read()))) + stream.emit('data', c); + + if (c === null) { + readable = false; + stream._readableState.needReadable = true; + } + }); + + stream.pause = function() { + paused = true; + this.emit('pause'); + }; + + stream.resume = function() { + paused = false; + if (readable) + process.nextTick(function() { + stream.emit('readable'); + }); + else + this.read(0); + this.emit('resume'); + }; + + // now make it start, just in case it hadn't already. + stream.emit('readable'); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + if (state.decoder) + chunk = state.decoder.write(chunk); + if (!chunk || !state.objectMode && !chunk.length) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (typeof stream[i] === 'function' && + typeof this[i] === 'undefined') { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + events.forEach(function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted && state.calledRead) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000..707e4b3b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,205 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); +var util = require('util'); +util.inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + var ts = this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + this.once('finish', function() { + if ('function' === typeof this._flush) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error('not implemented'); +}; + +Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || + rs.needReadable || + rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function(n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var rs = stream._readableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000..9eaf4ec2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,371 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; +Writable.WritableState = WritableState; + +var util = require('util'); +var assert = require('assert'); +var Stream = require('stream'); + +util.inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + options = options || {}; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function(er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.buffer = []; +} + +function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (typeof cb !== 'function') + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) + ret = writeOrBuffer(this, state, chunk, encoding, cb); + + return ret; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + typeof chunk === 'string') { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) + state.needDrain = true; + + if (state.writing) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + else + doWrite(stream, state, len, chunk, encoding, cb); + + return ret; +} + +function doWrite(stream, state, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + process.nextTick(function() { + cb(er); + }); + else + cb(er); + + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) + onwriteError(stream, state, sync, er, cb); + else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(stream, state); + + if (!finished && !state.bufferProcessing && state.buffer.length) + clearBuffer(stream, state); + + if (sync) { + process.nextTick(function() { + afterWrite(stream, state, finished, cb); + }); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + cb(); + if (finished) + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, len, chunk, encoding, cb); + + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + c++; + break; + } + } + + state.bufferProcessing = false; + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); +}; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (typeof chunk !== 'undefined' && chunk !== null) + this.write(chunk, encoding); + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + state.finished = true; + stream.emit('finish'); + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once('finish', cb); + } + state.ended = true; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore new file mode 100644 index 00000000..b512c09d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE new file mode 100644 index 00000000..6de584a4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE @@ -0,0 +1,20 @@ +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md new file mode 100644 index 00000000..4d2aa001 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md @@ -0,0 +1,7 @@ +**string_decoder.js** (`require('string_decoder')`) from Node.js core + +Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. + +Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** + +The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js new file mode 100755 index 00000000..46470cfd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js @@ -0,0 +1,94 @@ +#!/usr/bin/env node + +const hyperquest = require('hyperzip')(require('hyperdirect')) + , bl = require('bl') + , fs = require('fs') + , path = require('path') + , cheerio = require('cheerio') + + , files = require('./files') + , testReplace = require('./test-replacements') + + , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' + , libsrcurl = srcurlpfx + 'lib/' + , testsrcurl = srcurlpfx + 'test/simple/' + , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' + , libourroot = path.join(__dirname, '../') + , testourroot = path.join(__dirname, '../test/simple/') + + +function processFile (url, out, replacements) { + hyperquest(url).pipe(bl(function (err, data) { + if (err) + throw err + + data = data.toString() + replacements.forEach(function (replacement) { + data = data.replace.apply(data, replacement) + }) + + fs.writeFile(out, data, 'utf8', function (err) { + if (err) + throw err + + console.log('Wrote', out) + }) + })) +} + +function processLibFile (file) { + var replacements = files[file] + , url = libsrcurl + file + , out = path.join(libourroot, replacements.out || file) + + processFile(url, out, replacements) +} + + +function processTestFile (file) { + var replacements = testReplace.all + , url = testsrcurl + file + , out = path.join(testourroot, file) + + if (testReplace[file]) + replacements = replacements.concat(testReplace[file]) + + processFile(url, out, replacements) +} + + +if (!/0\.1\d\.\d+/.test(process.argv[2])) { + console.log('Usage: build.js ') + return process.exit(-1) +} + + +//-------------------------------------------------------------------- +// Grab & process files in ../lib/ + +Object.keys(files).forEach(processLibFile) + +//-------------------------------------------------------------------- +// Discover, grab and process all test-string-decoder* files on joyent/node + +hyperquest(testlisturl).pipe(bl(function (err, data) { + if (err) + throw err + + var $ = cheerio.load(data.toString()) + + $('table.files .js-directory-link').each(function () { + var file = $(this).text() + if (/^test-string-decoder/.test(file) || file == 'common.js') + processTestFile(file) + }) +})) + +//-------------------------------------------------------------------- +// Grab the joyent/node test/common.js + +processFile( + testsrcurl + '../common.js' + , path.join(testourroot, '../common.js') + , testReplace['common.js'] +) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js new file mode 100644 index 00000000..7396a4f4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js @@ -0,0 +1,36 @@ +/* This file lists the files to be fetched from the node repo + * in the /lib/ directory which will be placed in the ../lib/ + * directory after having each of the "replacements" in the + * array for that file applied to it. The replacements are + * simply the arguments to String#replace, so they can be + * strings, regexes, functions. + */ + +module.exports['string_decoder.js'] = [ + + // pull in Bufer as a require + // add Buffer.isEncoding where missing + [ + /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m + , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' + + '\n' + + '\nvar isBufferEncoding = Buffer.isEncoding' + + '\n || function(encoding) {' + + '\n switch (encoding && encoding.toLowerCase()) {' + + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' + + '\n default: return false;' + + '\n }' + + '\n }' + + '\n' + + ] + + // use custom Buffer.isEncoding reference + , [ + /Buffer\.isEncoding\(/g + , 'isBufferEncoding\(' + ] + +] + +module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json new file mode 100644 index 00000000..f7ee6a46 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json @@ -0,0 +1,12 @@ +{ + "name": "string_decoder-build", + "version": "0.0.0", + "description": "", + "main": "build.js", + "dependencies": { + "bl": "~0.6.0", + "hyperzip": "0.0.0", + "hyperdirect": "0.0.0", + "cheerio": "~0.13.1" + } +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js new file mode 100644 index 00000000..5bbf6028 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js @@ -0,0 +1,24 @@ +module.exports.all = [ + [ + /require\(['"]string_decoder['"]\)/g + , 'require(\'../../\')' + ] + +] + +module.exports['common.js'] = [ + [ + /^ setImmediate,$/m + , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' + ] + + , [ + /^ clearImmediate,$/m + , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' + ] + + , [ + /^ global];$/m + , ' global].filter(Boolean);' + ] +] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js new file mode 100644 index 00000000..2e44a03e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -0,0 +1,200 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + this.charBuffer = new Buffer(6); + this.charReceived = 0; + this.charLength = 0; +}; + + +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + var offset = 0; + + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var i = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, offset, i); + this.charReceived += (i - offset); + offset = i; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (i == buffer.length) return charStr; + + // otherwise cut off the characters end from the beginning of this buffer + buffer = buffer.slice(i, buffer.length); + break; + } + + var lenIncomplete = this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); + this.charReceived = lenIncomplete; + end -= lenIncomplete; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + + return i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + var incomplete = this.charReceived = buffer.length % 2; + this.charLength = incomplete ? 2 : 0; + return incomplete; +} + +function base64DetectIncompleteChar(buffer) { + var incomplete = this.charReceived = buffer.length % 3; + this.charLength = incomplete ? 3 : 0; + return incomplete; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json new file mode 100644 index 00000000..c7cac1a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -0,0 +1,36 @@ +{ + "name": "string_decoder", + "version": "0.10.25", + "description": "The string_decoder module from Node core", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tap": "~0.4.8" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "_id": "string_decoder@0.10.25", + "dist": { + "shasum": "aa026a29a0177ff13c8df4472dcda2f26d646900" + }, + "_from": "string_decoder@~0.10.x", + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js new file mode 100644 index 00000000..ed5ff08d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js @@ -0,0 +1,200 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var path = require('path'); +var assert = require('assert'); + +exports.testDir = path.dirname(__filename); +exports.fixturesDir = path.join(exports.testDir, 'fixtures'); +exports.libDir = path.join(exports.testDir, '../lib'); +exports.tmpDir = path.join(exports.testDir, 'tmp'); +exports.PORT = +process.env.NODE_COMMON_PORT || 12346; + +if (process.platform === 'win32') { + exports.PIPE = '\\\\.\\pipe\\libuv-test'; +} else { + exports.PIPE = exports.tmpDir + '/test.sock'; +} + +var util = require('util'); +for (var i in util) exports[i] = util[i]; +//for (var i in exports) global[i] = exports[i]; + +function protoCtrChain(o) { + var result = []; + for (; o; o = o.__proto__) { result.push(o.constructor); } + return result.join(); +} + +exports.indirectInstanceOf = function(obj, cls) { + if (obj instanceof cls) { return true; } + var clsChain = protoCtrChain(cls.prototype); + var objChain = protoCtrChain(obj); + return objChain.slice(-clsChain.length) === clsChain; +}; + + +exports.ddCommand = function(filename, kilobytes) { + if (process.platform === 'win32') { + var p = path.resolve(exports.fixturesDir, 'create-file.js'); + return '"' + process.argv[0] + '" "' + p + '" "' + + filename + '" ' + (kilobytes * 1024); + } else { + return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; + } +}; + + +exports.spawnCat = function(options) { + var spawn = require('child_process').spawn; + + if (process.platform === 'win32') { + return spawn('more', [], options); + } else { + return spawn('cat', [], options); + } +}; + + +exports.spawnPwd = function(options) { + var spawn = require('child_process').spawn; + + if (process.platform === 'win32') { + return spawn('cmd.exe', ['/c', 'cd'], options); + } else { + return spawn('pwd', [], options); + } +}; + + +// Turn this off if the test should not check for global leaks. +exports.globalCheck = true; + +process.on('exit', function() { + if (!exports.globalCheck) return; + var knownGlobals = [setTimeout, + setInterval, + typeof setImmediate == 'undefined' ? null : setImmediate, + clearTimeout, + clearInterval, + typeof clearImmediate == 'undefined' ? null : clearImmediate, + console, + Buffer, + process, + global].filter(Boolean); + + if (global.gc) { + knownGlobals.push(gc); + } + + if (global.DTRACE_HTTP_SERVER_RESPONSE) { + knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); + knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); + knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); + knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); + knownGlobals.push(DTRACE_NET_STREAM_END); + knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); + knownGlobals.push(DTRACE_NET_SOCKET_READ); + knownGlobals.push(DTRACE_NET_SOCKET_WRITE); + } + if (global.COUNTER_NET_SERVER_CONNECTION) { + knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); + knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); + knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); + knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); + knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); + knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); + } + + if (global.ArrayBuffer) { + knownGlobals.push(ArrayBuffer); + knownGlobals.push(Int8Array); + knownGlobals.push(Uint8Array); + knownGlobals.push(Uint8ClampedArray); + knownGlobals.push(Int16Array); + knownGlobals.push(Uint16Array); + knownGlobals.push(Int32Array); + knownGlobals.push(Uint32Array); + knownGlobals.push(Float32Array); + knownGlobals.push(Float64Array); + knownGlobals.push(DataView); + } + + for (var x in global) { + var found = false; + + for (var y in knownGlobals) { + if (global[x] === knownGlobals[y]) { + found = true; + break; + } + } + + if (!found) { + console.error('Unknown global: %s', x); + assert.ok(false, 'Unknown global found'); + } + } +}); + + +var mustCallChecks = []; + + +function runCallChecks(exitCode) { + if (exitCode !== 0) return; + + var failed = mustCallChecks.filter(function(context) { + return context.actual !== context.expected; + }); + + failed.forEach(function(context) { + console.log('Mismatched %s function calls. Expected %d, actual %d.', + context.name, + context.expected, + context.actual); + console.log(context.stack.split('\n').slice(2).join('\n')); + }); + + if (failed.length) process.exit(1); +} + + +exports.mustCall = function(fn, expected) { + if (typeof expected !== 'number') expected = 1; + + var context = { + expected: expected, + actual: 0, + stack: (new Error).stack, + name: fn.name || '' + }; + + // add the exit listener only once to avoid listener leak warnings + if (mustCallChecks.length === 0) process.on('exit', runCallChecks); + + mustCallChecks.push(context); + + return function() { + context.actual++; + return fn.apply(this, arguments); + }; +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js new file mode 100644 index 00000000..869a4116 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js @@ -0,0 +1,75 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// verify that the string decoder works getting 1 byte at a time, +// the whole buffer at once, and that both match the .toString(enc) +// result of the entire buffer. + +var assert = require('assert'); +var SD = require('../../').StringDecoder; +var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; + +var bufs = [ '☃💩', 'asdf' ].map(function(b) { + return new Buffer(b); +}); + +// also test just arbitrary bytes from 0-15. +for (var i = 1; i <= 16; i++) { + var bytes = new Array(i).join('.').split('.').map(function(_, j) { + return j + 0x78; + }); + bufs.push(new Buffer(bytes)); +} + +encodings.forEach(testEncoding); + +console.log('ok'); + +function testEncoding(encoding) { + bufs.forEach(function(buf) { + testBuf(encoding, buf); + }); +} + +function testBuf(encoding, buf) { + console.error('# %s', encoding, buf); + + // write one byte at a time. + var s = new SD(encoding); + var res1 = ''; + for (var i = 0; i < buf.length; i++) { + res1 += s.write(buf.slice(i, i + 1)); + } + res1 += s.end(); + + // write the whole buffer at once. + var res2 = ''; + var s = new SD(encoding); + res2 += s.write(buf); + res2 += s.end(); + + // .toString() on the buffer + var res3 = buf.toString(encoding); + + console.log('expect=%j', res3); + assert.equal(res1, res3, 'one byte at a time should match toString'); + assert.equal(res2, res3, 'all bytes at once should match toString'); +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js new file mode 100644 index 00000000..7f69f7ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js @@ -0,0 +1,163 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('../common'); +var assert = require('assert'); +var StringDecoder = require('../../').StringDecoder; +var decoder = new StringDecoder('utf8'); + + + +var buffer = new Buffer('$'); +assert.deepEqual('$', decoder.write(buffer)); + +buffer = new Buffer('¢'); +assert.deepEqual('', decoder.write(buffer.slice(0, 1))); +assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); + +buffer = new Buffer('€'); +assert.deepEqual('', decoder.write(buffer.slice(0, 1))); +assert.deepEqual('', decoder.write(buffer.slice(1, 2))); +assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); + +buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); +s += decoder.write(buffer.slice(2, 3)); +s += decoder.write(buffer.slice(3, 4)); +assert.ok(s.length > 0); + +// CESU-8 +buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); +s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 4)); +s += decoder.write(buffer.slice(4, 5)); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 2)); +s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(4, 5)); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 6)); +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + + +// UCS-2 +decoder = new StringDecoder('ucs2'); +buffer = new Buffer('ab', 'ucs2'); +assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars +buffer = new Buffer('abc', 'ucs2'); +assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' +assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' + + +// UTF-16LE +buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) +var s = ''; +s += decoder.write(buffer.slice(0, 1)); +s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(2, 3)); +s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate +assert.equal(s, ''); +s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + +var s = ''; +s += decoder.write(buffer.slice(0, 4)); +assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) + + +// A mixed ascii and non-ascii string +// Test stolen from deps/v8/test/cctest/test-strings.cc +// U+02E4 -> CB A4 +// U+0064 -> 64 +// U+12E4 -> E1 8B A4 +// U+0030 -> 30 +// U+3045 -> E3 81 85 +var expected = '\u02e4\u0064\u12e4\u0030\u3045'; +var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, + 0x30, 0xE3, 0x81, 0x85]); +var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; + +// Split the buffer into 3 segments +// |----|------|-------| +// 0 i j buffer.length +// Scan through every possible 3 segment combination +// and make sure that the string is always parsed. +common.print('scanning '); +for (var j = 2; j < buffer.length; j++) { + for (var i = 1; i < j; i++) { + var decoder = new StringDecoder('utf8'); + + var sum = decoder.write(buffer.slice(0, i)); + + // just check that we've received the right amount + // after the first write + assert.equal(charLengths[i], sum.length); + + sum += decoder.write(buffer.slice(i, j)); + sum += decoder.write(buffer.slice(j, buffer.length)); + assert.equal(expected, sum); + common.print('.'); + } +} +console.log(' crayon!'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json new file mode 100644 index 00000000..c9e268d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json @@ -0,0 +1,42 @@ +{ + "name": "readable-stream", + "version": "1.0.25", + "description": "An exploration of a new kind of readable streams for Node.js", + "main": "readable.js", + "dependencies": { + "string_decoder": "~0.10.x" + }, + "devDependencies": { + "tap": "~0.2.6" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "BSD", + "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/readable-stream/issues" + }, + "homepage": "https://github.com/isaacs/readable-stream", + "_id": "readable-stream@1.0.25", + "dist": { + "shasum": "3d234b55fd2a25db8327618f088e50a32044df50" + }, + "_from": "readable-stream@~1.0.17", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.25.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js new file mode 100644 index 00000000..27e8d8a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js new file mode 100644 index 00000000..4d1ddfc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js @@ -0,0 +1,6 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js new file mode 100644 index 00000000..5d482f07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js new file mode 100644 index 00000000..e1e9efdf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE new file mode 100644 index 00000000..a23e08a8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile new file mode 100644 index 00000000..d583fcf4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile @@ -0,0 +1,4 @@ +browser: + node ./support/compile + +.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md new file mode 100644 index 00000000..389adae3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md @@ -0,0 +1,27 @@ +# xtend + +[![browser support][3]][4] + +Extend like a boss + +xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. + +## Examples + +```js +var extend = require("xtend") + +var combination = extend({ + a: "a" +}, { + b: "b" +}) +// { a: "a", b: "b" } +``` + + +## MIT Licenced + + + [3]: http://ci.testling.com/Raynos/xtend.png + [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js new file mode 100644 index 00000000..62391e78 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js @@ -0,0 +1,7 @@ +module.exports = hasKeys + +function hasKeys(source) { + return source !== null && + (typeof source === "object" || + typeof source === "function") +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js new file mode 100644 index 00000000..20937d19 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js @@ -0,0 +1,25 @@ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js new file mode 100644 index 00000000..17454ae4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js @@ -0,0 +1,25 @@ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend(target) { + var sources = [].slice.call(arguments, 1) + + for (var i = 0; i < sources.length; i++) { + var source = sources[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml new file mode 100644 index 00000000..60d00ce1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + - "0.8" + - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md new file mode 100644 index 00000000..ab32d0ad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md @@ -0,0 +1,39 @@ +#object-keys [![Version Badge][2]][1] + +[![Build Status][3]][4] [![dependency status][5]][6] + +[![browser support][7]][8] + +An Object.keys shim. Uses Object.keys if available. + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.equal(keys(obj), ['a', 'b', 'c']); +``` + +## Source +Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/object-keys +[2]: http://vb.teelaun.ch/ljharb/object-keys.svg +[3]: https://travis-ci.org/ljharb/object-keys.png +[4]: https://travis-ci.org/ljharb/object-keys +[5]: https://david-dm.org/ljharb/object-keys.png +[6]: https://david-dm.org/ljharb/object-keys +[7]: https://ci.testling.com/ljharb/object-keys.png +[8]: https://ci.testling.com/ljharb/object-keys +[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 +[10]: https://github.com/bestiejs/lodash + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js new file mode 100644 index 00000000..db32d458 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js @@ -0,0 +1,40 @@ +var hasOwn = Object.prototype.hasOwnProperty; +var toString = Object.prototype.toString; + +var isFunction = function (fn) { + var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; + if (!isFunc && typeof window !== 'undefined') { + isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; + } + return isFunc; +}; + +module.exports = function forEach(obj, fn) { + if (!isFunction(fn)) { + throw new TypeError('iterator must be a function'); + } + var i, k, + isString = typeof obj === 'string', + l = obj.length, + context = arguments.length > 2 ? arguments[2] : null; + if (l === +l) { + for (i = 0; i < l; i++) { + if (context === null) { + fn(isString ? obj.charAt(i) : obj[i], i, obj); + } else { + fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); + } + } + } else { + for (k in obj) { + if (hasOwn.call(obj, k)) { + if (context === null) { + fn(obj[k], k, obj); + } else { + fn.call(context, obj[k], k, obj); + } + } + } + } +}; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js new file mode 100644 index 00000000..f5b24b6d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js @@ -0,0 +1,2 @@ +module.exports = Object.keys || require('./shim'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js new file mode 100644 index 00000000..74a09897 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js @@ -0,0 +1,16 @@ +var toString = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toString.call(value); + var isArguments = str === '[object Arguments]'; + if (!isArguments) { + isArguments = str !== '[object Array]' + && value !== null + && typeof value === 'object' + && typeof value.length === 'number' + && value.length >= 0 + && toString.call(value.callee) === '[object Function]'; + } + return isArguments; +}; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json new file mode 100644 index 00000000..9dfda8dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json @@ -0,0 +1,60 @@ +{ + "name": "object-keys", + "version": "0.4.0", + "author": { + "name": "Jordan Harband" + }, + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "node test/index.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "foreach": "~2.0.3", + "is": "~0.2.6", + "tape": "~1.0.4", + "indexof": "~0.0.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "readme": "#object-keys [![Version Badge][2]][1]\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/ljharb/object-keys/issues" + }, + "homepage": "https://github.com/ljharb/object-keys", + "_id": "object-keys@0.4.0", + "dist": { + "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336" + }, + "_from": "object-keys@~0.4.0", + "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js new file mode 100644 index 00000000..b88421be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js @@ -0,0 +1,62 @@ +(function () { + "use strict"; + + // modified from https://github.com/kriskowal/es5-shim + var has = Object.prototype.hasOwnProperty, + toString = Object.prototype.toString, + forEach = require('./foreach'), + isArgs = require('./isArguments'), + hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), + hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + keysShim; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object', + isFunction = toString.call(object) === '[object Function]', + isArguments = isArgs(object), + theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + + if (isArguments) { + forEach(object, function (value) { + theKeys.push(value); + }); + } else { + var name, + skipProto = hasProtoEnumBug && isFunction; + + for (name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(name); + } + } + } + + if (hasDontEnumBug) { + var ctor = object.constructor, + skipConstructor = ctor && ctor.prototype === object; + + forEach(dontEnums, function (dontEnum) { + if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { + theKeys.push(dontEnum); + } + }); + } + return theKeys; + }; + + module.exports = keysShim; +}()); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js new file mode 100644 index 00000000..f29f065a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js @@ -0,0 +1,156 @@ +var test = require('tape'); +var forEach = require('../foreach.js'); + +test('second argument: iterator', function (t) { + var arr = []; + t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); + t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); + t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); + t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); + t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); + t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); + t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); + t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); + t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); + t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); + if (typeof window !== 'undefined') { + t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); + } + t.end(); +}); + +test('array', function (t) { + var arr = [1, 2, 3]; + + t.test('iterates over every item', function (st) { + var index = 0; + forEach(arr, function () { index += 1; }); + st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(arr.length); + forEach(arr, function (item) { + st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(arr.length); + forEach(arr, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(arr.length); + forEach(arr, function (item, index, array) { + st.deepEqual(arr, array, 'array is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(arr.length); + forEach(arr, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('object', function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + var keys = ['a', 'b', 'c']; + + var F = function () { + this.a = 1; + this.b = 2; + }; + F.prototype.c = 3; + var fKeys = ['a', 'b']; + + t.test('iterates over every object literal key', function (st) { + var counter = 0; + forEach(obj, function () { counter += 1; }); + st.equal(counter, keys.length, 'iterated ' + counter + ' times'); + st.end(); + }); + + t.test('iterates only over own keys', function (st) { + var counter = 0; + forEach(new F(), function () { counter += 1; }); + st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(keys.length); + forEach(obj, function (item) { + st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(keys.length); + forEach(obj, function (item, key) { + st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(keys.length); + forEach(obj, function (item, key, object) { + st.deepEqual(obj, object, 'object is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(1); + forEach({foo: 'bar'}, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + + +test('string', function (t) { + var str = 'str'; + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(str.length * 2 + 1); + forEach(str, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + st.equal(str.charAt(index), item); + counter += 1; + }); + st.equal(counter, str.length, 'iterates ' + str.length + ' times'); + }); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js new file mode 100644 index 00000000..8b77b1fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js @@ -0,0 +1,6 @@ + +require('./foreach'); +require('./isArguments'); + +require('./shim'); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js new file mode 100644 index 00000000..62a07c2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js @@ -0,0 +1,10 @@ +var test = require('tape'); +var isArguments = require('../isArguments'); + +test('is.arguments', function (t) { + t.notOk(isArguments([]), 'array is not arguments'); + (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); + (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js new file mode 100644 index 00000000..9d932712 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js @@ -0,0 +1,134 @@ +var test = require('tape'); +var shimmedKeys = require('../index.js'); +var is = require('is'); +var keys = require('../shim.js'); +var forEach = require('foreach'); +var indexOf = require('indexof'); + +var obj = { + "str": "boz", + "obj": {}, + "arr": [], + "bool": true, + "num": 42, + "aNull": null, + "undef": undefined +}; +var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; + +test('exports a function', function (t) { + if (Object.keys) { + t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); + } else { + t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); + } + t.end(); +}); + +test('working with actual shim', function (t) { + t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); + t.end(); +}); + +test('works with an object literal', function (t) { + var theKeys = keys(obj); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, objKeys, 'Object has expected keys'); + t.end(); +}); + +test('works with an array', function (t) { + var arr = [1, 2, 3]; + var theKeys = keys(arr); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); + t.end(); +}); + +test('works with a function', function (t) { + var foo = function () {}; + foo.a = true; + + t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); + t.deepEqual(keys(foo), ['a'], 'returns expected keys'); + t.end(); +}); + +test('returns names which are own properties', function (t) { + forEach(keys(obj), function (name) { + t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); + }); + t.end(); +}); + +test('returns names which are enumerable', function (t) { + var k, loopedValues = []; + for (k in obj) { + loopedValues.push(k); + } + forEach(keys(obj), function (name) { + t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); + }); + t.end(); +}); + +test('throws an error for a non-object', function (t) { + t.throws( + function () { return keys(42); }, + new TypeError('Object.keys called on a non-object'), + 'throws on a non-object' + ); + t.end(); +}); + +test('works with an object instance', function (t) { + var Prototype = function () {}; + Prototype.prototype.foo = true; + var obj = new Prototype(); + obj.bar = true; + var theKeys = keys(obj); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); + t.end(); +}); + +test('works in iOS 5 mobile Safari', function (t) { + var Foo = function () {}; + Foo.a = function () {}; + + // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] + t.deepEqual(keys(Foo), ['a'], 'has expected keys'); + t.end(); +}); + +test('works in environments with the dontEnum bug (IE < 9)', function (t) { + var Foo = function () {}; + Foo.prototype.a = function () {}; + + // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] + t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); + t.end(); +}); + +test('shadowed properties', function (t) { + var shadowedProps = [ + 'dummyControlProp', /* just to be sure */ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + shadowedProps.sort(); + var shadowedObject = {}; + forEach(shadowedProps, function (value, index) { + shadowedObject[value] = index; + }); + var shadowedObjectKeys = keys(shadowedObject); + shadowedObjectKeys.sort(); + t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); + t.end(); +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json new file mode 100644 index 00000000..a761197d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json @@ -0,0 +1,76 @@ +{ + "name": "xtend", + "version": "2.1.2", + "description": "extend like a boss", + "keywords": [ + "extend", + "merge", + "options", + "opts", + "object", + "array" + ], + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/Raynos/xtend.git" + }, + "main": "index", + "scripts": { + "test": "node test" + }, + "dependencies": { + "object-keys": "~0.4.0" + }, + "devDependencies": { + "tape": "~1.1.0" + }, + "homepage": "https://github.com/Raynos/xtend", + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "bugs": { + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/raynos/xtend/raw/master/LICENSE" + } + ], + "testling": { + "files": "test.js", + "browsers": [ + "ie/7..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] + }, + "engines": { + "node": ">=0.4" + }, + "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", + "readmeFilename": "README.md", + "_id": "xtend@2.1.2", + "dist": { + "shasum": "5e8f75d1b0d9ca976fee0f1aa88f80c7619210d5" + }, + "_from": "xtend@~2.1.1", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js new file mode 100644 index 00000000..3369d796 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js @@ -0,0 +1,63 @@ +var test = require("tape") +var extend = require("./") +var mutableExtend = require("./mutable") + +test("merge", function(assert) { + var a = { a: "foo" } + var b = { b: "bar" } + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("replace", function(assert) { + var a = { a: "foo" } + var b = { a: "bar" } + + assert.deepEqual(extend(a, b), { a: "bar" }) + assert.end() +}) + +test("undefined", function(assert) { + var a = { a: undefined } + var b = { b: "foo" } + + assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) + assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) + assert.end() +}) + +test("handle 0", function(assert) { + var a = { a: "default" } + var b = { a: 0 } + + assert.deepEqual(extend(a, b), { a: 0 }) + assert.deepEqual(extend(b, a), { a: "default" }) + assert.end() +}) + +test("is immutable", function (assert) { + var record = {} + + extend(record, { foo: "bar" }) + assert.equal(record.foo, undefined) + assert.end() +}) + +test("null as argument", function (assert) { + var a = { foo: "bar" } + var b = null + var c = void 0 + + assert.deepEqual(extend(b, a, c), { foo: "bar" }) + assert.end() +}) + +test("mutable", function (assert) { + var a = { foo: "bar" } + + mutableExtend(a, { bar: "baz" }) + + assert.equal(a.bar, "baz") + assert.end() +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json new file mode 100644 index 00000000..9612fee2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json @@ -0,0 +1,48 @@ +{ + "name": "through2", + "version": "0.4.1", + "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", + "main": "through2.js", + "scripts": { + "test": "node test/test.js", + "test-local": "brtapsauce-local test/basic-test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/rvagg/through2.git" + }, + "keywords": [ + "stream", + "streams2", + "through", + "transform" + ], + "author": { + "name": "Rod Vagg", + "email": "r@va.gg", + "url": "https://github.com/rvagg" + }, + "license": "MIT", + "dependencies": { + "readable-stream": "~1.0.17", + "xtend": "~2.1.1" + }, + "devDependencies": { + "tape": "~2.3.0", + "bl": "~0.6.0", + "stream-spigot": "~3.0.1", + "brtapsauce": "~0.2.2" + }, + "readme": "# through2\n\n\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\nthrough2([ options, ] [ transformFunction ] [, flushFunction ])\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\nthrough2.ctor([ options, ] transformFunction[, flushFunction ])\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/rvagg/through2/issues" + }, + "homepage": "https://github.com/rvagg/through2", + "_id": "through2@0.4.1", + "dist": { + "shasum": "48772c8b50c4955c25e7cdbe69f4220f4138178b" + }, + "_from": "through2@~0.4.0", + "_resolved": "https://registry.npmjs.org/through2/-/through2-0.4.1.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js new file mode 100644 index 00000000..9d137c7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js @@ -0,0 +1,334 @@ +const test = require('tape') + , through2 = require('../') + , crypto = require('crypto') + , bl = require('bl') + , spigot = require('stream-spigot') + +test('plain through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('pipeable through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + // bl() acts like a proper streams2 stream and passes as much as it's + // asked for, so we really only get one write with such a small amount + // of data + t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') + t.end() + })) + + var bufs = bl() + bufs.append(crypto.randomBytes(10)) + bufs.append(crypto.randomBytes(5)) + bufs.append(crypto.randomBytes(10)) + bufs.pipe(th2) +}) + +test('object through', function (t) { + t.plan(3) + + var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object through with through2.obj', function (t) { + t.plan(3) + + var th2 = through2.obj(function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('flushing through', function (t) { + var th2 = through2(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }, function (callback) { + this.push(new Buffer([ 101, 110, 100 ])) + callback() + }) + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('plain through ctor', function (t) { + var Th2 = through2.ctor(function (chunk, enc, callback) { + if (!this._i) + this._i = 97 // 'a' + else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + var th2 = new Th2() + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + t.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('reuse through ctor', function (t) { + t.plan(4) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + if (!this._i) { + t.ok(1, 'did not contain previous instance data (this._i)') + this._i = 97 // 'a' + } else + this._i++ + var b = new Buffer(chunk.length) + for (var i = 0; i < chunk.length; i++) + b[i] = this._i + this.push(b) + callback() + }) + + var th2 = Th2() + + th2.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') + + var newInstance = Th2() + newInstance.pipe(bl(function (err, b) { + var s = b.toString('ascii') + t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') + })) + + newInstance.write(crypto.randomBytes(7)) + newInstance.write(crypto.randomBytes(4)) + newInstance.write(crypto.randomBytes(7)) + newInstance.end() + })) + + th2.write(crypto.randomBytes(10)) + th2.write(crypto.randomBytes(5)) + th2.write(crypto.randomBytes(10)) + th2.end() +}) + +test('object through ctor', function (t) { + t.plan(3) + + var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = new Th2() + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('pipeable object through ctor', function (t) { + t.plan(4) + + var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { + if (record.temp != null && record.unit == 'F') { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = 'C' + } + this.push(record) + callback() + }) + + var th2 = Th2() + + var expect = [-19, -40, 100, 22] + th2.on('data', function (o) { + t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') + }) + + spigot({objectMode: true}, [ + {temp: -2.2, unit: 'F'}, + {temp: -40, unit: 'F'}, + {temp: 212, unit: 'F'}, + {temp: 22, unit: 'C'} + ]).pipe(th2) +}) + +test('object through ctor override', function (t) { + t.plan(3) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({objectMode: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object settings available in transform', function (t) { + t.plan(6) + + var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2() + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object settings available in transform override', function (t) { + t.plan(6) + + var Th2 = through2.ctor(function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({objectMode: true, peek: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) + +test('object override extends options', function (t) { + t.plan(6) + + var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { + t.ok(this.options.peek, "reading options from inside _transform") + this.push({ out: chunk.in + 1 }) + callback() + }) + + var th2 = Th2({peek: true}) + + var e = 0 + th2.on('data', function (o) { + t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') + e++ + }) + + th2.write({ in: 101 }) + th2.write({ in: 202 }) + th2.write({ in: -100 }) + th2.end() +}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js new file mode 100644 index 00000000..cc10868b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js @@ -0,0 +1,42 @@ +/* +on rvagg@fletcher: + @0.2.3: Ran 36719 iterations in 10000 ms +*/ + +const through2 = require('../') + , bl = require('bl') + , crypto = require('crypto') + , assert = require('assert') + +function run (callback) { + var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) + , stream = through2(function (chunk, env, callback) { + callback(null, chunk.toString('hex')) + }) + + stream.pipe(bl(function (err, data) { + assert(!err) + assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) + callback() + })) + + bufs.forEach(function (b) { + stream.write(b) + }) + stream.end() +} + +var count = 0 + , start = Date.now() + +;(function exec () { + count++ + run(function () { + if (Date.now() - start < 1000 * 10) { + return setImmediate(exec) + } + console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') + }) +}()) + +console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js new file mode 100644 index 00000000..a6d28625 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js @@ -0,0 +1,38 @@ +#!/usr/bin/env node + +const user = process.env.SAUCE_USER + , key = process.env.SAUCE_KEY + , path = require('path') + , brtapsauce = require('brtapsauce') + , testFile = path.join(__dirname, 'basic-test.js') + + , capabilities = [ + { browserName: 'chrome' , platform: 'Windows XP', version: '' } + , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } + , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } + , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } + , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } + , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } + , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } + , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } + , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } + , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } + , { browserName: 'opera' , platform: 'Windows 7' , version: '' } + , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } + , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } + , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } + ] + +if (!user) + throw new Error('Must set a SAUCE_USER env var') +if (!key) + throw new Error('Must set a SAUCE_KEY env var') + +brtapsauce({ + name : 'Traversty' + , user : user + , key : key + , brsrc : testFile + , capabilities : capabilities + , options : { timeout: 60 * 6 } +}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js new file mode 100644 index 00000000..aa9b4877 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js @@ -0,0 +1,9 @@ +require('./basic-test') + +if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) + return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') + +if (!/v0\.10/.test(process.version)) + return console.log('Not Node v0.10.x, not running sauce tests') + +require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js new file mode 100644 index 00000000..c1104848 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js @@ -0,0 +1,78 @@ +var Transform = require('readable-stream/transform') + , inherits = require('util').inherits + , xtend = require('xtend') + + +// a noop _transform function +function noop (chunk, enc, callback) { + callback(null, chunk) +} + + +// create a new export function, used by both the main export and +// the .ctor export, contains common logic for dealing with arguments +function through2 (construct) { + return function (options, transform, flush) { + if (typeof options == 'function') { + flush = transform + transform = options + options = {} + } + + if (typeof transform != 'function') + transform = noop + + if (typeof flush != 'function') + flush = null + + return construct(options, transform, flush) + } +} + + +// main export, just make me a transform stream! +module.exports = through2(function (options, transform, flush) { + var t2 = new Transform(options) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +// make me a reusable prototype that I can `new`, or implicitly `new` +// with a constructor call +module.exports.ctor = through2(function (options, transform, flush) { + function Through2 (override) { + if (!(this instanceof Through2)) + return new Through2(override) + + this.options = xtend(options, override) + + Transform.call(this, this.options) + } + + inherits(Through2, Transform) + + Through2.prototype._transform = transform + + if (flush) + Through2.prototype._flush = flush + + return Through2 +}) + + +module.exports.obj = through2(function (options, transform, flush) { + var t2 = new Transform(xtend({ objectMode: true }, options)) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/package.json new file mode 100644 index 00000000..d289871c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/package.json @@ -0,0 +1,55 @@ +{ + "name": "download", + "version": "0.1.10", + "description": "Download and extract files effortlessly", + "keywords": [ + "url", + "http", + "download", + "extract" + ], + "homepage": "https://github.com/kevva/download", + "bugs": { + "url": "https://github.com/kevva/download/issues" + }, + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "http://kevinmartensson.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/kevva/download.git" + }, + "scripts": { + "test": "mocha --reporter list" + }, + "main": "download.js", + "files": [ + "download.js" + ], + "dependencies": { + "decompress": "~0.1.5", + "each-async": "~0.1.1", + "mkdirp": "~0.3.5", + "request": "~2.31.0", + "through2": "~0.4.0" + }, + "devDependencies": { + "mocha": "~1.17.0", + "nock": "~0.27.1", + "rimraf": "~2.2.5" + }, + "engines": { + "node": ">=0.10.0" + }, + "readme": "# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)\n\nDownload and extract files effortlessly in Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/download): `npm install download`\n\n## Examples\n\nIf you're fetching an archive you can set `extract: true` in options and\nit'll extract it for you.\n\n```js\nvar download = require('download');\n\n// download and extract `foo.tar.gz` into `bar/`\ndownload('foo.tar.gz', 'bar', { extract: true });\n\n// download and save `foo.exe` into `bar/foo.exe` with mode `0755`\ndownload('foo.exe', 'bar', { mode: '0755' });\n\n// download and save `foo.zip` into `bar/foobar.zip`\ndownload({ url: 'foo.zip', name: 'foobar.zip' }, 'bar');\n\n// download and save an array of files in `bar/`\nvar files = ['foo.jpg', 'bar.jpg', 'cat.jpg'];\ndownload(files, 'bar');\n\n// download, save and rename an array of files in `bar/`\nvar files = [{\n url: 'foo.jpg',\n name: 'foobar.jpg'\n}, {\n url: 'cat.jpg',\n name: 'dog.jpg'\n}];\ndownload(files, 'bar');\n```\n\n## API\n\n### download(url, dest, opts)\n\nDownload a file or an array of files to a given destination. Returns an EventEmitter \nthat emits the following possible events:\n\n* `response` — Relayed when the underlying `http.ClientRequest` emits the same \nevent. Listeners called with a `http.IncomingMessage` instance.\n* `data` — Relayed when the underlying `http.IncomingMessage` emits the same \nevent. Listeners called with a `Buffer` instance.\n* `error` — Relayed when the underlying `http.ClientRequest` emits the same event \nor when the response status code is not in the 200s. Listeners called with an \n`Error` instance (in the first case) or the response status code.\n* `close` — Relayed when the underlying `stream.Duplex` emits the same event.\n\n## Options\n\nYou can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below.\n\n### extract\n\nType: `Boolean` \nDefault: `false`\n\nIf set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/).\n\n### mode\n\nType: `String` \nDefault: `undefined`\n\nSet mode on the downloaded files.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", + "readmeFilename": "README.md", + "_id": "download@0.1.10", + "dist": { + "shasum": "dc5d3ab4a7fc78e374e2de0381273b7b999bc29d" + }, + "_from": "download@~0.1.2", + "_resolved": "https://registry.npmjs.org/download/-/download-0.1.10.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore new file mode 100644 index 00000000..2ccbe465 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml new file mode 100644 index 00000000..c1ffcb31 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/History.md new file mode 100644 index 00000000..d1fa5334 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/History.md @@ -0,0 +1,20 @@ + +0.0.2 / 2013-05-29 +================== + + * Updated github url + * Fix bug calling isbin with list of paths + * Add tests for sync version + * Added travis CI passing image to readme + * Added node engines and keywords + * Added travis CI config + * Added basic readme + * Added basic test suite and Makefile + * Add async version + * Some refactorings using 'some' function + * Fixed issue with wrong paths if called multiple times + +0.0.1 / 2012-12-06 +================== + + * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile new file mode 100644 index 00000000..1a2444a1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile @@ -0,0 +1,6 @@ +REPORTER ?= dot + +test: + @NODE_ENV=test ./node_modules/mocha/bin/mocha -R $(REPORTER) + +.PHONY: test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/README.md new file mode 100644 index 00000000..5224d614 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/README.md @@ -0,0 +1,59 @@ +[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin) + +# Isbin + +Tiny little helper library to determine if a certain binary is available within $PATH or any additional folder. + +# Installation + +```bash +$ npm install isbin +``` + +# Usage + +```js +var isbin = require('isbin'); + +// Test against $PATH +isbin('mysql', function(exists) { + console.log(exists); // ==> Boolean +}); + +// With additional path to test +isbin('mysql', '/usr/local/bin', function(exists) { + console.log(exists); // ==> Boolean +}); + +// Or multiple ones +isbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) { + console.log(exists); // ==> Boolean +}); +``` + +There are also synchronous versions available + +```js +var exists = isbin('mysql'); +var exists = isbin('mysql', '/usr/local/bin'); +var exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']); +``` + +# Running the tests + +```bash +$ npm install +$ make test +``` + +# License + +(The MIT License) + +Copyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/index.js new file mode 100644 index 00000000..bb0a047c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/index.js @@ -0,0 +1 @@ +module.exports = require('./lib'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js new file mode 100644 index 00000000..1b8a5cac --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js @@ -0,0 +1,51 @@ +/** + * Require dependencies + */ + +var fs = require('fs') + , async = require('async'); + +/** + * Check if given binary exists + * + * @param {String} bin Binary to test + * @param {String|Array} additional Additional paths to check + * @param {Function(result)} isbinChecked Callback when check is done async, optional + * @return {Boolean} True if binary was found + */ + +function isbin(bin, additional, isbinChecked) { + // isbin(bin, cb) + if (!isbinChecked) isbinChecked = additional; + + // Read $PATH to get set up bin folders + var paths = process.env.PATH.split(':') || []; + + // isbin(bin, 'path', cb) + if ('string' === typeof additional) { + paths.push(additional); + } + + // isbin(bin, ['path1', 'path2'], cb) + if ('object' === typeof additional && additional.length !== null) { + paths.concat(additional); + } + + // async check + if ('function' === typeof isbinChecked) { + return async.some(paths, function(path, pathChecked) { + fs.exists(path + '/' + bin, pathChecked); + }, isbinChecked); + } + + // sync check + return paths.reverse().some(function(path) { + return fs.existsSync(path + '/' + bin); + }); +}; + +/** + * Expose module + */ + +module.exports = isbin; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules new file mode 100644 index 00000000..a9aae984 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules @@ -0,0 +1,9 @@ +[submodule "deps/nodeunit"] + path = deps/nodeunit + url = git://github.com/caolan/nodeunit.git +[submodule "deps/UglifyJS"] + path = deps/UglifyJS + url = https://github.com/mishoo/UglifyJS.git +[submodule "deps/nodelint"] + path = deps/nodelint + url = https://github.com/tav/nodelint.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore new file mode 100644 index 00000000..9bdfc97c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore @@ -0,0 +1,4 @@ +deps +dist +test +nodelint.cfg \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE new file mode 100644 index 00000000..b7f9d500 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile new file mode 100644 index 00000000..bad647c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile @@ -0,0 +1,25 @@ +PACKAGE = asyncjs +NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) +CWD := $(shell pwd) +NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit +UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs +NODELINT = $(CWD)/node_modules/nodelint/nodelint + +BUILDDIR = dist + +all: clean test build + +build: $(wildcard lib/*.js) + mkdir -p $(BUILDDIR) + $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js + +test: + $(NODEUNIT) test + +clean: + rm -rf $(BUILDDIR) + +lint: + $(NODELINT) --config nodelint.cfg lib/async.js + +.PHONY: test build all diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md new file mode 100644 index 00000000..1bbbc477 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md @@ -0,0 +1,1021 @@ +# Async.js + +Async is a utility module which provides straight-forward, powerful functions +for working with asynchronous JavaScript. Although originally designed for +use with [node.js](http://nodejs.org), it can also be used directly in the +browser. + +Async provides around 20 functions that include the usual 'functional' +suspects (map, reduce, filter, forEach…) as well as some common patterns +for asynchronous control flow (parallel, series, waterfall…). All these +functions assume you follow the node.js convention of providing a single +callback as the last argument of your async function. + + +## Quick Examples + + async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file + }); + + async.filter(['file1','file2','file3'], path.exists, function(results){ + // results now equals an array of the existing files + }); + + async.parallel([ + function(){ ... }, + function(){ ... } + ], callback); + + async.series([ + function(){ ... }, + function(){ ... } + ]); + +There are many more functions available so take a look at the docs below for a +full list. This module aims to be comprehensive, so if you feel anything is +missing please create a GitHub issue for it. + + +## Download + +Releases are available for download from +[GitHub](http://github.com/caolan/async/downloads). +Alternatively, you can install using Node Package Manager (npm): + + npm install async + + +__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed + +__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped + + +## In the Browser + +So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: + + + + + +## Documentation + +### Collections + +* [forEach](#forEach) +* [map](#map) +* [filter](#filter) +* [reject](#reject) +* [reduce](#reduce) +* [detect](#detect) +* [sortBy](#sortBy) +* [some](#some) +* [every](#every) +* [concat](#concat) + +### Control Flow + +* [series](#series) +* [parallel](#parallel) +* [whilst](#whilst) +* [until](#until) +* [waterfall](#waterfall) +* [queue](#queue) +* [auto](#auto) +* [iterator](#iterator) +* [apply](#apply) +* [nextTick](#nextTick) + +### Utils + +* [memoize](#memoize) +* [unmemoize](#unmemoize) +* [log](#log) +* [dir](#dir) +* [noConflict](#noConflict) + + +## Collections + + +### forEach(arr, iterator, callback) + +Applies an iterator function to each item in an array, in parallel. +The iterator is called with an item from the list and a callback for when it +has finished. If the iterator passes an error to this callback, the main +callback for the forEach function is immediately called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + + // assuming openFiles is an array of file names and saveFile is a function + // to save the modified contents of that file: + + async.forEach(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error + }); + +--------------------------------------- + + +### forEachSeries(arr, iterator, callback) + +The same as forEach only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. This means the iterator functions will complete in order. + + +--------------------------------------- + + +### forEachLimit(arr, limit, iterator, callback) + +The same as forEach only the iterator is applied to batches of items in the +array, in series. The next batch of iterators is only called once the current +one has completed processing. + +__Arguments__ + +* arr - An array to iterate over. +* limit - How many items should be in each batch. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(err) - A callback which is called after all the iterator functions + have finished, or an error has occurred. + +__Example__ + + // Assume documents is an array of JSON objects and requestApi is a + // function that interacts with a rate-limited REST api. + + async.forEachLimit(documents, 20, requestApi, function(err){ + // if any of the saves produced an error, err would equal that error + }); +--------------------------------------- + + +### map(arr, iterator, callback) + +Produces a new array of values by mapping each value in the given array through +the iterator function. The iterator is called with an item from the array and a +callback for when it has finished processing. The callback takes 2 arguments, +an error and the transformed item from the array. If the iterator passes an +error to this callback, the main callback for the map function is immediately +called with the error. + +Note, that since this function applies the iterator to each item in parallel +there is no guarantee that the iterator functions will complete in order, however +the results array will be in the same order as the original array. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and a transformed item. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array of the + transformed items from the original array. + +__Example__ + + async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file + }); + +--------------------------------------- + + +### mapSeries(arr, iterator, callback) + +The same as map only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + + +--------------------------------------- + + +### filter(arr, iterator, callback) + +__Alias:__ select + +Returns a new array of all the values which pass an async truth test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(results) - A callback which is called after all the iterator + functions have finished. + +__Example__ + + async.filter(['file1','file2','file3'], path.exists, function(results){ + // results now equals an array of the existing files + }); + +--------------------------------------- + + +### filterSeries(arr, iterator, callback) + +__alias:__ selectSeries + +The same as filter only the iterator is applied to each item in the array in +series. The next iterator is only called once the current one has completed +processing. The results array will be in the same order as the original. + +--------------------------------------- + + +### reject(arr, iterator, callback) + +The opposite of filter. Removes values that pass an async truth test. + +--------------------------------------- + + +### rejectSeries(arr, iterator, callback) + +The same as filter, only the iterator is applied to each item in the array +in series. + + +--------------------------------------- + + +### reduce(arr, memo, iterator, callback) + +__aliases:__ inject, foldl + +Reduces a list of values into a single value using an async iterator to return +each successive step. Memo is the initial state of the reduction. This +function only operates in series. For performance reasons, it may make sense to +split a call to this function into a parallel map, then use the normal +Array.prototype.reduce on the results. This function is for situations where +each step in the reduction needs to be async, if you can get the data before +reducing it then its probably a good idea to do so. + +__Arguments__ + +* arr - An array to iterate over. +* memo - The initial state of the reduction. +* iterator(memo, item, callback) - A function applied to each item in the + array to produce the next step in the reduction. The iterator is passed a + callback which accepts an optional error as its first argument, and the state + of the reduction as the second. If an error is passed to the callback, the + reduction is stopped and the main callback is immediately called with the + error. +* callback(err, result) - A callback which is called after all the iterator + functions have finished. Result is the reduced value. + +__Example__ + + async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); + }, function(err, result){ + // result is now equal to the last value of memo, which is 6 + }); + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, callback) + +__Alias:__ foldr + +Same as reduce, only operates on the items in the array in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, callback) + +Returns the first value in a list that passes an async truth test. The +iterator is applied in parallel, meaning the first iterator to return true will +fire the detect callback with that result. That means the result might not be +the first item in the original array (in terms of order) that passes the test. + +If order within the original array is important then look at detectSeries. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value undefined if none passed. + +__Example__ + + async.detect(['file1','file2','file3'], path.exists, function(result){ + // result now equals the first file in the list that exists + }); + +--------------------------------------- + + +### detectSeries(arr, iterator, callback) + +The same as detect, only the iterator is applied to each item in the array +in series. This means the result is always the first in the original array (in +terms of array order) that passes the truth test. + + +--------------------------------------- + + +### sortBy(arr, iterator, callback) + +Sorts a list by the results of running each value through an async iterator. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and a value to use as the sort criteria. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is the items from + the original array sorted by the values returned by the iterator calls. + +__Example__ + + async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); + }, function(err, results){ + // results is now the original array of files sorted by + // modified date + }); + + +--------------------------------------- + + +### some(arr, iterator, callback) + +__Alias:__ any + +Returns true if at least one element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. Once any iterator +call returns true, the main callback is immediately called. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called as soon as any iterator returns + true, or after all the iterator functions have finished. Result will be + either true or false depending on the values of the async tests. + +__Example__ + + async.some(['file1','file2','file3'], path.exists, function(result){ + // if result is true then at least one of the files exists + }); + +--------------------------------------- + + +### every(arr, iterator, callback) + +__Alias:__ all + +Returns true if every element in the array satisfies an async test. +_The callback for each iterator call only accepts a single argument of true or +false, it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like path.exists. + +__Arguments__ + +* arr - An array to iterate over. +* iterator(item, callback) - A truth test to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed. +* callback(result) - A callback which is called after all the iterator + functions have finished. Result will be either true or false depending on + the values of the async tests. + +__Example__ + + async.every(['file1','file2','file3'], path.exists, function(result){ + // if result is true then every file exists + }); + +--------------------------------------- + + +### concat(arr, iterator, callback) + +Applies an iterator to each item in a list, concatenating the results. Returns the +concatenated list. The iterators are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of the arguments passed to the iterator function. + +__Arguments__ + +* arr - An array to iterate over +* iterator(item, callback) - A function to apply to each item in the array. + The iterator is passed a callback which must be called once it has completed + with an error (which can be null) and an array of results. +* callback(err, results) - A callback which is called after all the iterator + functions have finished, or an error has occurred. Results is an array containing + the concatenated results of the iterator function. + +__Example__ + + async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories + }); + +--------------------------------------- + + +### concatSeries(arr, iterator, callback) + +Same as async.concat, but executes in series instead of parallel. + + +## Control Flow + + +### series(tasks, [callback]) + +Run an array of functions in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run and the callback for the series is +immediately called with the value of the error. Once the tasks have completed, +the results are passed to the final callback as an array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.series. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed + a callback it must call on completion. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets an array of all the arguments passed to + the callbacks used in the array. + +__Example__ + + async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + }, + ], + // optional callback + function(err, results){ + // results is now equal to ['one', 'two'] + }); + + + // an example using an object instead of an array + async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + }, + }, + function(err, results) { + // results is now equal to: {one: 1, two: 2} + }); + + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run an array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main callback is immediately called with the value of the error. +Once the tasks have completed, the results are passed to the final callback as an +array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final callback as an object +instead of an array. This can be a more readable way of handling results from +async.parallel. + + +__Arguments__ + +* tasks - An array or object containing functions to run, each function is passed a + callback it must call on completion. +* callback(err, results) - An optional callback to run once all the functions + have completed. This function gets an array of all the arguments passed to + the callbacks used in the array. + +__Example__ + + async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + }, + ], + // optional callback + function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. + }); + + + // an example using an object instead of an array + async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + }, + }, + function(err, results) { + // results is now equals to: {one: 1, two: 2} + }); + + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call fn, while test returns true. Calls the callback when stopped, +or an error occurs. + +__Arguments__ + +* test() - synchronous truth test to perform before each execution of fn. +* fn(callback) - A function to call each time the test passes. The function is + passed a callback which must be called once it has completed with an optional + error as the first argument. +* callback(err) - A callback which is called after the test fails and repeated + execution of fn has stopped. + +__Example__ + + var count = 0; + + async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } + ); + + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call fn, until test returns true. Calls the callback when stopped, +or an error occurs. + +The inverse of async.whilst. + + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs an array of functions in series, each passing their results to the next in +the array. However, if any of the functions pass an error to the callback, the +next function is not executed and the main callback is immediately called with +the error. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a callback it + must call on completion. +* callback(err, [results]) - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + + async.waterfall([ + function(callback){ + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback){ + callback(null, 'three'); + }, + function(arg1, callback){ + // arg1 now equals 'three' + callback(null, 'done'); + } + ], function (err, result) { + // result now equals 'done' + }); + + +--------------------------------------- + + +### queue(worker, concurrency) + +Creates a queue object with the specified concurrency. Tasks added to the +queue will be processed in parallel (up to the concurrency limit). If all +workers are in progress, the task is queued until one is available. Once +a worker has completed a task, the task's callback is called. + +__Arguments__ + +* worker(task, callback) - An asynchronous function for processing a queued + task. +* concurrency - An integer for determining how many worker functions should be + run in parallel. + +__Queue objects__ + +The queue object returned by this function has the following properties and +methods: + +* length() - a function returning the number of items waiting to be processed. +* concurrency - an integer for determining how many worker functions should be + run in parallel. This property can be changed after a queue is created to + alter the concurrency on-the-fly. +* push(task, [callback]) - add a new task to the queue, the callback is called + once the worker has finished processing the task. + instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. +* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued +* empty - a callback that is called when the last item from the queue is given to a worker +* drain - a callback that is called when the last item from the queue has returned from the worker + +__Example__ + + // create a queue object with concurrency 2 + + var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); + }, 2); + + + // assign a callback + q.drain = function() { + console.log('all items have been processed'); + } + + // add some items to the queue + + q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); + }); + q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); + }); + + // add some items to the queue (batch-wise) + + q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing bar'); + }); + + +--------------------------------------- + + +### auto(tasks, [callback]) + +Determines the best order for running functions based on their requirements. +Each function can optionally depend on other functions being completed first, +and each function is run as soon as its requirements are satisfied. If any of +the functions pass an error to their callback, that function will not complete +(so any other functions depending on it will not run) and the main callback +will be called immediately with the error. Functions also receive an object +containing the results of functions which have completed so far. + +__Arguments__ + +* tasks - An object literal containing named functions or an array of + requirements, with the function itself the last item in the array. The key + used for each function or array is used when specifying requirements. The + syntax is easier to understand by looking at the example. +* callback(err, results) - An optional callback which is called when all the + tasks have been completed. The callback will receive an error as an argument + if any tasks pass an error to their callback. If all tasks complete + successfully, it will receive an object containing their results. + +__Example__ + + async.auto({ + get_data: function(callback){ + // async code to get some data + }, + make_folder: function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + }, + write_file: ['get_data', 'make_folder', function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, filename); + }], + email_link: ['write_file', function(callback, results){ + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + }] + }); + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + + async.parallel([ + function(callback){ + // async code to get some data + }, + function(callback){ + // async code to create a directory to store a file in + // this is run at the same time as getting the data + } + ], + function(results){ + async.series([ + function(callback){ + // once there is some data and the directory exists, + // write the data to a file in the directory + }, + email_link: function(callback){ + // once the file is written let's email a link to it... + } + ]); + }); + +For a complicated series of async tasks using the auto function makes adding +new tasks much easier and makes the code more readable. + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the array, +returning a continuation to call the next one after that. Its also possible to +'peek' the next iterator by doing iterator.next(). + +This function is used internally by the async module but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* tasks - An array of functions to run, each function is passed a callback it + must call on completion. + +__Example__ + + var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } + ]); + + node> var iterator2 = iterator(); + 'one' + node> var iterator3 = iterator2(); + 'two' + node> iterator3(); + 'three' + node> var nextfn = iterator2.next(); + node> nextfn(); + 'three' + + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied, a useful +shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + + // using apply + + async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), + ]); + + + // the same process without using apply + + async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + }, + ]); + +It's possible to pass any number of additional arguments when calling the +continuation: + + node> var fn = async.apply(sys.puts, 'one'); + node> fn('two', 'three'); + one + two + three + +--------------------------------------- + + +### nextTick(callback) + +Calls the callback on a later loop around the event loop. In node.js this just +calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), +which means other higher priority events may precede the execution of the callback. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* callback - The function to call on a later loop around the event loop. + +__Example__ + + var call_order = []; + async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two] + }); + call_order.push('one') + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an async function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +__Arguments__ + +* fn - the function you to proxy and cache results from. +* hasher - an optional function for generating a custom hash for storing + results, it has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + + var slow_fn = function (name, callback) { + // do something + callback(null, result); + }; + var fn = async.memoize(slow_fn); + + // fn can now be used as if it were slow_fn + fn('some name', function () { + // callback + }); + + +### unmemoize(fn) + +Undoes a memoized function, reverting it to the original, unmemoized +form. Comes handy in tests. + +__Arguments__ + +* fn - the memoized function + + +### log(function, arguments) + +Logs the result of an async function to the console. Only works in node.js or +in browsers that support console.log and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.log is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + + var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); + }; + + node> async.log(hello, 'world'); + 'hello world' + + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an async function to the console using console.dir to +display the properties of the resulting object. Only works in node.js or +in browsers that support console.dir and console.error (such as FF and Chrome). +If multiple arguments are returned from the async function, console.dir is +called on each argument in order. + +__Arguments__ + +* function - The function you want to eventually apply all arguments to. +* arguments... - Any number of arguments to apply to the function. + +__Example__ + + var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); + }; + + node> async.dir(hello, 'world'); + {hello: 'world'} + + +--------------------------------------- + + +### noConflict() + +Changes the value of async back to its original value, returning a reference to the +async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js new file mode 100644 index 00000000..8e238453 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js @@ -0,0 +1,3 @@ +// This file is just added for convenience so this repository can be +// directly checked out into a project's deps folder +module.exports = require('./lib/async'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js new file mode 100644 index 00000000..7cc4f5ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js @@ -0,0 +1,692 @@ +/*global setTimeout: false, console: false */ +(function () { + + var async = {}; + + // global on the server, window in the browser + var root = this, + previous_async = root.async; + + if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } + else { + root.async = async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + //// cross-browser compatiblity functions //// + + var _forEach = function (arr, iterator) { + if (arr.forEach) { + return arr.forEach(iterator); + } + for (var i = 0; i < arr.length; i += 1) { + iterator(arr[i], i, arr); + } + }; + + var _map = function (arr, iterator) { + if (arr.map) { + return arr.map(iterator); + } + var results = []; + _forEach(arr, function (x, i, a) { + results.push(iterator(x, i, a)); + }); + return results; + }; + + var _reduce = function (arr, iterator, memo) { + if (arr.reduce) { + return arr.reduce(iterator, memo); + } + _forEach(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + }; + + var _keys = function (obj) { + if (Object.keys) { + return Object.keys(obj); + } + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + if (typeof process === 'undefined' || !(process.nextTick)) { + async.nextTick = function (fn) { + setTimeout(fn, 0); + }; + } + else { + async.nextTick = process.nextTick; + } + + async.forEach = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + _forEach(arr, function (x) { + iterator(x, function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed === arr.length) { + callback(null); + } + } + }); + }); + }; + + async.forEachSeries = function (arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + var iterate = function () { + iterator(arr[completed], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed === arr.length) { + callback(null); + } + else { + iterate(); + } + } + }); + }; + iterate(); + }; + + async.forEachLimit = function (arr, limit, iterator, callback) { + callback = callback || function () {}; + if (!arr.length || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed === arr.length) { + return callback(); + } + + while (running < limit && started < arr.length) { + started += 1; + running += 1; + iterator(arr[started - 1], function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + running -= 1; + if (completed === arr.length) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + + + var doParallel = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.forEach].concat(args)); + }; + }; + var doSeries = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments); + return fn.apply(null, [async.forEachSeries].concat(args)); + }; + }; + + + var _asyncMap = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + }; + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.reduce = function (arr, memo, iterator, callback) { + async.forEachSeries(arr, function (x, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + // inject alias + async.inject = async.reduce; + // foldl alias + async.foldl = async.reduce; + + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, function (x) { + return x; + }).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + // foldr alias + async.foldr = async.reduceRight; + + var _filter = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.filter = doParallel(_filter); + async.filterSeries = doSeries(_filter); + // select alias + async.select = async.filter; + async.selectSeries = async.filterSeries; + + var _reject = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (!v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.reject = doParallel(_reject); + async.rejectSeries = doSeries(_reject); + + var _detect = function (eachfn, arr, iterator, main_callback) { + eachfn(arr, function (x, callback) { + iterator(x, function (result) { + if (result) { + main_callback(x); + main_callback = function () {}; + } + else { + callback(); + } + }); + }, function (err) { + main_callback(); + }); + }; + async.detect = doParallel(_detect); + async.detectSeries = doSeries(_detect); + + async.some = function (arr, iterator, main_callback) { + async.forEach(arr, function (x, callback) { + iterator(x, function (v) { + if (v) { + main_callback(true); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(false); + }); + }; + // any alias + async.any = async.some; + + async.every = function (arr, iterator, main_callback) { + async.forEach(arr, function (x, callback) { + iterator(x, function (v) { + if (!v) { + main_callback(false); + main_callback = function () {}; + } + callback(); + }); + }, function (err) { + main_callback(true); + }); + }; + // all alias + async.all = async.every; + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + var fn = function (left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }; + callback(null, _map(results.sort(fn), function (x) { + return x.value; + })); + } + }); + }; + + async.auto = function (tasks, callback) { + callback = callback || function () {}; + var keys = _keys(tasks); + if (!keys.length) { + return callback(null); + } + + var results = {}; + + var listeners = []; + var addListener = function (fn) { + listeners.unshift(fn); + }; + var removeListener = function (fn) { + for (var i = 0; i < listeners.length; i += 1) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + return; + } + } + }; + var taskComplete = function () { + _forEach(listeners.slice(0), function (fn) { + fn(); + }); + }; + + addListener(function () { + if (_keys(results).length === keys.length) { + callback(null, results); + callback = function () {}; + } + }); + + _forEach(keys, function (k) { + var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; + var taskCallback = function (err) { + if (err) { + callback(err); + // stop subsequent errors hitting callback multiple times + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + taskComplete(); + } + }; + var requires = task.slice(0, Math.abs(task.length - 1)) || []; + var ready = function () { + return _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + }; + if (ready()) { + task[task.length - 1](taskCallback, results); + } + else { + var listener = function () { + if (ready()) { + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + }; + addListener(listener); + } + }); + }; + + async.waterfall = function (tasks, callback) { + callback = callback || function () {}; + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + var args = Array.prototype.slice.call(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + async.nextTick(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(async.iterator(tasks))(); + }; + + async.parallel = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.map(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.forEach(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.series = function (tasks, callback) { + callback = callback || function () {}; + if (tasks.constructor === Array) { + async.mapSeries(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.forEachSeries(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.iterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + async.apply = function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + return function () { + return fn.apply( + null, args.concat(Array.prototype.slice.call(arguments)) + ); + }; + }; + + var _concat = function (eachfn, arr, fn, callback) { + var r = []; + eachfn(arr, function (x, cb) { + fn(x, function (err, y) { + r = r.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, r); + }); + }; + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + if (test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.whilst(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.until = function (test, iterator, callback) { + if (!test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.until(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.queue = function (worker, concurrency) { + var workers = 0; + var q = { + tasks: [], + concurrency: concurrency, + saturated: null, + empty: null, + drain: null, + push: function (data, callback) { + if(data.constructor !== Array) { + data = [data]; + } + _forEach(data, function(task) { + q.tasks.push({ + data: task, + callback: typeof callback === 'function' ? callback : null + }); + if (q.saturated && q.tasks.length == concurrency) { + q.saturated(); + } + async.nextTick(q.process); + }); + }, + process: function () { + if (workers < q.concurrency && q.tasks.length) { + var task = q.tasks.shift(); + if(q.empty && q.tasks.length == 0) q.empty(); + workers += 1; + worker(task.data, function () { + workers -= 1; + if (task.callback) { + task.callback.apply(task, arguments); + } + if(q.drain && q.tasks.length + workers == 0) q.drain(); + q.process(); + }); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + } + }; + return q; + }; + + var _console_fn = function (name) { + return function (fn) { + var args = Array.prototype.slice.call(arguments, 1); + fn.apply(null, args.concat([function (err) { + var args = Array.prototype.slice.call(arguments, 1); + if (typeof console !== 'undefined') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _forEach(args, function (x) { + console[name](x); + }); + } + } + }])); + }; + }; + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + hasher = hasher || function (x) { + return x; + }; + var memoized = function () { + var args = Array.prototype.slice.call(arguments); + var callback = args.pop(); + var key = hasher.apply(null, args); + if (key in memo) { + callback.apply(null, memo[key]); + } + else if (key in queues) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([function () { + memo[key] = arguments; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, arguments); + } + }])); + } + }; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + +}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json new file mode 100644 index 00000000..31e18559 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json @@ -0,0 +1,36 @@ +{ + "name": "async", + "description": "Higher-order functions and common patterns for asynchronous code", + "main": "./index", + "author": { + "name": "Caolan McMahon" + }, + "version": "0.1.22", + "repository": { + "type": "git", + "url": "http://github.com/caolan/async.git" + }, + "bugs": { + "url": "http://github.com/caolan/async/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/caolan/async/raw/master/LICENSE" + } + ], + "devDependencies": { + "nodeunit": ">0.0.0", + "uglify-js": "1.2.x", + "nodelint": ">0.0.0" + }, + "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n \n \n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n );\n\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ], function (err, result) {\n // result now equals 'done' \n });\n\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n // add some items to the queue (batch-wise)\n\n q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. If all tasks complete\n successfully, it will receive an object containing their results.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/caolan/async", + "_id": "async@0.1.22", + "dist": { + "shasum": "3b270eedc0419d6f92a664444ce98e0f59a8fef7" + }, + "_from": "async@0.1.22", + "_resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/package.json new file mode 100644 index 00000000..1d8c8459 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/package.json @@ -0,0 +1,45 @@ +{ + "name": "isbin", + "version": "0.0.2", + "description": "Checks for available binaries on unix machines", + "main": "index.js", + "engines": { + "node": ">= 0.8.0" + }, + "keywords": [ + "fs", + "bin", + "binary", + "exists", + "check", + "path" + ], + "scripts": { + "test": "make test" + }, + "repository": { + "type": "git", + "url": "git://github.com/behrendtio/isbin.git" + }, + "author": "", + "license": "MIT", + "dependencies": { + "async": "0.1.22" + }, + "devDependencies": { + "mocha": "1.7.3", + "should": "1.2.1" + }, + "readme": "[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin)\n\n# Isbin\n\nTiny little helper library to determine if a certain binary is available within $PATH or any additional folder.\n\n# Installation\n\n```bash\n$ npm install isbin\n```\n\n# Usage\n\n```js\nvar isbin = require('isbin');\n\n// Test against $PATH\nisbin('mysql', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// With additional path to test\nisbin('mysql', '/usr/local/bin', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// Or multiple ones\nisbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) {\n console.log(exists); // ==> Boolean\n});\n```\n\nThere are also synchronous versions available\n\n```js\nvar exists = isbin('mysql');\nvar exists = isbin('mysql', '/usr/local/bin');\nvar exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']);\n```\n\n# Running the tests\n\n```bash\n$ npm install\n$ make test\n```\n\n# License\n\n(The MIT License)\n\nCopyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/behrendtio/isbin/issues" + }, + "homepage": "https://github.com/behrendtio/isbin", + "_id": "isbin@0.0.2", + "dist": { + "shasum": "2a35fb234ad5ee30f78da61b57e8f42ac43ec5a4" + }, + "_from": "isbin@0.0.2", + "_resolved": "https://registry.npmjs.org/isbin/-/isbin-0.0.2.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js new file mode 100644 index 00000000..068a38a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js @@ -0,0 +1,39 @@ +var isbin = require('../'); + +describe('isbin', function() { + it('accepts binary, additional path and callback', function(done) { + isbin('ls', '/etc', function(exists) { + exists.should.be.a('boolean'); + done(); + }) + }); + + it('accepts array of paths', function(done) { + isbin('ls', ['/etc', '/home'], function(exists) { + exists.should.be.a('boolean'); + done(); + }); + }); + + it('accepts just binary and callback', function(done) { + isbin('ls', function(exists) { + exists.should.be.a('boolean'); + done(); + }); + }); + + it('accepts binary, additional path and callback', function() { + var exists = isbin('ls', '/etc'); + exists.should.be.a('boolean'); + }); + + it('accepts array of paths', function() { + var exists = isbin('ls', ['/etc', '/home']); + exists.should.be.a('boolean'); + }); + + it('accepts just binary', function() { + var exists = isbin('ls'); + exists.should.be.a('boolean'); + }); +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts new file mode 100644 index 00000000..e5eb9f87 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts @@ -0,0 +1,4 @@ +--require should +--bail +--ui bdd +--slow 100 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig new file mode 100644 index 00000000..e036e247 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig @@ -0,0 +1,20 @@ +; EditorConfig is awesome: http://EditorConfig.org + +; top-most EditorConfig file +root = true + +; base rules +[*] +end_of_line = lf +insert_final_newline = false +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true + +; The default indent on package.json is 2 spaces, better to keep it so we can +; use `npm install --save` and other features that rewrites the package.json +; file automatically +[package.json] +indent_style = space +indent_size = 2 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc new file mode 100644 index 00000000..bbdb29cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc @@ -0,0 +1,69 @@ +{ + // Settings + "passfail" : false, // Stop on first error. + "maxerr" : 50, // Maximum error before stopping. + + + // Predefined globals whom JSHint will ignore. + "browser" : true, // Standard browser globals e.g. `window`, `document`. + "couch" : false, + "dojo" : false, + "jquery" : true, + "mootools" : false, + "node" : false, + "prototypejs" : false, + "rhino" : false, + "wsh" : false, + + // Custom globals. + "predef" : [ + "define", + "require" + ], + + + // Development. + "debug" : false, // Allow debugger statements e.g. browser breakpoints. + "devel" : false, // Allow developments statements e.g. `console.log();`. + + + // EcmaScript 5. + "es5" : false, // Allow EcmaScript 5 syntax. + "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). + "strict" : false, // Require `use strict` pragma in every file. + + + // The Good Parts. + "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). + "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). + "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. + "curly" : false, // Require {} for every new block or scope. + "eqeqeq" : true, // Require triple equals i.e. `===`. + "eqnull" : true, // Tolerate use of `== null`. + "evil" : false, // Tolerate use of `eval`. + "expr" : false, // Tolerate `ExpressionStatement` as Programs. + "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` + "latedef" : false, // Prohibit variable use before definition. + "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. + "loopfunc" : false, // Allow functions to be defined within loops. + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. + "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`. + "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. + "scripturl" : false, // Tolerate script-targeted URLs. + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. + "undef" : false, // Require all non-global variables be declared before they are used. + + + // Personal styling prefrences. + "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. + "noempty" : true, // Prohipit use of empty blocks. + "nomen" : false, // Prohibit use of initial or trailing underbars in names. + "nonew" : true, // Prohibit use of constructors for side-effects. + "onevar" : false, // Allow only one `var` statement per function. + "plusplus" : false, // Prohibit use of `++` & `--`. + "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. + "trailing" : true, // Prohibit trailing whitespaces. + "white" : false // Check against strict whitespace and indentation rules. +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore new file mode 100644 index 00000000..1341acd9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore @@ -0,0 +1,30 @@ +# dumb files +# ========== + +.tmp* +.project +.settings/ +.livereload +.DS_Store? +ehthumbs.db +Icon? +Thumbs.db + + +# stuff not needed by node +# ======================== + +node_modules/ +tests/ +_build/ +doc_html/ +coverage/ + +# we keep the doc/ folder in case npm decides to display it in the future +# also good in case user is using an old version or working offline + +# we also keep the src/ folder in case the user still needs the AMD modules +# after build (see issue #102) + +bower.json +build.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml new file mode 100644 index 00000000..36de1532 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml @@ -0,0 +1,13 @@ + language: node_js + node_js: + - "0.8" + script: "npm test --coverage" + notifications: + irc: + channels: + - "irc.freenode.org#moutjs" + on_success: always + on_failure: always + use_notice: true + skip_join: true + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md new file mode 100644 index 00000000..0f5eac12 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md @@ -0,0 +1,93 @@ +mout changelog +============== + +v0.6.0 (2013/05/22) +------------------- + + - add optional delimeter to `string/unCamelCase` + - allow custom char on `number/pad` + - allow underscore characters in `string/removeNonWord` + - accept `level` on `array/flatten` instead of a flag + - convert underscores to camelCase in `string/camelCase` + - remove `create()` from number/currencyFormat + - add `date/dayOfTheYear` + - add `date/diff` + - add `date/isSame` + - add `date/startOf` + - add `date/strftime` + - add `date/timezoneAbbr` + - add `date/timezoneOffset` + - add `date/totalDaysInYear` + - add `date/weekOfTheYear` + - add `function/timeout` + - add `object/bindAll` + - add `object/functions` + - add `time/convert` + + +v0.5.0 (2013/04/04) +------------------- + + - add `array/collect` + - add `callback` parameter to `object/equals` and `object/deepEquals` to allow + custom compare operations. + - normalize behavior in `array/*` methods to treat `null` values as empty + arrays when reading from array + - add `date/parseIso` + - add `date/isLeapYear` + - add `date/totalDaysInMonth` + - add `object/deepMatches` + - change `function/makeIterator_` to use `deepMatches` (affects nearly all + iteration methods) + - add `thisObj` parameter to `array/min` and `array/max` + + +v0.4.0 (2013/02/26) +------------------- + + - add `object/equals` + - add `object/deepEquals` + - add `object/matches`. + - add `lang/is` and `lang/isnt`. + - add `lang/isInteger`. + - add `array/findIndex`. + - add shorthand syntax to `array/*`, `object/*` and `collection/*` methods. + - improve `number/sign` behavior when value is NaN or +0 or -0. + - improve `lang/isNaN` to actually check if value *is not a number* without + coercing value; so `[]`, `""`, `null` and `"12"` are considered NaN (#39). + - improve `string/contains` to match ES6 behavior (add fromIndex argument). + + +v0.3.0 (2013/02/01) +------------------- + + - add `lang/clone`. + - add `lang/toString`. + - add `string/replace`. + - add `string/WHITE_SPACES` + - rename `function/curry` to `function/partial`. + - allow custom chars in `string/trim`, `ltrim`, and `rtrim`. + - convert values to strings in the `string/*` functions. + + +v0.2.0 (2013/01/13) +------------------- + + - fix bug in `math/ceil` for negative radixes. + - change `object/deepFillIn` and `object/deepMixIn` to recurse only if both + existing and new values are plain objects. Will not recurse into arrays + or objects not created by the Object constructor. + - add `lang/isPlainObject` to check if a file is a valid object and is created + by the Object constructor + - change `lang/clone` behavior when dealing with custom types (avoid cloning + it by default) and add second argument to allow custom behavior if needed. + - rename `lang/clone` to `lang/deepClone`. + - add VERSION property to index.js + - simplify `math/floor`, `math/round`, `math/ceil` and `math/countSteps`. + + +v0.1.0 (2013/01/09) +------------------- + +- Rename project from "amd-utils" to "mout" + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md new file mode 100644 index 00000000..65d9add1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing + +Fork the repo at https://github.com/mout/mout + + > "Write clearly, don't be too clever" - The Elements of Programming Style + +Avoid unnamed functions and follow the other modules structure. By only using named functions it will be easier to extract the code from the AMD module if needed and it will also give better error messages, JavaScript minifiers like [Google Closure Compiler](http://code.google.com/closure/compiler/) and [UglifyJS](https://github.com/mishoo/UglifyJS) will make sure code is as small/optimized as possible. + + > "Make it clear before you make it faster." - The Elements of Programming Style + +Be sure to always create tests for each proposed module. Features will only be merged if they contain proper tests and documentation. + + > "Good code is its own best documentation." - Steve McConnell + +We should do a code review before merging to make sure names makes sense and implementation is as good as possible. + +Try to split your pull requests into logical groups, the smaller the easier to be reviewed/merged. + + + +## Tests & Code Coverage ## + +Tests can be found inside the `tests` folder, to execute them in the browser open the `tests/runner.html`. The same tests also work on node.js by running `npm test`. + +We should have tests for all methods and ensure we have a high code coverage through our continuous integration server ([travis](https://travis-ci.org/mout/mout)). When you ask for a pull request Travis will automatically run the tests on node.js and check the code coverage as well. + +We run `node build pkg` automatically before any `npm test`, so specs and packages should always be in sync. (will avoid human mistakes) + +To check code coverage run `npm test --coverage`, it will generate the reports inside the `coverage` folder and also log the results. Please note that node.js doesn't execute all code branches since we have some conditionals that are only met on old JavaScript engines (eg. IE 7-8), so we will never have 100% code coverage (but should be close to it). + + + +## Build Script ## + +The [build script](https://github.com/mout/mout/wiki/Build-Script) can be extremely helpful and can avoid human mistakes, use it. + + + +## Admins / Pull Requests ## + +Even if you are an admin (have commit rights) please do pull requests when adding new features or changing current behavior, that way we can review the work and discuss. Feel free to push changes that doesn't affect behavior without asking for a pull request (readme, changelog, build script, typos, refactoring, ...). + + + +## Large changes ## + +If you are proposing some major change, please create an issue to discuss it first. (maybe it's outside the scope of the project) + + + +## Questions / IRC / Wiki / Issue Tracker ## + +When in doubt ask someone on IRC to help you ([#moutjs on irc.freenode.net](http://webchat.freenode.net/?channels=moutjs)) or create a [new issue](http://github.com/mout/mout/issues). + +The [project wiki](https://github.com/mout/mout/wiki) can also be a good resource of information. + + +--- + +Check the [contributors list at github](https://github.com/mout/mout/contributors). + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md new file mode 100644 index 00000000..e9ccc2be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) +## Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/README.md new file mode 100644 index 00000000..872943bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/README.md @@ -0,0 +1,63 @@ +![mout](http://moutjs.com/logo.png "Modular JavaScript Utilties") + +http://moutjs.com/ + +[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout) + +All code is library agnostic and consist mostly of helper methods that aren't +directly related with the DOM, the purpose of this library isn't to replace +Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common +problems that aren't solved by most of them. Consider it as a crossbrowser +JavaScript standard library. + + + +## Main goals ## + + - increase code reuse; + - be clear (code should be clean/readable); + - be easy to debug; + - be easy to maintain; + - follow best practices; + - follow standards when possible; + - **don't convert JavaScript into another language!** + - be compatible with other frameworks; + - be modular; + - have unit tests for all modules; + - work on multiple environments (IE7+, modern browsers, node.js); + + + +## What shouldn't be here ## + + - UI components; + - CSS selector engine; + - Event system - pub/sub; + - Template engine; + - Anything that isn't generic enough to be on a standard library; + - Anything that could be a separate library and/or isn't a modular utility... + + + +## API Documentation ## + +Online documentation can be found at http://moutjs.com/ or inside the +`doc` folder. + + + +## FAQ / Wiki / IRC ## + +For more info about project structure, design decisions, tips, how to +contribute, build system, etc, please check the [project +wiki](https://github.com/mout/mout/wiki). + +We also have an IRC channel [#moutjs on +irc.freenode.net](http://webchat.freenode.net/?channels=moutjs) + + + +## License ## + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array.js new file mode 100644 index 00000000..89d388ba --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array.js @@ -0,0 +1,46 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'append' : require('./array/append'), + 'collect' : require('./array/collect'), + 'combine' : require('./array/combine'), + 'compact' : require('./array/compact'), + 'contains' : require('./array/contains'), + 'difference' : require('./array/difference'), + 'every' : require('./array/every'), + 'filter' : require('./array/filter'), + 'find' : require('./array/find'), + 'findIndex' : require('./array/findIndex'), + 'flatten' : require('./array/flatten'), + 'forEach' : require('./array/forEach'), + 'indexOf' : require('./array/indexOf'), + 'insert' : require('./array/insert'), + 'intersection' : require('./array/intersection'), + 'invoke' : require('./array/invoke'), + 'join' : require('./array/join'), + 'lastIndexOf' : require('./array/lastIndexOf'), + 'map' : require('./array/map'), + 'max' : require('./array/max'), + 'min' : require('./array/min'), + 'pick' : require('./array/pick'), + 'pluck' : require('./array/pluck'), + 'range' : require('./array/range'), + 'reduce' : require('./array/reduce'), + 'reduceRight' : require('./array/reduceRight'), + 'reject' : require('./array/reject'), + 'remove' : require('./array/remove'), + 'removeAll' : require('./array/removeAll'), + 'shuffle' : require('./array/shuffle'), + 'some' : require('./array/some'), + 'sort' : require('./array/sort'), + 'split' : require('./array/split'), + 'toLookup' : require('./array/toLookup'), + 'union' : require('./array/union'), + 'unique' : require('./array/unique'), + 'xor' : require('./array/xor'), + 'zip' : require('./array/zip') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js new file mode 100644 index 00000000..bf74037e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js @@ -0,0 +1,21 @@ + + + /** + * Appends an array to the end of another. + * The first array will be modified. + */ + function append(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var pad = arr1.length, + i = -1, + len = arr2.length; + while (++i < len) { + arr1[pad + i] = arr2[i]; + } + return arr1; + } + module.exports = append; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js new file mode 100644 index 00000000..58637493 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js @@ -0,0 +1,27 @@ +var append = require('./append'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Maps the items in the array and concatenates the result arrays. + */ + function collect(arr, callback, thisObj){ + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + var value = callback(arr[i], i, arr); + if (value != null) { + append(results, value); + } + } + + return results; + } + + module.exports = collect; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js new file mode 100644 index 00000000..d66e6212 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js @@ -0,0 +1,22 @@ +var indexOf = require('./indexOf'); + + /** + * Combines an array with all the items of another. + * Does not allow duplicates and is case and type sensitive. + */ + function combine(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var i = -1, len = arr2.length; + while (++i < len) { + if (indexOf(arr1, arr2[i]) === -1) { + arr1.push(arr2[i]); + } + } + + return arr1; + } + module.exports = combine; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js new file mode 100644 index 00000000..74c176ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js @@ -0,0 +1,13 @@ +var filter = require('./filter'); + + /** + * Remove all null/undefined items from array. + */ + function compact(arr) { + return filter(arr, function(val){ + return (val != null); + }); + } + + module.exports = compact; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js new file mode 100644 index 00000000..92bb6ad9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js @@ -0,0 +1,10 @@ +var indexOf = require('./indexOf'); + + /** + * If array contains values. + */ + function contains(arr, val) { + return indexOf(arr, val) !== -1; + } + module.exports = contains; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js new file mode 100644 index 00000000..d0570510 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js @@ -0,0 +1,22 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var some = require('./some'); +var contains = require('./contains'); + + + /** + * Return a new Array with elements that aren't present in the other Arrays. + */ + function difference(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return !some(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + module.exports = difference; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js new file mode 100644 index 00000000..ac598832 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js @@ -0,0 +1,27 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Array every + */ + function every(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (!callback(arr[i], i, arr) ) { + result = false; + break; + } + } + + return result; + } + + module.exports = every; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js new file mode 100644 index 00000000..ebeb58dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js @@ -0,0 +1,27 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array filter + */ + function filter(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + module.exports = filter; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js new file mode 100644 index 00000000..b4a73131 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js @@ -0,0 +1,13 @@ +var findIndex = require('./findIndex'); + + /** + * Returns first item that matches criteria + */ + function find(arr, iterator, thisObj){ + var idx = findIndex(arr, iterator, thisObj); + return idx >= 0? arr[idx] : void(0); + } + + module.exports = find; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js new file mode 100644 index 00000000..53f22a5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js @@ -0,0 +1,23 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Returns the index of the first item that matches criteria + */ + function findIndex(arr, iterator, thisObj){ + iterator = makeIterator(iterator, thisObj); + if (arr == null) { + return -1; + } + + var i = -1, len = arr.length; + while (++i < len) { + if (iterator(arr[i], i, arr)) { + return i; + } + } + + return -1; + } + + module.exports = findIndex; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js new file mode 100644 index 00000000..aa9757ab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js @@ -0,0 +1,43 @@ +var isArray = require('../lang/isArray'); +var append = require('./append'); + + /* + * Helper function to flatten to a destination array. + * Used to remove the need to create intermediate arrays while flattening. + */ + function flattenTo(arr, result, level) { + if (arr == null) { + return result; + } else if (level === 0) { + append(result, arr); + return result; + } + + var value, + i = -1, + len = arr.length; + while (++i < len) { + value = arr[i]; + if (isArray(value)) { + flattenTo(value, result, level - 1); + } else { + result.push(value); + } + } + return result; + } + + /** + * Recursively flattens an array. + * A new array containing all the elements is returned. + * If `shallow` is true, it will only flatten one level. + */ + function flatten(arr, level) { + level = level == null? -1 : level; + return flattenTo(arr, [], level); + } + + module.exports = flatten; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js new file mode 100644 index 00000000..268e506f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js @@ -0,0 +1,23 @@ + + + /** + * Array forEach + */ + function forEach(arr, callback, thisObj) { + if (arr == null) { + return; + } + var i = -1, + len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback.call(thisObj, arr[i], i, arr) === false ) { + break; + } + } + } + + module.exports = forEach; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js new file mode 100644 index 00000000..6a9ac832 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js @@ -0,0 +1,28 @@ + + + /** + * Array.indexOf + */ + function indexOf(arr, item, fromIndex) { + fromIndex = fromIndex || 0; + if (arr == null) { + return -1; + } + + var len = arr.length, + i = fromIndex < 0 ? len + fromIndex : fromIndex; + while (i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[i] === item) { + return i; + } + + i++; + } + + return -1; + } + + module.exports = indexOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js new file mode 100644 index 00000000..f1f95b75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js @@ -0,0 +1,15 @@ +var difference = require('./difference'); +var toArray = require('../lang/toArray'); + + /** + * Insert item into array if not already present. + */ + function insert(arr, rest_items) { + var diff = difference(toArray(arguments).slice(1), arr); + if (diff.length) { + Array.prototype.push.apply(arr, diff); + } + return arr.length; + } + module.exports = insert; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js new file mode 100644 index 00000000..e6170062 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js @@ -0,0 +1,23 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var every = require('./every'); +var contains = require('./contains'); + + + /** + * Return a new Array with elements common to all Arrays. + * - based on underscore.js implementation + */ + function intersection(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return every(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + module.exports = intersection; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js new file mode 100644 index 00000000..c01aab1b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); + + /** + * Call `methodName` on each item of the array passing custom arguments if + * needed. + */ + function invoke(arr, methodName, var_args){ + if (arr == null) { + return arr; + } + + var args = Array.prototype.slice.call(arguments, 2); + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + value[methodName].apply(value, args); + } + + return arr; + } + + module.exports = invoke; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js new file mode 100644 index 00000000..71d8bd20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js @@ -0,0 +1,17 @@ +var filter = require('./filter'); + + function isValidString(val) { + return (val != null && val !== ''); + } + + /** + * Joins strings with the specified separator inserted between each value. + * Null values and empty strings will be excluded. + */ + function join(items, separator) { + separator = separator || ''; + return filter(items, isValidString).join(separator); + } + + module.exports = join; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js new file mode 100644 index 00000000..ee44a25b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js @@ -0,0 +1,28 @@ + + + /** + * Array lastIndexOf + */ + function lastIndexOf(arr, item, fromIndex) { + if (arr == null) { + return -1; + } + + var len = arr.length; + fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; + fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; + + while (fromIndex >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[fromIndex] === item) { + return fromIndex; + } + fromIndex--; + } + + return -1; + } + + module.exports = lastIndexOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js new file mode 100644 index 00000000..54064f6b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array map + */ + function map(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null){ + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + results[i] = callback(arr[i], i, arr); + } + + return results; + } + + module.exports = map; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js new file mode 100644 index 00000000..183b10ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js @@ -0,0 +1,35 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Return maximum value inside array + */ + function max(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return Infinity; + } else if (arr.length && !iterator) { + return Math.max.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = -Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp > compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + module.exports = max; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js new file mode 100644 index 00000000..dd00b6cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js @@ -0,0 +1,35 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Return minimum value inside array + */ + function min(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return -Infinity; + } else if (arr.length && !iterator) { + return Math.min.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp < compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + module.exports = min; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js new file mode 100644 index 00000000..6a54846c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js @@ -0,0 +1,14 @@ +var randInt = require('../random/randInt'); + + /** + * Remove a random item from the Array and return it + */ + function pick(arr){ + if (arr == null || !arr.length) return; + var idx = randInt(0, arr.length - 1); + return arr.splice(idx, 1)[0]; + } + + module.exports = pick; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js new file mode 100644 index 00000000..fef4043b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js @@ -0,0 +1,12 @@ +var map = require('./map'); + + /** + * Extract a list of property values. + */ + function pluck(arr, propName){ + return map(arr, propName); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js new file mode 100644 index 00000000..31d3c770 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js @@ -0,0 +1,27 @@ +var countSteps = require('../math/countSteps'); + + /** + * Returns an Array of numbers inside range. + */ + function range(start, stop, step) { + if (stop == null) { + stop = start; + start = 0; + } + step = step || 1; + + var result = [], + nSteps = countSteps(stop - start, step), + i = start; + + while (i <= stop) { + result.push(i); + i += step; + } + + return result; + } + + module.exports = range; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js new file mode 100644 index 00000000..1a350c6e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js @@ -0,0 +1,33 @@ +var forEach = require('./forEach'); + + /** + * Array reduce + */ + function reduce(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2, + result = initVal; + + if (arr == null || !arr.length) { + if (!hasInit) { + throw new Error('reduce of empty array with no initial value'); + } else { + return initVal; + } + } + + var i = -1, len = arr.length; + while (++i < len) { + if (!hasInit) { + result = arr[i]; + hasInit = true; + } else { + result = fn(result, arr[i], i, arr); + } + } + + return result; + } + + module.exports = reduce; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js new file mode 100644 index 00000000..e36fd4aa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js @@ -0,0 +1,34 @@ + + + /** + * Array reduceRight + */ + function reduceRight(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2; + + if (arr == null || !arr.length) { + if (hasInit) { + return initVal; + } else { + throw new Error('reduce of empty array with no initial value'); + } + } + + var i = arr.length, result = initVal, value; + while (--i >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + value = arr[i]; + if (!hasInit) { + result = value; + hasInit = true; + } else { + result = fn(result, value, i, arr); + } + } + return result; + } + + module.exports = reduceRight; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js new file mode 100644 index 00000000..685f2918 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js @@ -0,0 +1,26 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Array reject + */ + function reject(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (!callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + module.exports = reject; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js new file mode 100644 index 00000000..aa6517db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js @@ -0,0 +1,13 @@ +var indexOf = require('./indexOf'); + + /** + * Remove a single item from the array. + * (it won't remove duplicates, just a single item) + */ + function remove(arr, item){ + var idx = indexOf(arr, item); + if (idx !== -1) arr.splice(idx, 1); + } + + module.exports = remove; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js new file mode 100644 index 00000000..d5f7f3b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js @@ -0,0 +1,15 @@ +var indexOf = require('./indexOf'); + + /** + * Remove all instances of an item from array. + */ + function removeAll(arr, item){ + var idx = indexOf(arr, item); + while (idx !== -1) { + arr.splice(idx, 1); + idx = indexOf(arr, item, idx); + } + } + + module.exports = removeAll; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js new file mode 100644 index 00000000..97805ec8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js @@ -0,0 +1,29 @@ +var randInt = require('../random/randInt'); +var forEach = require('./forEach'); + + /** + * Shuffle array items. + */ + function shuffle(arr) { + var results = [], + rnd; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + if (!i) { + results[0] = arr[0]; + } else { + rnd = randInt(0, i); + results[i] = results[rnd]; + results[rnd] = arr[i]; + } + } + + return results; + } + + module.exports = shuffle; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js new file mode 100644 index 00000000..8d17772b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js @@ -0,0 +1,27 @@ +var makeIterator = require('../function/makeIterator_'); + + /** + * Array some + */ + function some(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback(arr[i], i, arr) ) { + result = true; + break; + } + } + + return result; + } + + module.exports = some; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js new file mode 100644 index 00000000..7807339b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js @@ -0,0 +1,55 @@ + + + /** + * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) + */ + function mergeSort(arr, compareFn) { + if (arr == null) { + return []; + } else if (arr.length < 2) { + return arr; + } + + if (compareFn == null) { + compareFn = defaultCompare; + } + + var mid, left, right; + + mid = ~~(arr.length / 2); + left = mergeSort( arr.slice(0, mid), compareFn ); + right = mergeSort( arr.slice(mid, arr.length), compareFn ); + + return merge(left, right, compareFn); + } + + function defaultCompare(a, b) { + return a < b ? -1 : (a > b? 1 : 0); + } + + function merge(left, right, compareFn) { + var result = []; + + while (left.length && right.length) { + if (compareFn(left[0], right[0]) <= 0) { + // if 0 it should preserve same order (stable) + result.push(left.shift()); + } else { + result.push(right.shift()); + } + } + + if (left.length) { + result.push.apply(result, left); + } + + if (right.length) { + result.push.apply(result, right); + } + + return result; + } + + module.exports = mergeSort; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js new file mode 100644 index 00000000..4f3ba50c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js @@ -0,0 +1,35 @@ + + + /** + * Split array into a fixed number of segments. + */ + function split(array, segments) { + segments = segments || 2; + var results = []; + if (array == null) { + return results; + } + + var minLength = Math.floor(array.length / segments), + remainder = array.length % segments, + i = 0, + len = array.length, + segmentIndex = 0, + segmentLength; + + while (i < len) { + segmentLength = minLength; + if (segmentIndex < remainder) { + segmentLength++; + } + + results.push(array.slice(i, i + segmentLength)); + + segmentIndex++; + i += segmentLength; + } + + return results; + } + module.exports = split; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js new file mode 100644 index 00000000..ce4c55dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js @@ -0,0 +1,28 @@ +var isFunction = require('../lang/isFunction'); + + /** + * Creates an object that holds a lookup for the objects in the array. + */ + function toLookup(arr, key) { + var result = {}; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length, value; + if (isFunction(key)) { + while (++i < len) { + value = arr[i]; + result[key(value)] = value; + } + } else { + while (++i < len) { + value = arr[i]; + result[value[key]] = value; + } + } + + return result; + } + module.exports = toLookup; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js new file mode 100644 index 00000000..f1334a91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js @@ -0,0 +1,19 @@ +var unique = require('./unique'); +var append = require('./append'); + + /** + * Concat multiple arrays and remove duplicates + */ + function union(arrs) { + var results = []; + var i = -1, len = arguments.length; + while (++i < len) { + append(results, arguments[i]); + } + + return unique(results); + } + + module.exports = union; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js new file mode 100644 index 00000000..0192b2df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js @@ -0,0 +1,17 @@ +var indexOf = require('./indexOf'); +var filter = require('./filter'); + + /** + * @return {array} Array of unique items + */ + function unique(arr){ + return filter(arr, isUnique); + } + + function isUnique(item, i, arr){ + return indexOf(arr, item, i+1) === -1; + } + + module.exports = unique; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js new file mode 100644 index 00000000..c125a996 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js @@ -0,0 +1,26 @@ +var unique = require('./unique'); +var filter = require('./filter'); +var contains = require('./contains'); + + + /** + * Exclusive OR. Returns items that are present in a single array. + * - like ptyhon's `symmetric_difference` + */ + function xor(arr1, arr2) { + arr1 = unique(arr1); + arr2 = unique(arr2); + + var a1 = filter(arr1, function(item){ + return !contains(arr2, item); + }), + a2 = filter(arr2, function(item){ + return !contains(arr1, item); + }); + + return a1.concat(a2); + } + + module.exports = xor; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js new file mode 100644 index 00000000..931eb818 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js @@ -0,0 +1,29 @@ +var max = require('./max'); +var pluck = require('./pluck'); +var map = require('./map'); + + function getLength(arr) { + return arr == null ? 0 : arr.length; + } + + /** + * Merges together the values of each of the arrays with the values at the + * corresponding position. + */ + function zip(arr){ + var len = arr ? max(map(arguments, getLength)) : 0, + results = [], + i = -1, + item; + while (++i < len) { + results.push(map(arguments, function(item) { + return item == null ? undefined : item[i]; + })); + } + + return results; + } + + module.exports = zip; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection.js new file mode 100644 index 00000000..d5cf6cad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection.js @@ -0,0 +1,22 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'contains' : require('./collection/contains'), + 'every' : require('./collection/every'), + 'filter' : require('./collection/filter'), + 'find' : require('./collection/find'), + 'forEach' : require('./collection/forEach'), + 'make_' : require('./collection/make_'), + 'map' : require('./collection/map'), + 'max' : require('./collection/max'), + 'min' : require('./collection/min'), + 'pluck' : require('./collection/pluck'), + 'reduce' : require('./collection/reduce'), + 'reject' : require('./collection/reject'), + 'size' : require('./collection/size'), + 'some' : require('./collection/some') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js new file mode 100644 index 00000000..a73f994b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrContains = require('../array/contains'); +var objContains = require('../object/contains'); + + /** + */ + module.exports = make(arrContains, objContains); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js new file mode 100644 index 00000000..300e03c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrEvery = require('../array/every'); +var objEvery = require('../object/every'); + + /** + */ + module.exports = make(arrEvery, objEvery); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js new file mode 100644 index 00000000..38757005 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js @@ -0,0 +1,23 @@ +var forEach = require('./forEach'); +var makeIterator = require('../function/makeIterator_'); + + /** + * filter collection values, returns array. + */ + function filter(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + var results = []; + if (!list) { + return results; + } + forEach(list, function(value, index, list) { + if (iterator(value, index, list)) { + results[results.length] = value; + } + }); + return results; + } + + module.exports = filter; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js new file mode 100644 index 00000000..14317e64 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrFind = require('../array/find'); +var objFind = require('../object/find'); + + /** + * Find value that returns true on iterator check. + */ + module.exports = make(arrFind, objFind); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js new file mode 100644 index 00000000..6e28dcb1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrForEach = require('../array/forEach'); +var objForEach = require('../object/forOwn'); + + /** + */ + module.exports = make(arrForEach, objForEach); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js new file mode 100644 index 00000000..029d27bf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js @@ -0,0 +1,19 @@ + + + /** + * internal method used to create other collection modules. + */ + function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { + return function(){ + var args = Array.prototype.slice.call(arguments); + if (args[0] == null) { + return defaultReturn; + } + // array-like is treated as array + return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); + }; + } + + module.exports = makeCollectionMethod; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js new file mode 100644 index 00000000..fc157f53 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js @@ -0,0 +1,23 @@ +var isObject = require('../lang/isObject'); +var values = require('../object/values'); +var arrMap = require('../array/map'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Map collection values, returns Array. + */ + function map(list, callback, thisObj) { + callback = makeIterator(callback, thisObj); + // list.length to check array-like object, if not array-like + // we simply map all the object values + if( isObject(list) && list.length == null ){ + list = values(list); + } + return arrMap(list, function (val, key, list) { + return callback(val, key, list); + }); + } + + module.exports = map; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js new file mode 100644 index 00000000..a8490e7e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrMax = require('../array/max'); +var objMax = require('../object/max'); + + /** + * Get maximum value inside collection + */ + module.exports = make(arrMax, objMax); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js new file mode 100644 index 00000000..51d9f148 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js @@ -0,0 +1,10 @@ +var make = require('./make_'); +var arrMin = require('../array/min'); +var objMin = require('../object/min'); + + /** + * Get minimum value inside collection. + */ + module.exports = make(arrMin, objMin); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js new file mode 100644 index 00000000..9b283776 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js @@ -0,0 +1,14 @@ +var map = require('./map'); + + /** + * Extract a list of property values. + */ + function pluck(list, key) { + return map(list, function(value) { + return value[key]; + }); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js new file mode 100644 index 00000000..4c075735 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrReduce = require('../array/reduce'); +var objReduce = require('../object/reduce'); + + /** + */ + module.exports = make(arrReduce, objReduce); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js new file mode 100644 index 00000000..2a92e3b3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js @@ -0,0 +1,16 @@ +var filter = require('./filter'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Inverse or collection/filter + */ + function reject(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + return filter(list, function(value, index, list) { + return !iterator(value, index, list); + }, thisObj); + } + + module.exports = reject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js new file mode 100644 index 00000000..244e33e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js @@ -0,0 +1,19 @@ +var isArray = require('../lang/isArray'); +var objSize = require('../object/size'); + + /** + * Get collection size + */ + function size(list) { + if (!list) { + return 0; + } + if (isArray(list)) { + return list.length; + } + return objSize(list); + } + + module.exports = size; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js new file mode 100644 index 00000000..48fd252e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js @@ -0,0 +1,9 @@ +var make = require('./make_'); +var arrSome = require('../array/some'); +var objSome = require('../object/some'); + + /** + */ + module.exports = make(arrSome, objSome); + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date.js new file mode 100644 index 00000000..1cde1a95 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date.js @@ -0,0 +1,21 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'dayOfTheYear' : require('./date/dayOfTheYear'), + 'diff' : require('./date/diff'), + 'i18n_' : require('./date/i18n_'), + 'isLeapYear' : require('./date/isLeapYear'), + 'isSame' : require('./date/isSame'), + 'parseIso' : require('./date/parseIso'), + 'startOf' : require('./date/startOf'), + 'strftime' : require('./date/strftime'), + 'timezoneAbbr' : require('./date/timezoneAbbr'), + 'timezoneOffset' : require('./date/timezoneOffset'), + 'totalDaysInMonth' : require('./date/totalDaysInMonth'), + 'totalDaysInYear' : require('./date/totalDaysInYear'), + 'weekOfTheYear' : require('./date/weekOfTheYear') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js new file mode 100644 index 00000000..85905c5a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js @@ -0,0 +1,13 @@ +var isDate = require('../lang/isDate'); + + /** + * return the day of the year (1..366) + */ + function dayOfTheYear(date){ + return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - + Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; + } + + module.exports = dayOfTheYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js new file mode 100644 index 00000000..1131cdcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js @@ -0,0 +1,130 @@ +var totalDaysInMonth = require('./totalDaysInMonth'); +var totalDaysInYear = require('./totalDaysInYear'); +var convert = require('../time/convert'); + + /** + * calculate the difference between dates (range) + */ + function diff(start, end, unitName){ + // sort the dates to make it easier to process (specially year/month) + if (start > end) { + var swap = start; + start = end; + end = swap; + } + + var output; + + if (unitName === 'month') { + output = getMonthsDiff(start, end); + } else if (unitName === 'year'){ + output = getYearsDiff(start, end); + } else if (unitName != null) { + if (unitName === 'day') { + // ignore timezone difference because of daylight savings time + start = toUtc(start); + end = toUtc(end); + } + output = convert(end - start, 'ms', unitName); + } else { + output = end - start; + } + + return output; + } + + + function toUtc(d){ + // we ignore timezone differences on purpose because of daylight + // savings time, otherwise it would return fractional days/weeks even + // if a full day elapsed. eg: + // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) + // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) + // diff should be 4 days and not 4.041666666666667 + return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getHours(), d.getMinutes(), d.getSeconds(), + d.getMilliseconds()); + } + + + function getMonthsDiff(start, end){ + return getElapsedMonths(start, end) + + getElapsedYears(start, end) * 12 + + getFractionalMonth(start, end); + } + + + function getYearsDiff(start, end){ + var elapsedYears = getElapsedYears(start, end); + return elapsedYears + getFractionalYear(start, end, elapsedYears); + } + + + function getElapsedMonths(start, end){ + var monthDiff = end.getMonth() - start.getMonth(); + if (monthDiff < 0) { + monthDiff += 12; + } + // less than a full month + if (start.getDate() > end.getDate()) { + monthDiff -= 1; + } + return monthDiff; + } + + + function getElapsedYears(start, end){ + var yearDiff = end.getFullYear() - start.getFullYear(); + // less than a full year + if (start.getMonth() > end.getMonth()) { + yearDiff -= 1; + } + return yearDiff; + } + + + function getFractionalMonth(start, end){ + var fractionalDiff = 0; + var startDay = start.getDate(); + var endDay = end.getDate(); + + if (startDay !== endDay) { + var startTotalDays = totalDaysInMonth(start); + var endTotalDays = totalDaysInMonth(end); + var totalDays; + var daysElapsed; + + if (startDay > endDay) { + // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) + var baseDay = startTotalDays - startDay; + daysElapsed = endDay + baseDay; + // total days should be relative to 1st day of next month if + // startDay > endTotalDays + totalDays = (startDay > endTotalDays)? + endTotalDays + baseDay + 1 : startDay + baseDay; + } else { + // fractional is only based on endMonth eg: Jan 12 - Feb 18 + // (6 fractional days, 28 days until next full month) + daysElapsed = endDay - startDay; + totalDays = endTotalDays; + } + + fractionalDiff = daysElapsed / totalDays; + } + + return fractionalDiff; + } + + + function getFractionalYear(start, end, elapsedYears){ + var base = elapsedYears? + new Date(end.getFullYear(), start.getMonth(), start.getDate()) : + start; + var elapsedDays = diff(base, end, 'day'); + return elapsedDays / totalDaysInYear(end); + } + + + module.exports = diff; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js new file mode 100644 index 00000000..f9526ce4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js @@ -0,0 +1,61 @@ + + // en-US (English, United States) + module.exports = { + "am" : "AM", + "pm" : "PM", + + "x": "%m/%d/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %I:%M:%S %p %Z", + + "months" : [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + + "months_abbr" : [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + + "days" : [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + + "days_abbr" : [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ] + }; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js new file mode 100644 index 00000000..71ebadb5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js @@ -0,0 +1,61 @@ + + // pt-BR (Brazillian Portuguese) + module.exports = { + "am" : "", + "pm" : "", + + "x": "%d/%m/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %H:%M:%S %Z", + + "months" : [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + + "months_abbr" : [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Out", + "Nov", + "Dez" + ], + + "days" : [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" + ], + + "days_abbr" : [ + "Dom", + "Seg", + "Ter", + "Qua", + "Qui", + "Sex", + "Sáb" + ] + }; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js new file mode 100644 index 00000000..723fc103 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js @@ -0,0 +1,14 @@ +var mixIn = require('../object/mixIn'); +var enUS = require('./i18n/en-US'); + + // we also use mixIn to make sure we don't affect the original locale + var activeLocale = mixIn({}, enUS, { + // we expose a "set" method to allow overriding the global locale + set : function(localeData){ + mixIn(activeLocale, localeData); + } + }); + + module.exports = activeLocale; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js new file mode 100644 index 00000000..4212870b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js @@ -0,0 +1,15 @@ +var isDate = require('../lang/isDate'); + + /** + * checks if it's a leap year + */ + function isLeapYear(fullYear){ + if (isDate(fullYear)) { + fullYear = fullYear.getFullYear(); + } + return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); + } + + module.exports = isLeapYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js new file mode 100644 index 00000000..4097d29b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js @@ -0,0 +1,16 @@ +var startOf = require('./startOf'); + + /** + * Check if date is "same" with optional period + */ + function isSame(date1, date2, period){ + if (period) { + date1 = startOf(date1, period); + date2 = startOf(date2, period); + } + return Number(date1) === Number(date2); + } + + module.exports = isSame; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js new file mode 100644 index 00000000..8ea2b171 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js @@ -0,0 +1,146 @@ +var some = require('../array/some'); + + var datePatterns = [ + /^([0-9]{4})$/, // YYYY + /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) + /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD + ]; + var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD + + var timePatterns = [ + /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh + /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm + /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss + ]; + + var DATE_TIME = /^(.+)T(.+)$/; + var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; + + function matchAll(str, patterns) { + var match; + var found = some(patterns, function(pattern) { + return !!(match = pattern.exec(str)); + }); + + return found ? match : null; + } + + function getDate(year, month, day) { + var date = new Date(Date.UTC(year, month, day)); + + // Explicitly set year to avoid Date.UTC making dates < 100 relative to + // 1900 + date.setUTCFullYear(year); + + var valid = + date.getUTCFullYear() === year && + date.getUTCMonth() === month && + date.getUTCDate() === day; + return valid ? +date : NaN; + } + + function parseOrdinalDate(str) { + var match = ORD_DATE.exec(str); + if (match ) { + var year = +match[1], + day = +match[2], + date = new Date(Date.UTC(year, 0, day)); + + if (date.getUTCFullYear() === year) { + return +date; + } + } + + return NaN; + } + + function parseDate(str) { + var match, year, month, day; + + var match = matchAll(str, datePatterns); + if (match === null) { + // Ordinal dates are verified differently. + return parseOrdinalDate(str); + } + + year = (match[1] === void 0) ? 0 : +match[1]; + month = (match[2] === void 0) ? 0 : +match[2] - 1; + day = (match[3] === void 0) ? 1 : +match[3]; + + return getDate(year, month, day); + } + + function getTime(hr, min, sec) { + var valid = + (hr < 24 && hr >= 0 && + min < 60 && min >= 0 && + sec < 60 && min >= 0) || + (hr === 24 && min === 0 && sec === 0); + if (!valid) { + return NaN; + } + + return ((hr * 60 + min) * 60 + sec) * 1000; + } + + function parseOffset(str) { + var match; + if (str.charAt(str.length - 1) === 'Z') { + str = str.substring(0, str.length - 1); + } else if ((match = TIME_ZONE.exec(str))) { + var match = TIME_ZONE.exec(str); + if (match) { + var hours = +match[3], + minutes = (match[4] === void 0) ? 0 : +match[4], + offset = getTime(hours, minutes, 0); + + if (match[2] === '-') { + offset *= -1; + } + + return { offset: offset, time: match[1] }; + } + } + + // No time zone specified, assume UTC + return { offset: 0, time: str }; + } + + function parseTime(str) { + var match; + var offset = parseOffset(str); + + str = offset.time; + offset = offset.offset; + if (isNaN(offset)) { + return NaN; + } + + match = matchAll(str, timePatterns); + if (match === null) { + return NaN; + } + + var hours = (match[1] === void 0) ? 0 : +match[1], + minutes = (match[2] === void 0) ? 0 : +match[2], + seconds = (match[3] === void 0) ? 0 : +match[3]; + + return getTime(hours, minutes, seconds) - offset; + } + + /** + * Parse an ISO8601 formatted date string, and return a Date object. + */ + function parseISO8601(str){ + var match = DATE_TIME.exec(str); + if (!match) { + // No time specified + return parseDate(str); + } + + return parseDate(match[1]) + parseTime(match[2]); + } + + module.exports = parseISO8601; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js new file mode 100644 index 00000000..072bc0ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js @@ -0,0 +1,54 @@ +var clone = require('../lang/clone'); + + /** + * get a new Date object representing start of period + */ + function startOf(date, period){ + date = clone(date); + + // intentionally removed "break" from switch since start of + // month/year/etc should also reset the following periods + switch (period) { + case 'year': + date.setMonth(0); + /* falls through */ + case 'month': + date.setDate(1); + /* falls through */ + case 'week': + case 'day': + date.setHours(0); + /* falls through */ + case 'hour': + date.setMinutes(0); + /* falls through */ + case 'minute': + date.setSeconds(0); + /* falls through */ + case 'second': + date.setMilliseconds(0); + break; + default: + throw new Error('"'+ period +'" is not a valid period'); + } + + // week is the only case that should reset the weekDay and maybe even + // overflow to previous month + if (period === 'week') { + var weekDay = date.getDay(); + var baseDate = date.getDate(); + if (weekDay) { + if (weekDay >= baseDate) { + //start of the week is on previous month + date.setDate(0); + } + date.setDate(date.getDate() - date.getDay()); + } + } + + return date; + } + + module.exports = startOf; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js new file mode 100644 index 00000000..f033d10f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js @@ -0,0 +1,118 @@ +var pad = require('../number/pad'); +var i18n = require('./i18n_'); +var dayOfTheYear = require('./dayOfTheYear'); +var timezoneOffset = require('./timezoneOffset'); +var timezoneAbbr = require('./timezoneAbbr'); +var weekOfTheYear = require('./weekOfTheYear'); + + var _combinations = { + 'D': '%m/%d/%y', + 'F': '%Y-%m-%d', + 'r': '%I:%M:%S %p', + 'R': '%H:%M', + 'T': '%H:%M:%S', + 'x': 'locale', + 'X': 'locale', + 'c': 'locale' + }; + + + /** + * format date based on strftime format + */ + function strftime(date, format, localeData){ + localeData = localeData || i18n; + var reToken = /%([a-z%])/gi; + + function makeIterator(fn) { + return function(match, token){ + return fn(date, token, localeData); + }; + } + + return format + .replace(reToken, makeIterator(expandCombinations)) + .replace(reToken, makeIterator(convertToken)); + } + + + function expandCombinations(date, token, l10n){ + if (token in _combinations) { + var expanded = _combinations[token]; + return expanded === 'locale'? l10n[token] : expanded; + } else { + return '%'+ token; + } + } + + + function convertToken(date, token, l10n){ + switch (token){ + case 'a': + return l10n.days_abbr[date.getDay()]; + case 'A': + return l10n.days[date.getDay()]; + case 'h': + case 'b': + return l10n.months_abbr[date.getMonth()]; + case 'B': + return l10n.months[date.getMonth()]; + case 'C': + return pad(Math.floor(date.getFullYear() / 100), 2); + case 'd': + return pad(date.getDate(), 2); + case 'e': + return pad(date.getDate(), 2, ' '); + case 'H': + return pad(date.getHours(), 2); + case 'I': + return pad(date.getHours() % 12, 2); + case 'j': + return pad(dayOfTheYear(date), 3); + case 'L': + return pad(date.getMilliseconds(), 3); + case 'm': + return pad(date.getMonth() + 1, 2); + case 'M': + return pad(date.getMinutes(), 2); + case 'n': + return '\n'; + case 'p': + return date.getHours() >= 12? l10n.pm : l10n.am; + case 'P': + return convertToken(date, 'p', l10n).toLowerCase(); + case 's': + return date.getTime() / 1000; + case 'S': + return pad(date.getSeconds(), 2); + case 't': + return '\t'; + case 'u': + var day = date.getDay(); + return day === 0? 7 : day; + case 'U': + return pad(weekOfTheYear(date), 2); + case 'w': + return date.getDay(); + case 'W': + return pad(weekOfTheYear(date, 1), 2); + case 'y': + return pad(date.getFullYear() % 100, 2); + case 'Y': + return pad(date.getFullYear(), 4); + case 'z': + return timezoneOffset(date); + case 'Z': + return timezoneAbbr(date); + case '%': + return '%'; + default: + // keep unrecognized tokens + return '%'+ token; + } + } + + + module.exports = strftime; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js new file mode 100644 index 00000000..b1006875 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js @@ -0,0 +1,17 @@ +var timezoneOffset = require('./timezoneOffset'); + + /** + * Abbreviated time zone name or similar information. + */ + function timezoneAbbr(date){ + // Date.toString gives different results depending on the + // browser/system so we fallback to timezone offset + // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' + // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' + var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); + return tz? tz[1] : timezoneOffset(date); + } + + module.exports = timezoneAbbr; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js new file mode 100644 index 00000000..9492dceb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js @@ -0,0 +1,16 @@ +var pad = require('../number/pad'); + + /** + * time zone as hour and minute offset from UTC (e.g. +0900) + */ + function timezoneOffset(date){ + var offset = date.getTimezoneOffset(); + var abs = Math.abs(offset); + var h = pad(Math.floor(abs / 60), 2); + var m = pad(abs % 60, 2); + return (offset > 0? '-' : '+') + h + m; + } + + module.exports = timezoneOffset; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js new file mode 100644 index 00000000..8aafeb84 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js @@ -0,0 +1,25 @@ +var isDate = require('../lang/isDate'); +var isLeapYear = require('./isLeapYear'); + + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + + /** + * returns the total amount of days in the month (considering leap years) + */ + function totalDaysInMonth(fullYear, monthIndex){ + if (isDate(fullYear)) { + var date = fullYear; + year = date.getFullYear(); + monthIndex = date.getMonth(); + } + + if (monthIndex === 1 && isLeapYear(fullYear)) { + return 29; + } else { + return DAYS_IN_MONTH[monthIndex]; + } + } + + module.exports = totalDaysInMonth; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js new file mode 100644 index 00000000..b4b7e9b7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js @@ -0,0 +1,13 @@ +var isLeapYear = require('./isLeapYear'); + + /** + * return the amount of days in the year following the gregorian calendar + * and leap years + */ + function totalDaysInYear(fullYear){ + return isLeapYear(fullYear)? 366 : 365; + } + + module.exports = totalDaysInYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js new file mode 100644 index 00000000..dd51b7f1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js @@ -0,0 +1,16 @@ +var dayOfTheYear = require('./dayOfTheYear'); + + /** + * Return the week of the year based on given firstDayOfWeek + */ + function weekOfTheYear(date, firstDayOfWeek){ + firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; + var doy = dayOfTheYear(date); + var dow = (7 + date.getDay() - firstDayOfWeek) % 7; + var relativeWeekDay = 6 - firstDayOfWeek - dow; + return Math.floor((doy + relativeWeekDay) / 7); + } + + module.exports = weekOfTheYear; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md new file mode 100644 index 00000000..1f390fbc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md @@ -0,0 +1,773 @@ +# array # + +Array utilities. + + + + +## append(arr1, arr2):Array + +Appends an array to the end of the other. +The first array will be modified and will contain the appended items. + +See: [`union()`](#union), [`combine()`](#combine) + +```js +var foo = ['a', 'b'], + bar = ['b', 'd']; + +append(foo, bar); // ['a', 'b', 'b', 'd'] +``` + + + +## collect(arr, callback, [thisObj]):Array + +Maps the items in `arr` and concatenates the resulting arrays. + +See: [`map()`](#map) + +```js +collect([1, 2, 3], function(val) { + return [val, val % 2]; +}); // [1, 1, 2, 0, 3, 1]; + +collect(['a', 'bb', ''], function(val) { + return val.split(''); +}); // ['a', 'b', 'b'] +``` + +It also supports a shorthand syntax: + +```js +var items = [{ a: [1] }, { b: 'foo' }, { a: [2, 3] }]; +collect(items, 'a'); // [1, 2, 3]; +``` + + + +## combine(arr1, arr2):Array + +Combines an array with all the items of another. +The first array will be modified and will contain the combined items. +Does not allow duplicates and is case and type sensitive. + +See: [`union()`](#union), [`append()`](#append) + +```js +var foo = ['a', 'b'], + bar = ['b', 'd']; + +combine(foo, bar); // ['a', 'b', 'd'] +``` + + + +## compact(arr):Array + +Returns a new Array without any `null` or `undefined` values. Note that it will +keep empty strings and other falsy values (simillar to Ruby Array#compact). + +```js +var arr = [0, 1, null, false, '', 'foo', undefined, 'bar']; +compact(arr); // [0, 1, false, '', 'foo', 'bar']; +``` + + + +## contains(arr, value):Boolean + +Checks if Array contains value. Alias to `indexOf(arr, val) !== -1`. + +```js +var arr = [1, 2, 3]; +contains(arr, 2); // true +contains(arr, 'foo'); // false +``` + + + +## difference(...arrs):Array + +Return a new Array with elements that aren't present in the other Arrays +besides the first one. + +Works like [Python set#difference](http://docs.python.org/library/stdtypes.html#set.difference). + +It will remove duplicates. + +See: [`xor()`](#xor), [`intersection()`](#intersection) + +```js +var a = ['a', 'b', 1]; +var b = ['c', 1]; +difference(a, b); // ['a', 'b'] +``` + + + +## every(arr, callback, [thisObj]):Array + +Crossbrowser `Array.every()`. + +Tests whether all elements in the array pass the test implemented by the provided function. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = [1, 'foo', 'bar']; +every(items, isString); // false +every(items, isFunction); // false +every(items, function(val, key, arr){ + return val != null; +}); // true +``` + +more info at [MDN Array#every](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every) + +It also supports a shorthand syntax: + +```js +var items = [{id:1, active:true}, {id:3, active:true}, {id:8, active:true}]; +// all items with `id === 8` +every(items, {id:8}); // false +// `active` is truthy on all items +every(items, 'active'); // true +``` + + + +## filter(arr, callback, [thisObj]):Array + +Crossbrowser `Array.filter()`. + +Creates a new array with all elements that pass the callback test. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var nums = [1, 2, 3, 4, 5, 6]; +var oddNumbers = filter(nums, function(val, key, arr){ + return (val % 2) !== 0; +}); +// > [1, 3, 5] +``` + +more info at [MDN Array#filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) + +Filter also supports shorthand notation: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true}, + {name:'jane', surname:'doe', beard:false} +]; +// filter item that matches all properties/values pairs +filter(arr, {name:'john', beard:false}); +// > [{name:'john', surnname:'connor', beard:false}] +// items where 'beard' is a truthy value +filter(arr, 'beard'); +// > [{name:'john', surnname:'doe', beard:true}] +``` + +See [`reject()`](#reject) + + + +## find(arr, callback, [thisObj]):void + +Loops through all the items in the Array and returns the first one that passes +a truth test (callback). + +```js +var arr = [123, {a:'b'}, 'foo', 'bar']; +find(arr, isString); // "foo" +find(arr, isNumber); // 123 +find(arr, isObject); // {a:'b'} +``` + +Find also supports shorthand notation: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true} +]; +// first item that matches all properties/values pairs +find(arr, {name:'john'}); // {name:'john', surnname:'connor', beard:false} +// first item where 'beard' is a truthy value +find(arr, 'beard'); // {name:'john', surnname:'doe', beard:true} +``` + +See: [findIndex()](#findIndex) + + + +## findIndex(arr, iterator, [thisObj]):Number + +Loops through the items in the Array and returns the index of the first one +that passes a truth test (callback). + +Returns `-1` if no item was found that passes the truth test. + +```js +var arr = [1, { a: 1 }, 'foo', 'bar']; +findIndex(arr, isString); // 2 +findIndex(arr, isNumber); // 0 +findIndex(arr, isObject); // 1 +findIndex(arr, isRegExp); // -1 +``` + +`findIndex` also supports shorthand notation: + +```js +var pets = [ + { pet: 'dog', name: 'Sam' }, + { pet: 'dog', name: 'Maggie' } +]; + +findIndex(pets, { pet: 'dog' }); // 0 +findIndex(pets, { name: 'Maggie' }); // 1 +``` + +See: [find()](#find) + + + +## flatten(arr, [level]):Array + +Recursively flattens an array. A new array containing all the elements is +returned. If `level` is specified, it will only flatten up to that level. + +### Example + +```js +flatten([1, [2], [3, [4, 5]]]); +// > [1, 2, 3, 4, 5] +flatten([1, [2], [3, [4, 5]]], 1); +// > [1, 2, 3, [4, 5]] +``` + + + +## forEach(arr, callback, [thisObj]):void + +Crossbrowser `Array.forEach()`. + +It allows exiting the iteration early by returning `false` on the callback. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = ['foo', 'bar', 'lorem', 'ipsum']; +forEach(items, function(val, key, arr){ + console.log(key +' : '+ val); + if (val === 'lorem') { + // stop iteration (break) + return false; + } +}); +``` + +more info at [MDN Array#forEach](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach) + + + +## indexOf(arr, item, [fromIndex]):Number + +Crossbrowser `Array.indexOf()`. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#indexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) + + + + +## insert(arr, ...items):Number + +Push items into array only if they aren't contained by it. Returns the new +`length` of the array. + +See: [`remove()`](#remove), [`removeAll()`](#removeAll), +[`contains()`](#contains) + +```js +var arr = ['a', 'b']; +insert(arr, 'a'); // 2 : ['a', 'b'] +insert(arr, 'c'); // 3 : ['a', 'b', 'c'] +insert(arr, 1, 2, 'b'); // 5 : ['a', 'b', 'c', 1, 2] +``` + + + +## intersection(...arrs):Array + +Return a new Array with elements common to all Arrays. + +Similar to Python set#intersection and underscore.js intersection. + +It will remove duplicates. + +See: [`difference()`](#difference), [`xor()`](#xor) + +```js +var a = ['a', 'b', 1], + b = ['c', 1], + c = [1, 2, 3]; +intersection(a, b, c); // [1] +``` + + + +## invoke(arr, methodName[, ...args]):Array + +Call `methodName` on each item of the array passing custom arguments if needed. + +```js +invoke([[3,2,1], [9,5,2]], 'sort'); // [[1,2,3], [2,5,9]] +``` + + + +## join(arr, [separator]):String + +Joins the strings in `arr`, inserting `separator` between each value. + +This ignores null values and empty strings that are in the array. `separator` +defaults to an empty string. This will convert all non-string objects in the +array to a string. + +### Example + +```js +join(['a', 'b', 'c']); // 'abc' +join(['foo', 'bar'], ', '); // 'foo, bar' +join([null, 'foo', '', 'bar', undefined], ':'); // 'foo:bar' +``` + + + +## lastIndexOf(arr, item, [fromIndex]):Number + +Crossbrowser `Array.lastIndexOf()`. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#lastIndexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) + + + +## map(arr, callback, [thisObj]]):Array + +Crossbrowser `Array.map()`. + +Creates a new array with the results of calling a provided function on every +element in this array. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +See: [`collect()`](#collect) + +```js +var nums = [1,2,3,4]; +var double = map(nums, function(val, key, arr){ + return val * 2; +}); +// > [2, 4, 6, 8] +``` + +more info at [MDN Array#map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) + +It also supports a shorthand notation which can be used to achieve same result +as [`array/pluck`](#pluck): + +```js +var src = ['lorem', 'ipsum', 'foo', 'amet']; +// grab the "length" property of all items +var lengths = map(src, 'length'); // [5, 5, 3, 4] +``` + + + +## max(arr, [iterator], [thisObj]):* + +Returns maximum value inside array or use a custom iterator to define how items +should be compared. + +See: [`min()`](#min) + +```js +max([10, 2, 7]); // 10 +max(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'lorem' +``` + +It also supports a shorthand notation: + +```js +max(['foo', 'lorem', 'amet'], 'length'); // "lorem" +``` + + + +## min(arr, [iterator], [thisObj]):* + +Returns minimum value inside array or use a custom iterator to define how items +should be compared. + +See: [`max()`](#max) + +```js +min([10, 2, 7]); // 2 +min(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'foo' +``` + +It also supports a shorthand notation: + +```js +min(['foo', 'lorem', 'amet'], 'length'); // "foo" +``` + + + +## pick(arr):* + +Gets a random item and remove it from the array. + +### Example: + + var arr = [1, 2, 3, 4, 5, 6]; + var item_1 = pick(arr); // 4 + var item_2 = pick(arr); // 1 + console.log(arr); // [2, 3, 5, 6] + + + +## pluck(arr, propName):Array + +Extract a list of property values. + +See: [`function/prop()`](function.html#prop) + +```js +var users = [{name : 'John', age: 21}, {name: 'Jane', age : 27}]; +var names = pluck(users, 'name'); // ["John", "Jane"] +var ages = pluck(users, 'age'); // [21, 27] +``` + + + +## range([start], stop[, step]):Array + +Creates a new Array with all the values inside the range. Works similarly to +Python#range or PHP#range. + +### Arguments + + 1. `[start]` (Number) : Range start. Default is `0`. + 2. `stop` (Number) : Range limit. + 3. `[step]` (Number) : Step size. Default is `1`. + +### Example + +```js +range(5); // [0, 1, 2, 3, 4, 5] +range(0, 5); // [0, 1, 2, 3, 4, 5] +range(0, 5, 2); // [0, 2, 4] +range(20, 40, 5); // [20, 25, 30, 35, 40] +``` + + + +## reduce(arr, fn):* + +Crossbrowser `Array.reduce()`. + +Apply a function against an accumulator and each value of the array (from +left-to-right) as to reduce it to a single value. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#reduce](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce) + + + +## reduceRight(arr, fn):* + +Crossbrowser `Array.reduceRight()`. + +Apply a function simultaneously against two values of the array (from +right-to-left) as to reduce it to a single value. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +more info at [MDN Array#reduceRight](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight) + + + +## reject(arr, fn, thisObj):Array + +Creates a new array with all the elements that do **not** pass the truth test. +Opposite of [`filter()`](#filter). + +See [`filter()`](#filter) + +### Example + +```js +var numbers = [1, 2, 3, 4, 5, 6]; +reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4, 6] +``` + +It also supports a shorthand syntax: + +```js +var users = [ + {name:'john', surname:'connor', beard:false}, + {name:'john', surname:'doe', beard:true}, + {name:'jane', surname:'doe', beard:false} +]; +// reject items that matches all properties/values pairs +reject(arr, {name:'john'}); +// > [{name:'jane', surnname:'doe', beard:false}] +// reject items where 'beard' is a truthy value +filter(arr, 'beard'); +// > [{name:'john', surnname:'connor', beard:false}, +// {name:'jane', surname:'doe', beard:false}] +``` + + + +## remove(arr, item):void + +Remove a single item from the array. + +IMPORTANT: it won't remove duplicates, just a single item. + +### Example + +```js +var foo = [1, 2, 3, 4]; +remove(foo, 2); +console.log(foo); // [1, 3, 4] +``` + + + +## removeAll(arr, item):void + +Remove all instances of an item from the array. + +### Example + +```js +var foo = [1, 2, 3, 4, 2, 2]; +removeAll(foo, 2); +console.log(foo); // [1, 3, 4]; +``` + + + +## shuffle(arr):Array + +Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle. + +### Example + +```js +var arr = ['a', 'b', 'c', 'd', 'e']; +shuffle(arr); // ['b', 'd', 'e', 'c', 'a'] +``` + + + +## some(arr, callback, [thisObj]):Array + +Crossbrowser `Array.some()`. + +Tests whether some element in the array passes the test implemented by the provided function. + +It differs from ES5 since it will also loop over sparse items in the array to +normalize the behavior across browsers (avoid inconsistencies). + +```js +var items = [1, 'foo', 'bar']; +some(items, isString); // true +some(items, isFunction); // false +``` + +more info at [MDN Array#some](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some) + +It also supports a shorthand syntax: + +```js +var items = [{id:1, active:true}, {id:3, active:false}, {id:8, active:false}]; +// at least one item with `id === 8` +some(items, {id:8}); // true +// `active` is truthy on at least one item +some(items, 'active'); // true +``` + +see also: [`object/matches`](object.html#matches) + + + +## sort(arr, [compareFn]):Array + +Returns a sorted Array using the [Merge Sort](http://en.wikipedia.org/wiki/Merge_sort) algorithm (stable sort). + +The `Array.prototype.sort` browser implementations differ since the sorting algorithm isn't described in the ES spec - [in V8 it isn't stable](http://code.google.com/p/v8/issues/detail?id=90) and [on Firefox it is stable](https://bugzilla.mozilla.org/show_bug.cgi?id=224128) - so this function doesn't use the browser native implementation and is recommended in cases where a stable sort is required (items should preserve same order if already sorted). + +**Important:** It does logical comparisson by default (greater/less than) and +not a string comparisson like the native `Array#sort`. + +### compareFn + +If `compareFn` is supplied elements are sorted based on the value returned by +the `compareFn`. + + - If `compareFn(a, b)` is less than `0`, sort `a` to a lower index than `b`. + - If `compareFn(a, b)` returns `0`, leave `a` and `b` unchanged with respect + to each other, but sorted with respect to all different elements. + - If `compareFn(a, b)` is greater than `0`, sort `b` to a lower index than + `a`. + +### Example + +```js +sort([187, 23, 47, 987, 12, 59, 0]); // [0, 12, 23, 47, 59, 187, 987] +sort(['a', 'z', 'c', 'beta', 'b']); // ['a', 'b', 'beta', 'c', 'z'] + +// ['sit', 'amet', 'lorem', 'ipsum'] +sort(['lorem', 'ipsum', 'sit', 'amet'], function(a, b){ + // sort by length, items with same length + // will keep the relative order (stable) + return a.length - b.length; +}); + +// [4, 3, 2, 1] +sort([2, 3, 1, 4], function(a, b){ + // reverse sort + return b - a; +}); +``` + + + +## split(arr, [segments]):Array + +Splits an array into a fixed number of segments. + +The number of segments is specified by `segments` and defaults to 2. If the +array cannot be evenly split, the first segments will contain the extra items. +If `arr` is empty, an empty array is returned. If `arr.length` is less than +`segments`, then the resulting array will have `arr.length` number of +single-element arrays. + +### Example +```js +split([1, 2, 3, 4, 5], 3) // [ [1, 2], [3, 4], [5] ] +split([1, 2, 3, 4, 5]) // [ [1, 2, 3], [4, 5] ] +split([]) // [] +split([1, 2], 3) // [ [1], [2] ] +``` + + + +## toLookup(arr, key):Object + +Create an object that indexes the items in the array by a key. If `key` is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise `key` specifies the property on each value to use as the key. + +### Example + +```js +var foo = [{ name: 'a', thing: 1 }, { name: 'b', thing: 2 }]; +// { a: { name: 'a', thing: 1 }, b: { name: 'b', thing: 2 } } +toLookup(foo, 'name'); +// same as above +toLookup(foo, function (value) { return value.name; }); +``` + + + +## union(...arrs):Array + +Concat multiple arrays removing duplicates. + +```js +var a = ['a', 'b'], + b = ['c', 'a'], + c = [1, 'b', 2, 3, 'a']; + +//note that unique remove from begin to end +union(a, b, c); // ['c', 1, 'b', 2, 3, 'a'] +``` + + + +## unique(arr):Array + +Return a new Array of unique items. + +### Example + +```js +var foo = [1, 2, 3, 4, 2, 2, 3, 4]; +var bar = unique(foo); +console.log(foo); // [1, 2, 3, 4]; +``` + + + +## xor(arr1, arr2):Array + +Exclusive OR. Returns items that are present in a single array. + +Works like [Python set#symmetric_difference](http://docs.python.org/library/stdtypes.html#set.symmetric_difference) renamed for brevity. + +It will remove duplicates. + +See: [`difference()`](#difference), [`intersection()`](#intersection) + +```js +var a = ['a', 'b', 1]; +var b = ['c', 1]; +xor(a, b); // ['a', 'b', 'c'] +``` + + + +## zip(...arrs):Array + +Groups the elements of each array at their corresponding indexes. + +Useful for separate data sources that are coordinated through matching array +indexes. For a matrix of nested arrays, `zip.apply(...)` can transpose the +matrix in a similar fashion. + +```js +// [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] +zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); +``` + + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md new file mode 100644 index 00000000..2ffcab10 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md @@ -0,0 +1,233 @@ +# collection # + +Methods for dealing with collections (Array or Objects). + + + +## contains(list, value):Boolean + +Checks if collection contains value. + +```js +contains({a: 1, b: 2, c: 'bar'}, 2); // true +contains([1, 2, 3], 'foo'); // false +``` + +See: [array/contains](array.html#contains), [object/contains](object.html#contains) + + + +## every(list, callback, [thisObj]):Boolean + +Tests whether all values in the collection pass the test implemented by the +provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +every(obj, isNumber); // false +``` + +See: [array/every](array.html#every), [object/every](object.html#every) + + + +## filter(list, callback, [thisObj]):Array + +Filter collection properties. + +See: [array/filter](array.html#filter), [object/filter](object.html#filter) + + + +## find(list, callback, [thisObj]):* + +Loops through all the values in the collection and returns the first one that +passes a truth test (callback). + +**Important:** loop order over objects properties isn't guaranteed to be the +same on all environments. + +```js +find({a: 'foo', b: 12}, isString); // 'foo' +find(['foo', 12], isNumber); // 12 +``` + +See: [array/find](array.html#find), [object/find](object.html#find) + + + +## forEach(list, callback, [thisObj]) + +Loop through all values of the collection. + +See: [array/forEach](array.html#forEach), [object/forOwn](object.html#forOwn) + + + +## map(list, callback, [thisObj]):Array + +Returns a new collection where the properties values are the result of calling +the callback for each property in the original collection. + +See: [array/map](array.html#map), [object/map](object.html#map) + + + +## max(list, [iterator]):* + +Returns maximum value inside collection or use a custom iterator to define how +items should be compared. + +See: [`min()`](#min), [array/max](array.html#max), [object/max](object.html#max) + +```js +max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 +max(['foo', 'lorem', 'amet'], function(val){ + return val.length; +}); // 'lorem' +``` + + + +## min(list, [iterator]):* + +Returns minimum value inside collection or use a custom iterator to define how +items should be compared. + +See: [`max()`](#max), [array/min](array.html#min), [object/min](object.html#min) + +```js +min([10, 2, 7]); // 2 +min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'foo' +``` + + + +## pluck(list, propName):Array + +Extract a list of property values. + +```js +var users = [ + { + name : 'John', + age : 21 + }, + { + name : 'Jane', + age : 27 + } +]; + +pluck(users, 'name'); // ["John", "Jane"] +pluck(users, 'age'); // [21, 27] + +users = { + first: { + name : 'John', + age : 21 + }, + second: { + name : 'Mary', + age : 25 + } +}; + +pluck(users, 'name'); // ['John', 'Mary'] +``` + +See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck) + + + +## reduce(list, callback, initial, [thisObj]):* + +Apply a function against an accumulator and each value in the collection as to +reduce it to a single value. + +```js +var obj = {a: 1, b: 2, c: 3, d: 4}; + +function sum(prev, cur, key, list) { + return prev + cur; +} + +reduce(obj, sum); // 10 +``` + +See: [array/reduce](array.html#reduce), [object/reduce](object.html#reduce) + + + +## reject(list, fn, [thisObj]):Array + +Creates a new array with all the elements that do **not** pass the truth test. +Opposite of [`filter()`](#filter). + +### Example + +```js +var numbers = [1, 2, 3, 4, 5]; +reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4] + +var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; +reject(obj, function(x) { return (x % 2) !== 0; }); // [2, 4] +``` + +See: [array/reject](array.html#reject), [object/reject](object.html#reject) + + + +## size(list):Number + +Returns the number of values in the collection. + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +size(obj); // 3 +size([1,2,3]); // 3 +size(null); // 0 +``` + +See: [object/size](object.html#size) + + + +## some(list, callback, [thisObj]):Boolean + +Tests whether any values in the collection pass the test implemented by the +provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +some(obj, isNumber); // true +some(obj, isString); // true +some([1, 2, 3], isNumber) // true +some([1, 2, 3], isString) // false +``` + +See: [array/some](array.html#some), [object/some](object.html#some) + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md new file mode 100644 index 00000000..b3f7f40e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md @@ -0,0 +1,295 @@ +# date # + +Date utilities. + + +## dayOfTheYear(date):Number + +How many days elapsed since begining of the year (following gregorian +calendar). + +```js +// Jan 1st +dayOfTheYear(new Date(2013, 0, 1)); // 1 +// Dec 31th +dayOfTheYear(new Date(2013, 11, 31)); // 364 +``` + + + +## diff(date1, date2, [unitName]):Number + +Calculate the difference between dates (range). + +The returned value is always positive. The default `unitName` is `"ms"`. + +Available units: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`, +`millisecond`. + +See: [`time/convert()`](time.html#convert) + +```js +var d1 = new Date(2012, 4, 5); +var d2 = new Date(2013, 4, 8); +diff(d1, d2); // 31795200000 +diff(d1, d2, 'hour'); // 8832 +diff(d1, d2, 'week'); // 52.57142857142857 +diff(d1, d2, 'month'); // 12.096774193548388 +diff(d1, d2, 'year'); // 1.0082191780821919 +``` + + + +## isLeapYear(fullYear|date):Boolean + +Checks if it's a [leap year](http://en.wikipedia.org/wiki/Leap_year) according +to the Gregorian calendar. + +see: [`totalDaysInMonth()`](#totalDaysInMonth) + +```js +isLeapYear(2012); // true +isLeapYear(2013); // false +isLeapYear(new Date(2012, 2, 28)); // true +``` + + +## isSame(date1, date2[, period]):Boolean + +Check if both dates are the "same". + +You can pass an optional *period* used to set the comparisson precision. + +Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. + +```js +var date1 = new Date(2013, 1, 3); +var date2 = new Date(2013, 2, 9); +isSame(date1, date2); // false +isSame(date1, date2, 'day'); // false +isSame(date1, date2, 'month'); // false +isSame(date1, date2, 'year'); // true +``` + + + +## parseIso(str):Number + +Parses an [ISO8601](http://en.wikipedia.org/wiki/Iso8601) date and returns the +number of milliseconds since January 1, 1970, 00:00:00 UTC, or `NaN` if it is +not a valid ISO8601 date. + +This parses *all* ISO8601 dates, including dates without times, [ordinal +dates](https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates), and the compact +representation (omitting delimeters). The only exception is [ISO week +dates](https://en.wikipedia.org/wiki/ISO_week_date), which are not parsed. + +If no time zone offset is specified, it assumes UTC time. + +```js +// Jan 01, 1970 00:00 GMT +parseIso('1970-01-01T00:00:00') // 0 +parseIso('1970-001') // 0 +parseIso('1970-01-01') // 0 +parseIso('19700101T000000.00') // 0 +parseIso('1970-01-01T02:00+02:00') // 0 + +// Jan 02, 2000 20:10 GMT+04:00 +parseIso('2000-01-02T20:10+04:00') // 946829400000 +``` + + + +## startOf(date, period):Date + +Get a new Date at the start of the period. + +Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. + +```js +// Apr 05 2013 11:27:43 +var date = new Date(2013, 3, 5, 11, 27, 43, 123); +startOf(date, 'year'); // Jan 01 2013 00:00:00 +startOf(date, 'month'); // Apr 01 2013 00:00:00 +startOf(date, 'day'); // Apr 05 2013 00:00:00 +startOf(date, 'hour'); // Apr 05 2013 11:00:00 +``` + + + +## strftime(date, format, [l10n]):String + +Format date based on strftime format. + +Replaced tokens: + +
+
%a
locale's abbreviated weekday name.
+
%A
locale's full weekday name.
+
%b
locale's abbreviated month name.
+
%B
locale's full month name.
+
%c
locale's appropriate date and time representation.
+
%C
century number (the year divided by 100 and truncated +to an integer) as a decimal number [00..99].
+
%d
day of the month as a decimal number [01..31].
+
%D
same as %m/%d/%y.
+
%e
day of the month as a decimal number [1..31]; +a single digit is preceded by a space.
+
%F
The ISO 8601 date format (%Y-%m-%d)
+
%h
same as %b.
+
%H
hour (24-hour clock) as a decimal number [00..23].
+
%I
hour (12-hour clock) as a decimal number [01..12].
+
%j
day of the year as a decimal number [001..366].
+
%L
zero-padded milliseconds [000..999]
+
%m
month as a decimal number [01..12].
+
%M
minute as a decimal number [00..59].
+
%n
newline character.
+
%p
locale's equivalent of either "am" or "pm"
+
%P
locale's equivalent of either "AM" or "PM"
+
%r
time in a.m. and +p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p.
+
%R
time in 24 hour notation (%H:%M).
+
%s
seconds since Epoch (1970-01-01 00:00:00 UTC)
+
%S
second as a decimal number [00..60].
+
%t
tab character.
+
%T
time (%H:%M:%S).
+
%u
weekday as a decimal number [1..7], with 1 representing +Monday.
+
%U
week number of the year (Sunday as the first day of +the week) as a decimal number [00..53].
+
%V
week number of the year (Monday as the first day of the +week) as a decimal number [01..53]. If the week containing 1 January has +four or more days in the new year, then it is considered week 1. Otherwise, +it is the last week of the previous year, and the next week is week 1.
+
%w
weekday as a decimal number [0..6], with 0 representing +Sunday.
+
%W
week number of the year (Monday as the first day of +the week) as a decimal number [00..53]. All days in a new year preceding +the first Monday are considered to be in week 0.
+
%x
locale's appropriate date representation.
+
%X
locale's appropriate time representation.
+
%y
year without century as a decimal number [00..99].
+
%Y
year with century as a decimal number.
+
%Z
timezone name or abbreviation, or by no bytes +if no timezone information exists.
+
%%
is replaced by %.
+
+ +```js +var date = new Date(2013, 3, 8, 9, 2, 4); +strftime(date, '%Y-%m-%d'); // "2013-04-08" +strftime(date, '%R'); // "09:02" +strftime(date, '%Y-%m-%dT%H:%M:%S%z'); // "2013-04-08T09:02:04+0000" +``` + +You can also set a custom locale: + +```js +var ptBr = require('mout/date/i18n/pt-BR'); +strftime(date, '%a, %d %b', ptBr); // 'Seg, 08 Abr' +strftime(date, '%A, %d %B', ptBr); // 'Segunda, 08 Abril' +``` + +To set it globally: + +```js +require('mout/date/i18n_').set( customLocaleData ); +``` + +See [date/i18n](https://github.com/mout/mout/tree/master/src/date/i18n) +for localization examples. + + + +## timezoneAbbr(date):String + +Return timezone abbreviation or similar data. + +The result will vary based on the OS/browser since some environments doesn't +provide enough info about the current locale. + +```js +// IE 7-8 +timezoneAbbr(new Date()); // "-0500" +// Chrome, FF, V8 +timezoneAbbr(new Date()); // "EST" +``` + + + +## timezoneOffset(date):String + +Return time zone as hour and minute offset from UTC (e.g. +0900). + +It's important to note that JavaScript Date object will use the system locale +info to determinate the [timezone +offset](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) +and that daylight saving time affects the result. + +```js +// if system locale is EST +timezoneOffset(new Date()); // -0500 +``` + + + +## totalDaysInMonth(fullYear, monthIndex):Number + +Returns the amount of days in the month taking into consideration leap years +(following Gregorian calendar). + +see: [`isLeapYear()`](#isLeapYear) + +```js +totalDaysInMonth(2008, 1); // 29 (leap year) +totalDaysInMonth(2009, 1); // 28 + +// you can also pass a Date object as single argument +totalDaysInMonth( new Date(2013, 0, 1) ); // 31 +``` + + +## totalDaysInYear(fullYear):Number + +Returns the amount of days in the year taking into consideration leap years +(following Gregorian calendar). + +see: [`isLeapYear()`](#isLeapYear), [`totalDaysInMonth()`](#totalDaysInMonth) + +```js +totalDaysInYear(2008); // 366 (leap year) +totalDaysInYear(2009); // 365 + +// you can also pass a Date object as single argument +totalDaysInYear( new Date(2013, 0, 1) ); // 365 +``` + + + +## weekOfTheYear(date, [firstDayOfWeek]):Number + +Returns how many weeks elapsed since start of the year (`0..53`). + +`firstDayOfWeek` can be `0` (Sunday) or `1` (Monday). By default weeks start at +Sunday. + +It will return `0` if `date` is before the first `firstDayOfWeek` of the year. + +```js +// Tue Jan 01 2013 +weekOfTheYear( new Date(2013,0,1) ); // 0 +// Wed Jan 09 2013 +weekOfTheYear( new Date(2013,0,9) ); // 1 +// Sun Jan 01 2012 +weekOfTheYear( new Date(2012,0,1) ); // 1 +// Mon Jan 09 2012 +weekOfTheYear( new Date(2012,0,9) ); // 2 +``` + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md new file mode 100644 index 00000000..2695a025 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md @@ -0,0 +1,174 @@ +# function # + +Function*(al)* utilities. + + + +## bind(fn, context, [...args]):Function + +Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + +### Arguments + + 1. `fn` (Function) : Target Function + 2. `context` (Object) : Execution context (object used as `this`) + 3. `[...args]` (*) : Arguments (0...n arguments) + +See: [`partial()`](#partial), [object/bindAll](./object.html#bindAll) + + + +## compose(...fn):Function + +Returns the composition of a list of functions, where each function consumes +the return value of the function that follows. In math terms, composing the +functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + +```js +function add2(x) { return x + 2 } +function multi2(x) { return x * 2 } +map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] + +//same as +map([1, 2, 3], function(x){ + return add2( multi2(x) ); +}); +``` + + + +## debounce(fn, delay[, isAsap]):Function + +Creates a function that will delay the execution of `fn` until after `delay` +milliseconds have elapsed since the last time it was invoked. + +Subsequent calls to the debounced function will return the result of the last +`fn` call. + +```js +// sometimes less is more +var lazyRedraw = debounce(redraw, 300); +foo.on.resize.add(lazyRedraw); +``` + +In this visualization, `|` is a debounced-function call and `X` is the actual +callback execution: + + Default + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X + + Debounced with `isAsap == true`: + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X + +See: [`throttle()`](#throttle) + + +## func(name):Function + +Returns a function that calls a method with given `name` on supplied object. +Useful for iteration methods like `array/map` and `array/forEach`. + +See: [`prop()`](#prop) + +```js +// will call the method `getName()` for each `user` +var names = map(users, func('getName')); +``` + + + +## partial(fn, [...args]):Function + +Return a partially applied function supplying default arguments. + +This method is similar to [`bind`](#bind), except it does not alter the this +binding. + +### Arguments + + 1. `fn` (Function) : Target Function + 3. `[...args]` (*) : Arguments (0...n arguments) + +See: [`bind()`](#bind) + +```js +function add(a, b){ return a + b } +var add10 = partial(add, 10); +console.log( add10(2) ); // 12 +``` + + + +## prop(name):Function + +Returns a function that gets a property with given `name` from supplied object. +Useful for using in conjunction with `array/map` and/or for creating getters. + +See: [`array/pluck()`](array.html#pluck) + +```js +var users = [{name:"John", age:21}, {name:"Jane", age:25}]; +// ["John", "Jane"] +var names = map(users, prop('name')); +``` + + + +## series(...fn):Function + +Returns a function that will execute all the supplied functions in order and +passing the same parameters to all of them. Useful for combining multiple +`array/forEach` into a single one and/or for debugging. + + +```js +// call `console.log()` and `doStuff()` for each item item in the array +forEach(arr, series(console.log, doStuff)); +``` + + + +## throttle(fn, interval):Function + +Creates a function that, when executed, will only call the `fn` function at +most once per every `interval` milliseconds. + +If the throttled function is invoked more than once during the wait timeout, +`fn` will also be called on the trailing edge of the timeout. + +Subsequent calls to the throttled function will return the result of the last +`fn` call. + +```js +// sometimes less is more +var lazyRedraw = throttle(redraw, 300); +foo.on.resize.add(lazyRedraw); +``` + +In this visualization, `|` is a throttled-function call and `X` is the actual +`fn` execution: + + ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| + X X X X X X X X X X X X + +See: [`debounce()`](#debounce) + + +## timeout(fn, millis, context, [...args]):Number + +Functions as a wrapper for `setTimeout`. Calls a the function `fn` after a given delay `millis` in milliseconds. +The function is called within the specified context. The return value can be used to clear the timeout using `clearTimeout`. + +```js +var id = timeout(doStuff, 300, this); + +clearTimeout(id); +``` + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md new file mode 100644 index 00000000..56d7879b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md @@ -0,0 +1,385 @@ +# lang # + +Language Utilities. Easier inheritance, scope handling, type checks. + + + +## clone(val):* + +Clone native types like Object, Array, RegExp, Date and primitives. + +This method will not clone values that are referenced within `val`. It will +only copy the value reference to the new value. If the value is not a plain +object but is an object, it will return the value unchanged. + +### Example + +```js +var a = { foo: 'bar' }; +var b = clone(a); +console.log(a === b); // false +console.log(a.foo === b.foo); // true + +var c = [1, 2, 3]; +var d = clone(b); +console.log(c === d); // false +console.log(c); // [1, 2, 3] +``` + +See: [`deepClone()`](#deepClone) + + + +## createObject(parent, [props]):Object + +Create Object using prototypal inheritance and setting custom properties. + +Mix between [Douglas Crockford Prototypal Inheritance](http://javascript.crockford.com/prototypal.html) and the EcmaScript 5 `Object.create()` method. + +### Arguments + + 1. `parent` (Object) : Parent Object + 2. `[props]` (Object) : Object properties + +### Example + +```js +var base = { + trace : function(){ + console.log(this.name); + } +}; + +var myObj = createObject(base, { + name : 'Lorem Ipsum' +}); + +myObject.trace(); // "Lorem Ipsum" +``` + + + +## ctorApply(constructor, args):Object + +Do `Function.prototype.apply()` on a constructor while maintaining prototype +chain. + +```js +function Person(name, surname) { + this.name = name; + this.surname = surname; +} + +Person.prototype.walk = function(){ + console.log(this.name +' is walking'); +}; + +var args = ['John', 'Doe']; + +// "similar" effect as calling `new Person("John", "Doe")` +var john = ctorApply(Person, args); +john.walk(); // "John is walking" +``` + + + +## deepClone(val, [instanceClone]):* + +Deep clone native types like Object, Array, RegExp, Date and primitives. + +The `instanceClone` function will be invoked to clone objects that are not +"plain" objects (as defined by [`isPlainObject`](#isPlainObject)) if it is +provided. If `instanceClone` is not specified, it will not attempt to clone +non-plain objects, and will copy the object reference. + +### Example + +```js +var a = {foo:'bar', obj: {a:1, b:2}}; +var b = deepClone(a); // {foo:'bar', obj: {a:1, b:2}} +console.log( a === b ); // false +console.log( a.obj === b.obj ); // false + +var c = [1, 2, [3, 4]]; +var d = deepClone(c); // [1, 2, [3, 4]] +var e = c.concat(); // [1, 2, [3, 4]] + +console.log( c[2] === d[2] ); // false +// concat doesn't do a deep clone, arrays are passed by reference +console.log( e[2] === d[2] ); // true + +function Custom() { } +function cloneCustom(x) { return new Custom(); } +var f = { test: new Custom() }; +var g = deepClone(f, cloneCustom); +g.test === f.test // false, since new Custom instance will be created +``` + +See: [`clone()`](#clone) + + + +## defaults(val, ...defaults):void + +Return first value that isn't `null` or `undefined`. + + function doSomethingAwesome(foo, bar) { + // default arguments + foo = defaults(foo, 'lorem'); + bar = defaults(bar, 123); + // ... + } + + + +## inheritPrototype(child, parent):void + +Inherit prototype from another Object. + +```js +function Foo(name){ + this.name = name; +} +Foo.prototype = { + getName : function(){ + return this.name; + } +}; + +function Bar(name){ + this.name = name; +} +//should be called before calling constructor +inheritPrototype(Bar, Foo); + +var myObj = new Bar('lorem ipsum'); +myObj.getName(); // "lorem ipsum" +``` + + +## is(x, y):Boolean + +Check if both values are identical/egal. + +```js +// wtfjs +NaN === NaN; // false +-0 === +0; // true + +is(NaN, NaN); // true +is(-0, +0); // false +is('a', 'b'); // false +``` + +See: [`isnt()`](#isnt) + + + +## isnt(x, y):Boolean + +Check if both values are not identical/egal. + +```js +// wtfjs +NaN === NaN; // false +-0 === +0; // true + +isnt(NaN, NaN); // false +isnt(-0, +0); // true +isnt('a', 'b'); // true +``` + +See: [`is()`](#is) + + + + +## isArguments(val):Boolean + +If value is an "Arguments" object. + + + +## isArray(val):Boolean + +If value is an Array. Uses native ES5 `Array.isArray()` if available. + + + +## isBoolean(val):Boolean + +If value is a Boolean. + + + +## isDate(val):Boolean + +If value is a Date. + + + +## isEmpty(val):Boolean + +Checks if Array/Object/String is empty. + + +```js +isEmpty(''); // true +isEmpty('bar'); // false +isEmpty([]); // true +isEmpty([1, 2]); // false +isEmpty({}); // true +isEmpty({a:1, b:2}); // false +``` + + +## isFinite(val):Boolean + +Checks if value is Finite. + +Note: This is not the same as native `isFinite`, which will return `true` for +booleans and empty strings. See http://es5.github.com/#x15.1.2.5. + + + +## isFunction(val):Boolean + +If value is a Function. + + + +## isKind(val, kind):Boolean + +If value is of "kind". (used internally by some of the *isSomething* checks). + +Favor the other methods since strings are commonly mistyped and also because +some "kinds" can only be accurately checked by using other methods (e.g. +`Arguments`), some of the other checks are also faster. + +```js +isKind([1,2], 'Array'); // true +isKind(3, 'Array'); // false +isKind(3, 'Number'); // true +``` + +See: [`kindOf()`](#kindOf) + + + +## isInteger(val):Boolean + +Check if value is an integer. + +```js +isInteger(123); // true +isInteger(123.45); // false +isInteger({}); // false +isInteger('foo'); // false +isInteger('123'); // false +``` + + + +## isNaN(val):Boolean + +Check if value is `NaN`. + +Note: This is not the same as native `isNaN`, which will return `true` for +`undefined` and other values. See [ES5 isNaN](http://es5.github.com/#x15.1.2.4) + + + +## isNull(val):Boolean + +If value is `null`. + + + +## isNumber(val):Boolean + +If value is a Number. + + + +## isObject(val):Boolean + +If value is an Object. + + + +## isPlainObject(val):Boolean + +If the value is an Object created by the Object constructor. + + + +## isRegExp(val):Boolean + +If value is a RegExp. + + + +## isString(val):Boolean + +If value is a String. + + + +## isUndefined(val):Boolean + +If value is `undefined`. + + + +## kindOf(val):String + +Gets kind of value (e.g. "String", "Number", "RegExp", "Null", "Date"). +Used internally by `isKind()` and most of the other *isSomething* checks. + +```js +kindOf([1,2]); // "Array" +kindOf('foo'); // "String" +kindOf(3); // "Number" +``` + +See: [`isKind()`](#isKind) + + +## toArray(val):Array + +Convert array-like object into Array or wrap value into Array. + +```js +toArray({ + "0" : "foo", + "1" : "bar", + "length" : 2 +}); // ["foo", "bar"] + +function foo(){ + return toArray(arguments); +} +foo("lorem", 123); // ["lorem", 123] + +toArray("lorem ipsum"); // ["lorem ipsum"] +toArray(window); // [window] +toArray({foo:"bar", lorem:123}); // [{foo:"bar", lorem:123}] +``` + +See: object/values() + + + +## toString(val):String + +Convert any value to its string representation. + +Will return an empty string for `undefined` or `null`, otherwise will convert +the value to its string representation. + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md new file mode 100644 index 00000000..f45be3ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md @@ -0,0 +1,298 @@ +# math # + +Math utilities. + + +## ceil(val[, step]):Number + +Round value up to full steps. Similar to `Math.ceil()` but can round value +to an arbitrary *radix*. + + ceil(7.2); // 8 + ceil(7.8); // 8 + ceil(7, 5); // 10 + ceil(11, 5); // 15 + ceil(15, 5); // 15 + +### Common use cases + +Round values by increments of 5/10/1000/etc. + +See: [`round()`](#round), [`floor()`](#floor), [`countSteps()`](#countSteps) + + + +## clamp(val, min, max):Number + +Clamps value inside range. + +`clamp()` is extremely useful in cases where you need to limit a value inside +a certain range. So instead of doing a complex `if/else` to filter/process the +value you can restrict it to always be inside the desired range: + + clamp(-5, 0, 10); // 0 + clamp(7, 1, 10); // 7 + clamp(8, 1, 10); // 8 + clamp(10, 1, 10); // 10 + clamp(11, 1, 10); // 10 + +If the value is smaller than `min` it returns the `min`, if `val` is higher +than `max` it returns `max`. + +### Common use cases + +Any situation where you need to limit a number inside a range like: slider +position, image galleries (so user can't skip to an image that doesn't +exist), drag and drop, scroll boundaries, etc. + +See: [`loop()`](#loop) + + + + +## countSteps(val, step[, overflow]):Number + +Count number of full steps. + +### Arguments: + + 1. `val` (Number) : Value. + 2. `step` (Number) : Step size. + 3. `[overflow]` (Number) : Maximum number of steps, nSteps will loop if +`>=` than overflow. + + +Count steps is very useful for cases where you need to know how many "full +steps" the number *completed*. Think of it as a division that only returns +integers and ignore remainders. + + countSteps(3, 5); // 0 + countSteps(6, 5); // 1 + countSteps(12, 5); // 2 + countSteps(18, 5); // 3 + countSteps(21, 5); // 4 + +You can also set an `overflow` which will reset the *counter* before reaching +this number. + + countSteps(3, 5, 3); // 0 + countSteps(6, 5, 3); // 1 + countSteps(12, 5, 3); // 2 + countSteps(18, 5, 3); // 0 + countSteps(21, 5, 3); // 1 + +### Common use cases + +#### How many items fit inside an area: + + var containerWidth = 100; + var itemWidth = 8; + var howManyFit = countSteps(containerWidth, itemWidth); // 12 + +#### Split value into different scales or convert value from one scale to another + +From [mout/time/parseMs](time.html#parseMs): + + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + // {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} + parseMs(2348765454); + + + +## floor(val[, step]):Number + +Round value down to full steps. Similar to `Math.floor()` but can round value +to an arbitrary *radix*. (formerly `snap`) + + floor(7.2); // 7 + floor(7.8); // 7 + floor(7, 5); // 5 + floor(11, 5); // 10 + floor(15, 5); // 15 + +### Common use cases + +Round values by increments of 5/10/1000/etc. + +See: [`round()`](#round), [`ceil()`](#ceil), [`countSteps()`](#countSteps) + + + +## inRange(val, min, max[, threshold]):Boolean + +Checks if value is inside the range. + + inRange(-6, 1, 10); // false + inRange( 5, 1, 10); // true + inRange(12, 1, 10); // false + +The threshold can be useful when you want granular control of what should match +and/or the precision could change at runtime or by some configuration option, +avoids the clutter of adding/subtracting the `threshold` from `mix` and `max`. + + inRange(12, 1, 10, 2); // true + inRange(13, 1, 10, 2); // false + +### Common use cases + +Anything that needs to check if value is inside a range, be it collision +detection, limiting interaction by mouse position, ignoring parts of the logic +that shouldn't happen if value isn't valid, simplify `if/else` conditions, +making code more readable, etc... + + + + +## isNear(val, target, threshold):Boolean + +Check if value is close to target. + +Similar to `inRange()` but used to check if value is close to a certain value +or match the desired value. Basically to simplify `if/else` conditions and to +make code clearer. + + isNear( 10.2, 10, 0.5); // true + isNear( 10.5, 10, 0.5); // true + isNear(10.51, 10, 0.5); // false + +### Common use cases + +Games where a certain action should happen if an *actor* is close to a target, +gravity fields, any numeric check that has some tolerance. + + + + +## lerp(ratio, start, end):Number + +Linear interpolation. + + lerp(0.5, 0, 10); // 5 + lerp(0.75, 0, 10); // 7.5 + +### Common use cases + +Linear interpolation is commonly used to create animations of elements moving +from one point to another, where you simply update the current ratio (which in +this case represents time) and get back the position of the element at that +"frame". + +The core idea of `lerp` is that you are using a number that goes from `0` to +`1` to specify a ratio inside that scale. This concept can be applied to +convert numbers from different scales easily. + +See: [`map()`](#map), [`norm()`](#norm) + + + + +## loop(val, min, max):Number + +Loops value inside range. Will return `min` if `val > max` and `max` if `val +< min`, otherwise it returns `val`. + + loop(-1, 0, 10); // 10 + loop( 1, 0, 10); // 1 + loop( 5, 0, 10); // 5 + loop( 9, 0, 10); // 9 + loop(10, 0, 10); // 10 + loop(11, 0, 10); // 0 + +Similar to [`clamp()`](#clamp) but *loops* the value inside the range when an +overflow occurs. + +### Common use cases + +Image galleries, infinite scroll, any kind of logic that requires that the +first item should be displayed after the last one or the last one should be +displayed after first if going on the opposite direction. + +See: [`clamp()`](#clamp) + + + + +## map(val, min1, max1, min2, max2):Number + +Maps a number from one scale to another. + + map(3, 0, 4, -1, 1) // 0.5 + map(3, 0, 10, 0, 100) // 30 + +### Common use cases + +Very useful to convert values from/to multiple scales. + +Let's suppose we have a slider that needs to go from `2000` to `5000` and that slider +has `300px` of width, here is how we would translate the knob position into the +current value: + + var knobX = 123; + var sliderWid = 300; + var minVal = 2000; + var maxVal = 5000; + + var curVal = map(knobX, 0, sliderWid, minVal, maxVal); // 3230 + +See: [`lerp()`](#lerp), [`norm()`](#norm) + + + + +## norm(val, min, max):Number + +Gets normalized ratio of value inside range. + + norm(50, 0, 100); // 0.5 + norm(75, 0, 100); // 0.75 + +### Common use cases + +Convert values between scales, used by [`map()`](#map) internally. Direct +opposite of [`lerp()`](#lerp). + +See: [`lerp()`](#lerp), [`map()`](#map) + + + +## round(val[, step]):Number + +Round value to full steps. Similar to `Math.round()` but allow setting an +arbitrary *radix*. + + // default + round(0.22); // 0 + round(0.49); // 0 + round(0.51); // 1 + + // custom radix + round(0.22, 0.5); // 0 + round(0.49, 0.5); // 0.5 + round(0.51, 0.5); // 0.5 + round(0.74, 0.5); // 0.5 + round(0.75, 0.5); // 1 + round(1.24, 0.5); // 1 + round(1.25, 0.5); // 1.5 + round(1.74, 0.5); // 1.5 + +### Common use cases + +Round values by increments of 0.5/5/10/1000/etc. + +See: [`floor()`](#floor), [`ceil()`](#ceil), [`countSteps()`](#countSteps) + + + +------------------------------------------------------------------------------- + +For more usage more info check the specs and source code. + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md new file mode 100644 index 00000000..8d93865b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md @@ -0,0 +1,225 @@ +# number # + +Number utilities. + + +## abbreviate(val[, nDecimalDigits, dictionary]):String + +Abbreviate number to thousands (K), millions (M) or billions (B). + +The default value for `nDecimalDigits` is `1`. + +### Example + + abbreviate(123456); // "123.5K" + abbreviate(12345678); // "12.3M" + abbreviate(1234567890); // "1.2B" + +You can set the amount of decimal digits (default is `1`): + + abbreviate(543); // "0.5K" + abbreviate(543, 1); // "0.5K" + abbreviate(543, 2); // "0.54K" + abbreviate(543, 3); // "0.543K" + +You can customize the abbreviation by passing a custom "dictionary": + + var _ptbrDict = { + thousands : ' mil', + millions : ' Mi', + billions : ' Bi' + }; + function customAbbr(val) { + return abbreviate(val, 1, _ptbrDict); + } + + customAbbr(123456); // "123.5 mil" + customAbbr(12345678); // "12.3 Mi" + customAbbr(1234567890); // "1.2 Bi" + + + +## currencyFormat(val[, nDecimalDigits, decimalSeparator, thousandsSeparator]):String + +Format a number as currency. + +### Example: + + currencyFormat(1000); // "1,000.00" + currencyFormat(1000, 1); // "1,000.0" + currencyFormat(1000, 2, ',', '.'); // "1.000,00" + + + +## enforcePrecision(val, nDecimalDigits):Number + +Enforce a specific amount of decimal digits and also fix floating point +rounding issues. + +### Example: + +```js +enforcePrecision(0.615, 2); // 0.62 +enforcePrecision(0.625, 2); // 0.63 +//floating point rounding "error" (rounds to odd number) ++(0.615).toFixed(2); // 0.61 ++(0.625).toFixed(2); // 0.63 +``` + + + +## MAX_INT:Number + +Maximum 32-bit signed integer value. `Math.pow(2, 31) - 1` + +### Example: + +```js +console.log( MAX_INT ); // 2147483647 +``` + + +## MAX_UINT:Number + +Maximum 32-bit unsigned integer value. `Math.pow(2, 32) - 1` + +### Example: + +```js +console.log( MAX_UINT ); // 4294967295 +``` + + +## MIN_INT:Number + +Minimum 32-bit signed integer value. `Math.pow(2, 31) * -1`. + +### Example: + +```js +console.log( MIN_INT ); // -2147483648 +``` + + +## pad(n, minLength[, char]):String + +Add padding zeros if `n.length` < `minLength`. + +### Example: + +```js +pad(1, 5); // "00001" +pad(12, 5); // "00012" +pad(123, 5); // "00123" +pad(1234, 5); // "01234" +pad(12345, 5); // "12345" +pad(123456, 5); // "123456" + +// you can also specify the "char" used for padding +pad(12, 5, '_'); // "___12" +``` + +see: [string/lpad](./string.html#lpad) + + + +## rol(val, shift):Number + +Bitwise circular shift left. + +More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) + + + +## ror(val, shift):Number + +Bitwise circular shift right. + +More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) + + + +## sign(val):Number + +Returns `-1` if value is negative, `0` if the value is `0` and `1` if value is positive. Useful for +multiplications. + +```js +sign(-123); // -1 +sign(123); // 1 +sign(0); // 0 +``` + + + +## toInt(val):Number + +"Convert" value into an 32-bit integer. Works like `Math.floor` if `val > 0` and +`Math.ceil` if `val < 0`. + +**IMPORTANT:** val will wrap at [number/MIN_INT](#MIN_INT) and +[number/MAX_INT](#MAX_INT). + +Created because most people don't know bitwise operations and also because this +feature is commonly needed. + +[Perf tests](http://jsperf.com/vs-vs-parseint-bitwise-operators/7) + +### Example: + +```js +toInt(1.25); // 1 +toInt(0.75); // 0 +toInt(-0.55); // 0 +toInt(-5.0001) // -5 +``` + + + +## toUInt(val):Number + +"Convert" value into an 32-bit unsigned integer. + +Works like AS3#uint(). + +**IMPORTANT:** val will wrap at 2^32. + +### Example: + +```js +toUInt(1.25); // 1 +toUInt(0.75); // 0 +toUInt(-0.55); // 0 +toUInt(-5.0001); // 4294967291 +toUInt(Math.pow(2,32) - 0.5); // 4294967295 +toUInt(Math.pow(2,32) + 0.5); // 0 +``` + + +## toUInt31(val):Number + +"Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + +Useful since all bitwise operators besides `>>>` treat numbers as signed +integers. + +**IMPORTANT:** val will wrap at 2^31 and negative numbers will be treated as +`zero`. + +### Example: + +```js +toUInt31(1.25); // 1 +toUInt31(0.75); // 0 +toUInt31(-0.55); // 0 +toUInt31(-5.0001); // 0 +toUInt31(Math.pow(2,31) - 0.5); // 21474836470 +toUInt31(Math.pow(2,31) + 0.5); // 0 +``` + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md new file mode 100644 index 00000000..b4d5e483 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md @@ -0,0 +1,780 @@ +# object # + +Object utilities. + + + +## bindAll(obj, [...methodNames]):void + +Bind methods of the target object to always execute on its own context +(ovewritting the original function). + +See: [function/bind](./function.html#bind) + +```js +var view = { + name: 'Lorem Ipsum', + logNameOnClick: function() { + console.log(this.name); + } +}; + +// binds all methods by default +bindAll(view); +jQuery('#docs').on('click', view.logNameOnClick); +``` + +You can also specify the list of methods that you want to bind (in case you +just want to bind a few of them). + +```js +// only the listed methods will be bound to `obj` context +bindAll(obj, 'logNameOnClick', 'doAwesomeStuffOnDrag'); +``` + + + +## contains(obj, value):Boolean + +Similar to [Array/contains](array.html#contains). Checks if Object contains +value. + +```js +var obj = { + a: 1, + b: 2, + c: 'bar' +}; +contains(obj, 2); // true +contains(obj, 'foo'); // false +``` + + + +## deepEquals(a, b, [callback]):Boolean + +Recursively tests whether two objects contain the same keys and equal values. + +`callback` specifies the equality comparison function used to compare +non-object values. It defaults to using the strict equals (`===`) operator. + +If the values are both an object, it will recurse into the objects, checking if +their keys/values are equal. It will only check the keys and values contained +by the objects; it will not check the objects' prototypes. If the either of +the values are not objects, they will be checked using the `callback` function. + +Example: + +```js +deepEquals({ a: 1 }, { a: 1 }); // true +deepEquals({ value: { a: 1 } }, { value: { a: 1 } }); // true +deepEquals({ value: { a: 1 } }, { value: { a: 2 } }); // false +deepEquals({ value: { a: 1 } }, { value: { a: 1, b: 2 } }); // false +deepEquals({}, null); // false +deepEquals(null, null); // true +deepEquals( + { a: { b: 1 } }, + { a: { b: '1' } }, + function(a, b) { return a == b; }); // true +``` + +See: [`equals()`](#equals) + + + +## deepFillIn(target, ...objects):Object + +Fill missing properties recursively. + +It's different from `deepMixIn` since it won't override any existing property. +It's also different from `merge` since it won't clone child objects during the +process. + +It returns the target object and mutates it in place. + +See: [`fillIn()`](#fillIn), [`deepMixIn()`](#deepMixIn), [`merge()`](#merge) + +```js +var base = { + foo : { + bar : 123 + }, + lorem : 'ipsum' +}; +var options = deepFillIn({foo : { baz : 45 }, lorem : 'amet'}, base); +// > {foo: {bar:123, baz : 45}, lorem : 'amet'} +``` + + + +## deepMatches(target, pattern):Boolean + +Recursively checks if object contains all properties/value pairs. When both +the target and pattern values are arrays, it checks that the target value +contain matches for all the items in the pattern array (independent of order). + +```js +var john = { + name: 'John', + age: 22, + pets: [ + { type: 'cat', name: 'Grumpy Cat' }, + { type: 'dog', name: 'Hawk' } + ] +}; + +deepMatches(john, { name: 'John' }); // true +deepMatches(john, { age: 21 }); // false +deepMatches(john, { pets: [ { type: 'cat' } ] }); // true +deepMatches(john, { pets: [ { name: 'Hawk' } ] }); // true +deepMatches(john, { pets: [ { name: 'Hairball' } ] }); // false +``` + +See [`matches()`](#matches) + + + +## deepMixIn(target, ...objects):Object + +Mixes objects into the target object, recursively mixing existing child objects +as well. + +It will only recursively mix objects if both (existing and new) values are +plain objects. + +Returns the target object. Like [`merge()`](#merge), but mutates the target +object, and does not clone child objects. + +```js +var target = { + foo: { + name: "foo", + id: 1 + } +}; + +deepMixIn(target, { foo: { id: 2 } }); +console.log(target); // { foo: { name: "foo", id: 2 } } +``` + +See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) + + + +## equals(a, b, [callback]):Boolean + +Tests whether two objects contain the same keys and values. + +`callback` specifies the equality comparison function used to compare the +values. It defaults to using the strict equals (`===`) operator. + +It will only check the keys and values contained by the objects; it will not +check the objects' prototypes. If either of the values are not objects, they +will be compared using the `callback` function. + +```js +equals({}, {}); // true +equals({ a: 1 }, { a: 1 }); // true +equals({ a: 1 }, { a: 2 }); // false +equals({ a: 1, b: 2 }, { a: 1 }); // false +equals({ a: 1 }, { a: 1, b: 2 }); // false +equals(null, null); // true +equals(null, {}); // false +equals({ a: 1 }, { a: '1' }, function(a, b) { return a == b; }); // true +``` + + + +## every(obj, callback, [thisObj]):Boolean + +Similar to [Array/every](array.html#every). Tests whether all properties in the +object pass the test implemented by the provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +every(obj, isNumber); // false +``` + + + +## fillIn(obj, ...default):Object + +Fill in missing properties in object with values from the *defaults* objects. + + var base = { + foo : 'bar', + num : 123 + }; + + fillIn({foo:'ipsum'}, base); // {foo:'ipsum', num:123} + +PS: it allows merging multiple objects at once, the first ones will take +precedence. + +See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) + + + +## filter(obj, callback, [thisObj]) + +Returns a new object containing all properties where `callback` returns true, +similar to Array/filter. It does not use properties from the object's +prototype. + +Callback receives the same arguments as `forOwn()`. + +See: [`forOwn()`](#forOwn), [`forIn()`](#forIn), [`pick()`](#pick) + +```js +var obj = { + foo: 'value', + bar: 'bar value' +}; + +// returns { bar: 'bar value' } +filter(obj, function(v) { return value.length > 5; }); + +// returns { foo: 'value' } +filter(obj, function(v, k) { return k === 'foo'; }); +``` + + + +## find(obj, callback, [thisObj]) + +Loops through all the properties in the Object and returns the first one that +passes a truth test (callback), similar to [Array/find](array.html#find). +Unlike Array/find, order of iteration is not guaranteed. + +```js +var obj = { + a: 'foo', + b: 12 +}; + +find(obj, isString); // 'foo' +find(obj, isNumber); // 12 +``` + + + +## forIn(obj, callback[, thisObj]) + +Iterate over all properties of an Object, similar to +[Array/forEach](array.html#forEach). + +It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). +It **will** iterate over inherited (enumerable) properties from the prototype. + +It allows exiting the iteration early by returning `false` on the callback. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys), [`values()`](#values) + +### Callback arguments + +Callback will receive the following arguments: + + 1. Property Value (*) + 2. Key name (String) + 3. Target object (Object) + +### Example + +```js +function Foo(){ + this.foo = 1; + this.bar = 2; +} + +Foo.prototype.lorem = 4; + +var obj = new Foo(); + +var result = 0; +var keys = []; + +forIn(obj, function(val, key, o){ + result += val; + keys.push(key); +}); + +console.log(result); // 7 +console.log(keys); // ['foo', 'bar', 'lorem'] +``` + + + +## forOwn(obj, callback[, thisObj]) + +Iterate over all own properties from an Object, similar to +[Array/forEach](array.html#forEach). + +It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). +Notice that it **won't** iterate over properties from the prototype. + +It allows exiting the iteration early by returning `false` on the callback. + +See: [`forIn()`](#forIn), [`keys()`](#keys), [`values()`](#values) + +### Callback arguments + +Callback will receive the following arguments: + + 1. Property Value (*) + 2. Key name (String) + 3. Target object (Object) + +### Example + +```js +function Foo(){ + this.foo = 1; + this.bar = 2; +} + +// will be ignored +Foo.prototype.lorem = 4; + +var obj = new Foo(); + +var result = 0; +var keys = []; + +forOwn(obj, function(val, key, o){ + result += val; + keys.push(key); +}); + +console.log(result); // 3 +console.log(keys); // ['foo', 'bar'] +``` + + + +## functions(obj):Array + +Returns a sorted list of all enumerable properties that have function values +(including inherited properties). + +```js +var obj = { + foo : function(){}, + bar : 'baz' +}; +functions(obj); // ['foo'] +``` + + + +## get(obj, propName):* + +Returns nested property value. Will return `undefined` if property doesn't +exist. + +See: [`set()`](#set), [`namespace()`](#namespace), [`has()`](#has) + +```js +var lorem = { + ipsum : { + dolor : { + sit : 'amet' + } + } + }; + +get(lorem, 'ipsum.dolor.sit'); // "amet" +get(lorem, 'foo.bar'); // undefined +``` + + + +## has(obj, propName):Boolean + +Checks if object contains a child property. Useful for cases where you need to +check if an object contain a *nested* property. It will get properties +inherited by the prototype. + +see: [`hasOwn()`](#hasOwn), [`get()`](#get) + +```js +var a = { + b : { + c : 123 + } + }; + +has(a, 'b.c'); // true +has(a, 'foo.c'); // false +``` + +### Common use case + +```js +if( has(a, 'foo.c') ){ // false + // ... +} + +if( a.foo.c ){ // ReferenceError: `foo` is not defined + // ... +} +``` + + + +## hasOwn(obj, propName):Boolean + +Safer `Object.hasOwnProperty`. Returns a boolean indicating whether the object +has the specified property. + +see: [`has()`](#has) + +```js +var obj = { + foo: 1, + hasOwnProperty : 'bar' +}; + +obj.hasOwnProperty('foo'); // ERROR! hasOwnProperty is not a function + +hasOwn(obj, 'foo'); // true +hasOwn(obj, 'hasOwnProperty'); // true +hasOwn(obj, 'toString'); // false +``` + + + +## keys(obj):Array + +Returns an array of all own enumerable properties found upon a given object. +It will use the native `Object.keys` if present. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`values()`](#values) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +keys(obj); // ['foo', 'bar', 'lorem'] +``` + + + +## map(obj, callback, [thisObj]):Object + +Returns a new object where the property values are the result of calling the +callback for each property in the original object, similar to Array/map. + +The callback function receives the same arguments as in `forOwn()`. + +See: [`forOwn()`](#forOwn) + +```js +var obj = { foo: 1, bar: 2 }, + data = { foo: 0, bar: 1 }; + +map(obj, function(v) { return v + 1; }); // { foo: 2, bar: 3 } +map(obj, function(v, k) { return k; }); // { foo: "foo", bar: "bar" } +map(obj, function(v, k) { return this[k]; }, data); // { foo: 0, bar: 1 } +``` + + + +## matches(obj, props):Boolean + +Checks if object contains all properties/values pairs. Useful for validation +and filtering. + +```js +var john = {age:25, hair:'long', beard:true}; +var mark = {age:27, hair:'short', beard:false}; +var hippie = {hair:'long', beard:true}; +matches(john, hippie); // true +matches(mark, hippie); // false +``` + +See [`deepMatches()`](#deepMatches) + + + +## merge(...objects):Object + +Deep merges objects. Note that objects and properties will be cloned during the +process to avoid undesired side effects. It return a new object and won't +affect source objects. + +```js +var obj1 = {a: {b: 1, c: 1, d: {e: 1, f: 1}}}; +var obj2 = {a: {b: 2, d : {f : 'yeah'} }}; + +merge(obj1, obj2); // {a: {b : 2, c : 1, d : {e : 1, f : 'yeah'}}} +``` + +See: [`deepMixIn()`](#deppMixIn), [`deepFillIn()`](#deepFillIn) + + + +## max(obj[, iterator]):* + +Returns maximum value inside object or use a custom iterator to define how +items should be compared. Similar to [Array/max](array.html#max). + +See: [`min()`](#min) + +```js +max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 +max({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'lorem' +``` + + + +## min(obj[, iterator]):* + +Returns minimum value inside object or use a custom iterator to define how +items should be compared. Similar to [Array/min](array.html#min). + +See: [`max()`](#max) + +```js +min({a: 100, b: 2, c: 1, d: 3, e: 200}); // 1 +min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ + return val.length; +}); // 'foo' +``` + + + +## mixIn(target, ...objects):Object + +Combine properties from all the objects into first one. + +This method affects target object in place, if you want to create a new Object +pass an empty object as first parameter. + +### Arguments + + 1. `target` (Object) : Target Object. + 2. `...objects` (...Object) : Objects to be combined (0...n objects). + +### Example + +```js +var a = {foo: "bar"}; +var b = {lorem: 123}; + +mixIn({}, a, b); // {foo: "bar", lorem: 123} +console.log(a); // {foo: "bar"} + +mixIn(a, b); // {foo: "bar", lorem: 123} +console.log(a); // {foo: "bar", lorem: 123} +``` + +See: [`fillIn()`](#fillIn), [`merge()`](#merge) + + + + +## namespace(obj, propName):Object + +Creates an empty object inside namespace if not existent. Will return created +object or existing object. + +See: [`get()`](#get), [`set()`](#set) + +```js +var obj = {}; +namespace(obj, 'foo.bar'); // {} +console.log(obj); // {foo:{bar:{}}} +``` + + + +## pick(obj, ...keys):Object + +Return a copy of the object that contains only the whitelisted keys. + +See: [`filter()`](#filter) + +```js +var user = { + firstName : 'John', + lastName : 'Doe', + dob : '1985/07/23', + gender : 'male' +}; + +// can pass an array of keys as second argument +var keys = ['firstName', 'dob'] +pick(user, keys); // {firstName:"John", dob: "1985/07/23"} + +// or multiple arguments +pick(user, 'firstName', 'lastName'); // {firstName:"John", lastName: "Doe"} +``` + + + +## pluck(obj, propName):Object + +Extract an object containing property values with keys as they appear in the +passed object. + +```js +var users = { + first: { + name : 'John', + age : 21 + }, + second: { + name : 'Mary', + age : 25 + } +}; + +pluck(users, 'name'); // {first: 'John', second: 'Mary'} ); +pluck(users, 'age'); // {first: 21, second: 25} ); +``` + + + +## reduce(obj, callback, initial, [thisObj]):* + +Similar to [Array/reduce](array.html#reduce). + +Apply a function against an accumulator and each property of the object (order +is undefined) as to reduce it to a single value. + +```js +var obj = {a: 1, b: 2, c: 3, d: 4}; + +function sum(prev, cur, key, list) { + compare1.push(prev); + return prev + cur; +} + +reduce(obj, sum); // 10 +``` + + + +## reject(obj, callback, thisObj):Object + +Returns a new object containing all properties where `callback` returns true, +similar to [Array/reject](array.html#reject). It does not use properties from +the object's prototype. Opposite of [`filter()`](#filter). + +See [`filter()`](#filter) + +### Example + +```js +var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; +reject(obj, function(x) { return (x % 2) !== 0; }); // {b: 2, d: 4} +``` + + + +## values(obj):Array + +Returns an array of all own enumerable properties values found upon a given object. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +values(obj); // [1, 2, 3] +``` + + + +## set(obj, propName, value) + +Sets a nested property value. + +See: [`get()`](#get), [`namespace()`](#namespace) + +```js +var obj = {}; +set(obj, 'foo.bar', 123); +console.log(obj.foo.bar); // 123 +console.log(obj); // {foo:{bar:123}} +``` + + + +## size(obj):Number + +Returns the count of own enumerable properties found upon a given object. + +PS: it won't return properties from the prototype. + +See: [`forOwn()`](#forOwn), [`keys()`](#keys) + +```js +var obj = { + foo : 1, + bar : 2, + lorem : 3 +}; +size(obj); // 3 +``` + + + +## some(obj, callback, [thisObj]):Boolean + +Similar to [Array/some](array.html#some). Tests whether any properties in the +object pass the test implemented by the provided callback. + +```js +var obj = { + a: 1, + b: 2, + c: 3, + d: 'string' +}; + +some(obj, isNumber); // true +``` + + + +## unset(obj, propName):Boolean + +Delete object property if existent and returns a boolean indicating succes. It +will also return `true` if property doesn't exist. + +Some properties can't be deleted, to understand why [check this +article](http://perfectionkills.com/understanding-delete/). + +See: [`set()`](#set) + +```js +var lorem = { + ipsum : { + dolor : { + sit : 'amet' + } + } + }; + +unset(lorem, 'ipsum.dolor.sit'); // true +console.log(lorem.ipsum.dolor); // {} +unset(lorem, 'foo.bar'); // true +``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md new file mode 100644 index 00000000..1be3c102 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md @@ -0,0 +1,115 @@ +# queryString # + +Utilities for query string manipulation. + + + +## contains(url, paramName):Boolen + +Checks if query string contains parameter. + +### Arguments: + + 1. `url` (String) : URL or query string. + 2. `paramName` (String) : Parameter name. + +### Example: + +```js +var url = 'example.com/?lorem=ipsum'; +contains(url, 'lorem'); // true +contains(url, 'foo'); //false +``` + + + +## decode(queryStr[, shouldTypecast]):Object + +Parses query string and creates an object of keys => vals. + +Will typecast value with [`string/typecast`](string.html#typecast) by default +and decode string parameters using `decodeURIComponent()`. + +```js +var query = '?foo=bar&lorem=123'; +decode(query); // {foo: "bar", lorem: 123} +decode(query, false); // {foo: "bar", lorem: "123"} +``` + + +## encode(obj):String + +Encode object into a query string. + +Will encode parameters with `encodeURIComponent()`. + +```js +encode({foo: "bar", lorem: 123}); // "?foo=bar&lorem=123" +``` + + +## getParam(url, param[, shouldTypecast]):* + +Get query parameter value. + +Will typecast value with [`string/typecast`](string.html#typecast) by default. + +See: [`setParam()`](#setParam) + +### Arguments: + + 1. `url` (String) : Url. + 2. `param` (String) : Parameter name. + 3. `[shouldTypecast]` (Boolean) : If it should typecast value. + +### Example: + +```js +var url = 'example.com/?foo=bar&lorem=123&ipsum=false'; +getParam(url, 'dolor'); // "amet" +getParam(url, 'lorem'); // 123 +getParam(url, 'lorem', false); // "123" +``` + + +## parse(url[, shouldTypecast]):Object + +Parses URL, extracts query string and decodes it. + +It will typecast all properties of the query object unless second argument is +`false`. + +Alias to: `decode(getQuery(url))`. + +```js +var url = 'example.com/?lorem=ipsum&a=123'; +parse(url); // {lorem: "ipsum", a: 123} +parse(url, false); // {lorem: "ipsum", a: "123"} +``` + + +## getQuery(url):String + +Gets full query as string with all special chars decoded. + +```js +getQuery('example.com/?lorem=ipsum'); // "?lorem=ipsum" +``` + + +## setParam(url, paramName, value):String + +Add new query string parameter to URL or update existing value. + +See: [`getParam()`](#getParam) + +```js +setParam('?foo=bar&lorem=0', 'lorem', 'ipsum'); // '?foo=bar&lorem=ipsum' +setParam('?lorem=1', 'foo', 123); // '?lorem=1&foo=123' +``` + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md new file mode 100644 index 00000000..b058b4e0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md @@ -0,0 +1,218 @@ +# random # + +Pseudo-random generators. + +mout uses `Math.random` by default on all the pseudo-random generators, if +you need a seeded random or a better algorithm see the [`random()`](#random) +documentation for instructions. + + + +## choice(...items):* + +Returns a random element from the supplied arguments or from an array if single +argument is an array. + +### Example: + +```js +choice(1, 2, 3, 4, 5); // 3 + +var arr = ['lorem', 'ipsum', 'dolor']; +choice(arr); // 'dolor' +``` + + + +## guid():String + +Generates a pseudo-random [Globally Unique Identifier](http://en.wikipedia.org/wiki/Globally_unique_identifier) (v4). + +Since the total number of GUIDs is 2122 the chance of generating the +same value twice is negligible. + +**Important:** this method uses `Math.random` by default so the UUID isn't +*safe* (sequence of outputs can be predicted in some cases), check the +[`random()`](#random) documentation for more info on how to replace the default +PRNG if you need extra safety or need *seeded* results. + +See: [`randHex()`](#randHex), [`random()`](#random) + +### Example: + +```js +guid(); // 830e9f50-ac7f-4369-a14f-ed0e62b2fa0b +guid(); // 5de3d09b-e79c-4727-932b-48c49228d508 +``` + + + +## rand([min], [max]):Number + +Gets a random number inside range or snap to min/max values. + +### Arguments: + + 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. + 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. + + +### Example: + +```js +rand(); // 448740433.55274725 +rand(); // -31797596.097682 +rand(0, 10); // 7.369723 +rand(0, 10); // 5.987042 +``` + +See: [`random()`](#random) + + + +## randBit():Number + +Returns a random "bit" (0 or 1). Useful for addition/subtraction. + +It's slightly faster than `choice(0, 1)` since implementation is simpler (not +that it will make a huge difference in most cases). + +See: [`choice()`](#choice) + +### Example: + +```js +randBit(); // 1 +randBit(); // 0 + +//same effect as +choice(0, 1); +``` + + + +## randHex([size]):String + +Returns a random hexadecimal string. + +The default `size` is `6`. + +### Example: + +```js +randHex(); // "dd8575" +randHex(); // "e6baeb" +randHex(2); // "a2" +randHex(30); // "effd7e2ad9a4a3067e30525fab983a" +``` + + + +## randInt([min], [max]):Number + +Gets a random integer inside range or snap to min/max values. + +### Arguments: + + 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. + 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. + + +### Example: + +```js +randInt(); // 448740433 +randInt(); // -31797596 +randInt(0, 10); // 7 +randInt(0, 10); // 5 +``` + + + +## randSign():Number + +Returns a random "sign" (-1 or 1). Useful for multiplications. + +It's slightly faster than `choice(-1, 1)` since implementation is simpler (not +that it will make a huge difference in most cases). + +See: [`choice()`](#choice) + +### Example: + +```js +randSign(); // -1 +randSign(); // 1 + +//same effect as +choice(-1, 1); +``` + + + +## random():Number + +Returns a random number between `0` and `1`. Same as `Math.random()`. + +```js +random(); // 0.35435103671625257 +random(); // 0.8768321881070733 +``` + +**Important:** No methods inside mout should call `Math.random()` +directly, they all use `random/random` as a proxy, that way we can +inject/replace the pseudo-random number generator if needed (ie. in case we +need a seeded random or a better algorithm than the native one). + +### Replacing the PRNG + +In some cases we might need better/different algorithms than the one provided +by `Math.random` (ie. safer, seeded). + +Because of licensing issues, file size limitations and different needs we +decided to **not** implement a custom PRNG and instead provide a easy way to +override the default behavior. - [issue #99](https://github.com/millermedeiros/amd-utils/issues/99) + +If you are using mout with a loader that supports the [AMD map +config](https://github.com/amdjs/amdjs-api/wiki/Common-Config), such as +[RequireJS](http://requirejs.org/), you can use it to replace the PRNG +(recommended approach): + +```js +requirejs.config({ + map : { + // all modules will load "my_custom_prng" instead of + // "mout/random/random" + '*' : { + 'mout/random/random' : 'my_custom_prng' + } + } +}); +``` + +You also have the option to override `random.get` in case you are using +mout on node.js or with a loader which doesn't support the map config: + +```js +// replace the PRNG +var n = 0; +random.get = function(){ + return ++n % 2? 0 : 1; // not so random :P +}; +random(); // 0 +random(); // 1 +random(); // 0 +random(); // 1 +``` + +See this [detailed explanation about PRNG in +JavaScript](http://baagoe.org/en/w/index.php/Better_random_numbers_for_javascript) +to understand the issues with the native `Math.random` and also for a list of +algorithms that could be used instead. + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md new file mode 100644 index 00000000..2b282315 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md @@ -0,0 +1,594 @@ +# string # + +String utilities. + + +## camelCase(str):String + +Convert string to "camelCase" text. + +See: [`pascalCase()`](#pascalCase), [`unCamelCase()`](#unCamelCase) + +### Example + +```js +camelCase('lorem-ipsum-dolor'); // "loremIpsumDolor" +camelCase('lorem ipsum dolor'); // "loremIpsumDolor" +``` + + + +## contains(str, substring, [fromIndex]):Boolean + +Checks if string contains the given substring. + +See: [`startsWith()`](#startsWith), [`endsWith()`](#endsWith) + +### Example + +```js +contains('lorem', 'or'); // true +contains('lorem', 'bar'); // false +``` + + + +## crop(str, maxChars, [append]):String + +Truncate string at full words. Alias to `truncate(str, maxChars, append, true);`. + +See: [`truncate()`](#truncate) + +### Example + +```js +crop('lorem ipsum dolor', 10); // "lorem..." +crop('lorem ipsum dolor', 10, '+'); // "lorem+" +``` + + + +## endsWith(str, suffix):Boolean + +Checks if string ends with specified suffix. + +See: [`startsWith()`](#startsWith), [`contains()`](#contains) + +### Example + +```js +endsWith('lorem ipsum', 'lorem'); // false +endsWith('lorem ipsum', 'ipsum'); // true +``` + + + +## escapeHtml(str):String + +Escapes HTML special chars (`>`, `<`, `&`, `"`, `'`). + +See: [`unescapeHtml()`](#unescapeHtml) + +### Example + +```js +escapeHtml('lorem & "ipsum"'); // "lorem &amp; &quot;ipsum&quot;" +``` + + + +## escapeRegExp(str):String + +Escape special chars to be used as literals in RegExp constructors. + +### Example + +```js +str = escapeRegExp('[lorem.ipsum]'); // "\\[lorem\\.ipsum\\]" +reg = new RegExp(str); // /\[lorem\.ipsum\]/ +``` + + + +## escapeUnicode(str[, shouldEscapePrintable]):String + +Unicode escape chars. + +It will only escape non-printable ASCII chars unless `shouldEscapePrintable` is +set to `true`. + +See: [`unescapeUnicode()`](#unescapeUnicode) + +```js +escapeUnicode('føo bår'); +// > "f\u00f8o b\u00e5r" +escapeUnicode('føo bår', true); +// > "\u0066\u00f8\u006f\u0020\u0062\u00e5\u0072" +``` + + + +## hyphenate(str):String + +Replaces spaces with hyphens, split camelCase text, remove non-word chars, +remove accents and convert to lower case. + +See: [`slugify()`](#slugify), [`underscore()`](#underscore), +[`unhyphenate`](#unhyphenate) + +```js +hyphenate(' %# lorem ipsum ? $ dolor'); // "lorem-ipsum-dolor" +hyphenate('spéçïãl çhârs'); // "special-chars" +hyphenate('loremIpsum'); // "lorem-ipsum" +``` + + + +## interpolate(str, replacements[, syntax]):String + +String interpolation. Format/replace tokens with object properties. + +```js +var tmpl = 'Hello {{name}}!'; +interpolate(tmpl, {name: 'World'}); // "Hello World!" +interpolate(tmpl, {name: 'Lorem Ipsum'}); // "Hello Lorem Ipsum!" +``` + +It uses a mustache-like syntax by default but you can set your own format if +needed. You can also use Arrays for the replacements (since Arrays are +objects as well): + +```js +// matches everything inside "${}" +var syntax = /\$\{([^}]+)\}/g; +var tmpl = "Hello ${0}!"; +interpolate(tmpl, ['Foo Bar'], syntax); // "Hello Foo Bar!" +``` + + + +## lowerCase(str):String + +"Safer" `String.toLowerCase()`. (Used internally) + +### Example + +```js +(null).toLowerCase(); // Error! +(undefined).toLowerCase(); // Error! +lowerCase(null); // "" +lowerCase(undefined); // "" +``` + + + +## lpad(str, minLength[, char]):String + +Pad string from left with `char` if its' length is smaller than `minLen`. + +See: [`rpad()`](#rpad) + +### Example + +```js +lpad('a', 5); // " a" +lpad('a', 5, '-'); // "----a" +lpad('abc', 3, '-'); // "abc" +lpad('abc', 4, '-'); // "-abc" +``` + + + +## ltrim(str, [chars]):String + +Remove chars or white-spaces from beginning of string. + +`chars` is an array of chars to remove from the beginning of the string. If +`chars` is not specified, Unicode whitespace chars will be used instead. + +See: [`rtrim()`](#rtrim), [`trim()`](#trim) + +### Example + +```js +ltrim(' lorem ipsum '); // "lorem ipsum " +ltrim('--lorem ipsum--', ['-']); // "lorem ipsum--" +``` + + + +## makePath(...args):String + +Group arguments as path segments, if any of the args is `null` or `undefined` +it will be ignored from resulting path. It will also remove duplicate "/". + +See: [`array/join()`](array.html#join) + +### Example + +```js +makePath('lorem', 'ipsum', null, 'dolor'); // "lorem/ipsum/dolor" +makePath('foo///bar/'); // "foo/bar/" +``` + + + +## normalizeLineBreaks(str, [lineBreak]):String + +Normalize line breaks to a single format. Defaults to Unix `\n`. + +It handles DOS (`\r\n`), Mac (`\r`) and Unix (`\n`) formats. + +### Example + +```js +// "foo\nbar\nlorem\nipsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum'); + +// "foo\rbar\rlorem\ripsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', '\r'); + +// "foo bar lorem ipsum" +normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', ' '); +``` + + + +## pascalCase(str):String + +Convert string to "PascalCase" text. + +See: [`camelCase()`](#camelCase) + +### Example + +```js +pascalCase('lorem-ipsum-dolor'); // "LoremIpsumDolor" +pascalCase('lorem ipsum dolor'); // "LoremIpsumDolor" +``` + + + +## properCase(str):String + +UPPERCASE first char of each word, lowercase other chars. + +### Example + +```js +properCase('loRem iPSum'); // "Lorem Ipsum" +``` + + + +## removeNonASCII(str):String + +Remove [non-printable ASCII +chars](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). + +### Example + +```js +removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'); // "lorem-ipsum" +``` + + + +## removeNonWord(str):String + +Remove non-word chars. + +### Example + +```js +var str = 'lorem ~!@#$%^&*()_+`-={}[]|\\:";\'/?><., ipsum'; +removeNonWord(str); // "lorem - ipsum" +``` + + + +## repeat(str, n):String + +Repeat string n-times. + +### Example + +```js +repeat('a', 3); // "aaa" +repeat('bc', 2); // "bcbc" +repeat('a', 0); // "" +``` + + + +## replace(str, search, replacements):String + +Replace string(s) with the replacement(s) in the source. + +`search` and `replacements` can be an array, or a single item. For every item +in `search`, it will call `str.replace` with the search item and the matching +replacement in `replacements`. If `replacements` only contains one replacement, +it will be used for all the searches, otherwise it will use the replacement at +the same index as the search. + +### Example + +```js +replace('foo bar', 'foo', 'test'); // "test bar" +replace('test 1 2', ['1', '2'], 'n'); // "test n n" +replace('test 1 2', ['1', '2'], ['one', 'two']); // "test one two" +replace('123abc', [/\d/g, /[a-z]/g], ['0', '.']); // "000..." +``` + + + +## replaceAccents(str):String + +Replaces all accented chars with regular ones. + +**Important:** Only covers **Basic Latin** and **Latin-1** unicode chars. + +### Example + +```js +replaceAccents('spéçïãl çhârs'); // "special chars" +``` + + + +## rpad(str, minLength[, char]):String + +Pad string from right with `char` if its' length is smaller than `minLen`. + +See: [`lpad()`](#lpad) + +### Example + +```js +rpad('a', 5); // "a " +rpad('a', 5, '-'); // "a----" +rpad('abc', 3, '-'); // "abc" +rpad('abc', 4, '-'); // "abc-" +``` + + + +## rtrim(str, [chars]):String + +Remove chars or white-spaces from end of string. + +`chars` is an array of chars to remove from the end of the string. If +`chars` is not specified, Unicode whitespace chars will be used instead. + +See: [`trim()`](#trim), [`ltrim()`](#ltrim) + +### Example + +```js +rtrim(' lorem ipsum '); // " lorem ipsum" +rtrim('--lorem ipsum--', ['-']); // "--lorem ipsum" +``` + + + +## sentenceCase(str):String + +UPPERCASE first char of each sentence and lowercase other chars. + +### Example + +```js +var str = 'Lorem IpSum DoLOr. maeCeNnas Ullamcor.'; +sentenceCase(str); // "Lorem ipsum dolor. Maecennas ullamcor." +``` + + + +## stripHtmlTags(str):String + +Remove HTML/XML tags from string. + +### Example + +```js +var str = '

lorem ipsum

'; +stripHtmlTags(str); // "lorem ipsum" +``` + + + +## startsWith(str, prefix):Boolean + +Checks if string starts with specified prefix. + +See: [`endsWith()`](#endsWith), [`contains()`](#contains) + +### Example + +```js +startsWith('lorem ipsum', 'lorem'); // true +startsWith('lorem ipsum', 'ipsum'); // false +``` + + + +## slugify(str[, delimeter]):String + +Convert to lower case, remove accents, remove non-word chars and replace spaces +with the delimeter. The default delimeter is a hyphen. + +Note that this does not split camelCase text. + +See: [`hyphenate()`](#hyphenate) and [`underscore()`](#underscore) + +### Example + +```js +var str = 'loremIpsum dolor spéçïãl chârs'; +slugify(str); // "loremipsum-dolor-special-chars" +slugify(str, '_'); // "loremipsum_dolor_special_chars" +``` + + + +## trim(str, [chars]):String + +Remove chars or white-spaces from beginning and end of string. + +`chars` is an array of chars to remove from the beginning and end of the +string. If `chars` is not specified, Unicode whitespace chars will be used +instead. + +See: [`rtrim()`](#rtrim), [`ltrim()`](#ltrim) + +### Example + +```js +trim(' lorem ipsum '); // "lorem ipsum" +trim('-+-lorem ipsum-+-', ['-', '+']); // "lorem ipsum" +``` + + + +## truncate(str, maxChars, [append], [onlyFullWords]):String + +Limit number of chars. Returned string `length` will be `<= maxChars`. + +See: [`crop()`](#crop) + +### Arguments + + 1. `str` (String) : String + 2. `maxChars` (Number) : Maximum number of characters including `append.length`. + 3. `[append]` (String) : Value that should be added to the end of string. + Defaults to "...". + 4. `[onlyFullWords]` (Boolean) : If it shouldn't break words. Default is + `false`. (favor [`crop()`](#crop) since code will be clearer). + +### Example + +```js +truncate('lorem ipsum dolor', 11); // "lorem ip..." +truncate('lorem ipsum dolor', 11, '+'); // "lorem ipsu+" +truncate('lorem ipsum dolor', 11, null, true); // "lorem..." +``` + + + +## typecast(str):* + +Parses string and convert it into a native value. + +### Example + +```js +typecast('lorem ipsum'); // "lorem ipsum" +typecast('123'); // 123 +typecast('123.45'); // 123.45 +typecast('false'); // false +typecast('true'); // true +typecast('null'); // null +typecast('undefined'); // undefined +``` + + + +## unCamelCase(str, [delimiter]):String + +Add the delimiter between camelCase text and convert first char of each word to +lower case. + +The delimiter defaults to a space character. + +See: [`camelCase()`][#camelCase] + +### Example + +```js +unCamelCase('loremIpsumDolor'); // "lorem ipsum dolor" +unCamelCase('loremIpsumDolor', '-'); // "lorem-ipsum-color" +``` + + +## underscore(str):String + +Replaces spaces with underscores, split camelCase text, remove non-word chars, +remove accents and convert to lower case. + +See: [`slugify()`](#slugify), [`hyphenate()`](#hyphenate) + +```js +underscore(' %# lorem ipsum ? $ dolor'); // "lorem_ipsum_dolor" +underscore('spéçïãl çhârs'); // "special_chars" +underscore('loremIpsum'); // "lorem_ipsum" +``` + + + +## unescapeHtml(str):String + +Unescapes HTML special chars (`>`, `<`, `&`, `"`, `'`). + +See: [`escapeHtml()`](#escapeHtml) + +### Example + +```js +unescapeHtml('lorem &amp; &quot;ipsum&quot;'); // 'lorem & "ipsum"' +``` + + + +## unescapeUnicode(str):String + +Unescapes unicode char sequences. + +See: [`escapeUnicode()`](#escapeUnicode) + +```js +unescapeUnicode('\\u0066\\u00f8\\u006f\\u0020\\u0062\\u00e5\\u0072'); +// > 'føo bår' +``` + + + +## unhyphenate(str):String + +Replaces hyphens with spaces. (only hyphens between word chars) + +See : [`hyphenate()`](#hyphenate) + +### Example + +```js +unhyphenate('lorem-ipsum-dolor'); // "lorem ipsum dolor" +``` + + +## upperCase(str):String + +"Safer" `String.toUpperCase()`. (Used internally) + +### Example + +```js +(null).toUpperCase(); // Error! +(undefined).toUpperCase(); // Error! +upperCase(null); // "" +upperCase(undefined); // "" +``` + + + +## WHITE_SPACES:Array + +Constant array of all [Unicode white-space +characters](http://en.wikipedia.org/wiki/Whitespace_character). + + + +------------------------------------------------------------------------------- + +For more usage examples check specs inside `/tests` folder. Unit tests are the +best documentation you can get... + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md new file mode 100644 index 00000000..628c2a9b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md @@ -0,0 +1,64 @@ +# time # + +Utilities for time manipulation. + + +## convert(value, sourceUnit, [destinationUnit]):Number + +Converts time between units. + +Available units: `millisecond`, `second`, `minute`, `hour`, `day`, `week`. +Abbreviations: `ms`, `s`, `m`, `h`, `d`, `w`. + +We do **not** support year and month as a time unit since their values are not +fixed. + +The default `destinationUnit` is `ms`. + +```js +convert(1, 'minute'); // 60000 +convert(2.5, 's', 'ms'); // 2500 +convert(2, 'm', 's'); // 120 +convert(500, 'ms', 's'); // 0.5 +``` + + + +## now():Number + +Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. +Uses `Date.now()` if available. + +### Example + +```js +now(); // 1335449614650 +``` + + + +## parseMs(ms):Object + +Parse timestamp (milliseconds) into an object `{milliseconds:number, +seconds:number, minutes:number, hours:number, days:number}`. + +### Example + +```js +// {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} +parseMs(2348765454); +``` + + + +## toTimeString(ms):String + +Convert timestamp (milliseconds) into a time string in the format "[H:]MM:SS". + +### Example + +```js +toTimeString(12513); // "00:12" +toTimeString(951233); // "15:51" +toTimeString(8765235); // "2:26:05" +``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function.js new file mode 100644 index 00000000..43a16ef4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function.js @@ -0,0 +1,18 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'bind' : require('./function/bind'), + 'compose' : require('./function/compose'), + 'debounce' : require('./function/debounce'), + 'func' : require('./function/func'), + 'makeIterator_' : require('./function/makeIterator_'), + 'partial' : require('./function/partial'), + 'prop' : require('./function/prop'), + 'series' : require('./function/series'), + 'throttle' : require('./function/throttle'), + 'timeout' : require('./function/timeout') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js new file mode 100644 index 00000000..71bc1257 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js @@ -0,0 +1,23 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + * @param {Function} fn Function. + * @param {object} context Execution context. + * @param {rest} args Arguments (0...n arguments). + * @return {Function} Wrapped Function. + */ + function bind(fn, context, args){ + var argsArr = slice(arguments, 2); //curried args + return function(){ + return fn.apply(context, argsArr.concat(slice(arguments))); + }; + } + + module.exports = bind; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js new file mode 100644 index 00000000..8cd5c5f3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js @@ -0,0 +1,23 @@ + + + /** + * Returns a function that composes multiple functions, passing results to + * each other. + */ + function compose() { + var fns = arguments; + return function(arg){ + // only cares about the first argument since the chain can only + // deal with a single return value anyway. It should start from + // the last fn. + var n = fns.length; + while (n--) { + arg = fns[n].call(this, arg); + } + return arg; + }; + } + + module.exports = compose; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js new file mode 100644 index 00000000..a0ed07f5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js @@ -0,0 +1,29 @@ + + + /** + * Debounce callback execution + */ + function debounce(fn, threshold, isAsap){ + var timeout, result; + function debounced(){ + var args = arguments, context = this; + function delayed(){ + if (! isAsap) { + result = fn.apply(context, args); + } + timeout = null; + } + if (timeout) { + clearTimeout(timeout); + } else if (isAsap) { + result = fn.apply(context, args); + } + timeout = setTimeout(delayed, threshold); + return result; + } + return debounced; + } + + module.exports = debounce; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js new file mode 100644 index 00000000..b81bf0a8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js @@ -0,0 +1,14 @@ + + + /** + * Returns a function that call a method on the passed object + */ + function func(name){ + return function(obj){ + return obj[name](); + }; + } + + module.exports = func; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js new file mode 100644 index 00000000..767610a5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js @@ -0,0 +1,34 @@ +var prop = require('./prop'); +var deepMatches = require('../object/deepMatches'); + + /** + * Converts argument into a valid iterator. + * Used internally on most array/object/collection methods that receives a + * callback/iterator providing a shortcut syntax. + */ + function makeIterator(src, thisObj){ + switch(typeof src) { + case 'object': + // typeof null == "object" + return (src != null)? function(val, key, target){ + return deepMatches(val, src); + } : src; + case 'string': + case 'number': + return prop(src); + case 'function': + if (typeof thisObj === 'undefined') { + return src; + } else { + return function(val, i, arr){ + return src.call(thisObj, val, i, arr); + }; + } + default: + return src; + } + } + + module.exports = makeIterator; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js new file mode 100644 index 00000000..d63ff1be --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js @@ -0,0 +1,19 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Creates a partially applied function. + */ + function partial(fn, var_args){ + var argsArr = slice(arguments, 1); //curried args + return function(){ + return fn.apply(this, argsArr.concat(slice(arguments))); + }; + } + + module.exports = partial; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js new file mode 100644 index 00000000..734acb7a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js @@ -0,0 +1,14 @@ + + + /** + * Returns a function that gets a property of the passed object + */ + function prop(name){ + return function(obj){ + return obj[name]; + }; + } + + module.exports = prop; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js new file mode 100644 index 00000000..25159c2c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js @@ -0,0 +1,22 @@ + + + /** + * Returns a function that will execute a list of functions in sequence + * passing the same arguments to each one. (useful for batch processing + * items during a forEach loop) + */ + function series(){ + var fns = arguments; + return function(){ + var i = 0, + n = fns.length; + while (i < n) { + fns[i].apply(this, arguments); + i += 1; + } + }; + } + + module.exports = series; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js new file mode 100644 index 00000000..619dc540 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js @@ -0,0 +1,32 @@ +var now = require('../time/now'); + + /** + */ + function throttle(fn, delay){ + var context, timeout, result, args, + cur, diff, prev = 0; + function delayed(){ + prev = now(); + timeout = null; + result = fn.apply(context, args); + } + function throttled(){ + context = this; + args = arguments; + cur = now(); + diff = delay - (cur - prev); + if (diff <= 0) { + clearTimeout(timeout); + prev = cur; + result = fn.apply(context, args); + } else if (! timeout) { + timeout = setTimeout(delayed, diff); + } + return result; + } + return throttled; + } + + module.exports = throttle; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js new file mode 100644 index 00000000..e0d21a66 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js @@ -0,0 +1,21 @@ + + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Delays the call of a function within a given context. + */ + function timeout(fn, millis, context){ + + var args = slice(arguments, 3); + + return setTimeout(function() { + fn.apply(context, args); + }, millis); + } + + module.exports = timeout; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/index.js new file mode 100644 index 00000000..32a1c639 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/index.js @@ -0,0 +1,24 @@ +/**@license + * mout v0.6.0 | http://moutjs.com | MIT license + */ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'VERSION' : '0.6.0', + 'array' : require('./array'), + 'collection' : require('./collection'), + 'date' : require('./date'), + 'function' : require('./function'), + 'lang' : require('./lang'), + 'math' : require('./math'), + 'number' : require('./number'), + 'object' : require('./object'), + 'queryString' : require('./queryString'), + 'random' : require('./random'), + 'string' : require('./string'), + 'time' : require('./time') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang.js new file mode 100644 index 00000000..b9816218 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang.js @@ -0,0 +1,36 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'clone' : require('./lang/clone'), + 'createObject' : require('./lang/createObject'), + 'ctorApply' : require('./lang/ctorApply'), + 'deepClone' : require('./lang/deepClone'), + 'defaults' : require('./lang/defaults'), + 'inheritPrototype' : require('./lang/inheritPrototype'), + 'is' : require('./lang/is'), + 'isArguments' : require('./lang/isArguments'), + 'isArray' : require('./lang/isArray'), + 'isBoolean' : require('./lang/isBoolean'), + 'isDate' : require('./lang/isDate'), + 'isEmpty' : require('./lang/isEmpty'), + 'isFinite' : require('./lang/isFinite'), + 'isFunction' : require('./lang/isFunction'), + 'isInteger' : require('./lang/isInteger'), + 'isKind' : require('./lang/isKind'), + 'isNaN' : require('./lang/isNaN'), + 'isNull' : require('./lang/isNull'), + 'isNumber' : require('./lang/isNumber'), + 'isObject' : require('./lang/isObject'), + 'isPlainObject' : require('./lang/isPlainObject'), + 'isRegExp' : require('./lang/isRegExp'), + 'isString' : require('./lang/isString'), + 'isUndefined' : require('./lang/isUndefined'), + 'isnt' : require('./lang/isnt'), + 'kindOf' : require('./lang/kindOf'), + 'toArray' : require('./lang/toArray'), + 'toString' : require('./lang/toString') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js new file mode 100644 index 00000000..33c4e949 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js @@ -0,0 +1,49 @@ +var kindOf = require('./kindOf'); +var isPlainObject = require('./isPlainObject'); +var mixIn = require('../object/mixIn'); + + /** + * Clone native types. + */ + function clone(val){ + switch (kindOf(val)) { + case 'Object': + return cloneObject(val); + case 'Array': + return cloneArray(val); + case 'RegExp': + return cloneRegExp(val); + case 'Date': + return cloneDate(val); + default: + return val; + } + } + + function cloneObject(source) { + if (isPlainObject(source)) { + return mixIn({}, source); + } else { + return source; + } + } + + function cloneRegExp(r) { + var flags = ''; + flags += r.multiline ? 'm' : ''; + flags += r.global ? 'g' : ''; + flags += r.ignorecase ? 'i' : ''; + return new RegExp(r.source, flags); + } + + function cloneDate(date) { + return new Date(+date); + } + + function cloneArray(arr) { + return arr.slice(); + } + + module.exports = clone; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js new file mode 100644 index 00000000..bbc14c1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js @@ -0,0 +1,18 @@ +var mixIn = require('../object/mixIn'); + + /** + * Create Object using prototypal inheritance and setting custom properties. + * - Mix between Douglas Crockford Prototypal Inheritance and the EcmaScript 5 `Object.create()` method. + * @param {object} parent Parent Object. + * @param {object} [props] Object properties. + * @return {object} Created object. + */ + function createObject(parent, props){ + function F(){} + F.prototype = parent; + return mixIn(new F(), props); + + } + module.exports = createObject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js new file mode 100644 index 00000000..d68dc506 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js @@ -0,0 +1,17 @@ + + + function F(){} + + /** + * Do fn.apply on a constructor. + */ + function ctorApply(ctor, args) { + F.prototype = ctor.prototype; + var instance = new F(); + ctor.apply(instance, args); + return instance; + } + + module.exports = ctorApply; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js new file mode 100644 index 00000000..25fd95f1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js @@ -0,0 +1,48 @@ +var clone = require('./clone'); +var forOwn = require('../object/forOwn'); +var kindOf = require('./kindOf'); +var isPlainObject = require('./isPlainObject'); + + /** + * Recursively clone native types. + */ + function deepClone(val, instanceClone) { + switch ( kindOf(val) ) { + case 'Object': + return cloneObject(val, instanceClone); + case 'Array': + return cloneArray(val, instanceClone); + default: + return clone(val); + } + } + + function cloneObject(source, instanceClone) { + if (isPlainObject(source)) { + var out = {}; + forOwn(source, function(val, key) { + this[key] = deepClone(val, instanceClone); + }, out); + return out; + } else if (instanceClone) { + return instanceClone(source); + } else { + return source; + } + } + + function cloneArray(arr, instanceClone) { + var out = [], + i = -1, + n = arr.length, + val; + while (++i < n) { + out[i] = deepClone(arr[i], instanceClone); + } + return out; + } + + module.exports = deepClone; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js new file mode 100644 index 00000000..1111b2ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js @@ -0,0 +1,17 @@ +var toArray = require('./toArray'); +var find = require('../array/find'); + + /** + * Return first non void argument + */ + function defaults(var_args){ + return find(toArray(arguments), nonVoid); + } + + function nonVoid(val){ + return val != null; + } + + module.exports = defaults; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js new file mode 100644 index 00000000..cd8a379e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js @@ -0,0 +1,16 @@ +var createObject = require('./createObject'); + + /** + * Inherit prototype from another Object. + * - inspired by Nicholas Zackas Solution + * @param {object} child Child object + * @param {object} parent Parent Object + */ + function inheritPrototype(child, parent){ + var p = createObject(parent.prototype); + p.constructor = child; + child.prototype = p; + } + + module.exports = inheritPrototype; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js new file mode 100644 index 00000000..4a835739 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js @@ -0,0 +1,23 @@ + + + /** + * Check if both arguments are egal. + */ + function is(x, y){ + // implementation borrowed from harmony:egal spec + if (x === y) { + // 0 === -0, but they are not identical + return x !== 0 || 1 / x === 1 / y; + } + + // NaN !== NaN, but they are identical. + // NaNs are the only non-reflexive value, i.e., if x !== x, + // then x is a NaN. + // isNaN is broken: it converts its argument to number, so + // isNaN("foo") => true + return x !== x && y !== y; + } + + module.exports = is; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js new file mode 100644 index 00000000..f7b08ba4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js @@ -0,0 +1,15 @@ +var isKind = require('./isKind'); + + /** + */ + var isArgs = isKind(arguments, 'Arguments')? + function(val){ + return isKind(val, 'Arguments'); + } : + function(val){ + // Arguments is an Object on IE7 + return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); + }; + + module.exports = isArgs; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js new file mode 100644 index 00000000..262ee400 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + var isArray = Array.isArray || function (val) { + return isKind(val, 'Array'); + }; + module.exports = isArray; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js new file mode 100644 index 00000000..86557cb9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isBoolean(val) { + return isKind(val, 'Boolean'); + } + module.exports = isBoolean; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js new file mode 100644 index 00000000..4a5130f2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isDate(val) { + return isKind(val, 'Date'); + } + module.exports = isDate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js new file mode 100644 index 00000000..0e9f77da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js @@ -0,0 +1,24 @@ +var forOwn = require('../object/forOwn'); +var isArray = require('./isArray'); + + function isEmpty(val){ + if (val == null) { + // typeof null == 'object' so we check it first + return false; + } else if ( typeof val === 'string' || isArray(val) ) { + return !val.length; + } else if ( typeof val === 'object' || typeof val === 'function' ) { + var result = true; + forOwn(val, function(){ + result = false; + return false; // break loop + }); + return result; + } else { + return false; + } + } + + module.exports = isEmpty; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js new file mode 100644 index 00000000..6d4006f9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js @@ -0,0 +1,21 @@ +var isNumber = require('./isNumber'); + + var global = this; + + /** + * Check if value is finite + */ + function isFinite(val){ + var is = false; + if (typeof val === 'string' && val !== '') { + is = global.isFinite( parseFloat(val) ); + } else if (isNumber(val)){ + // need to use isNumber because of Number constructor + is = global.isFinite( val ); + } + return is; + } + + module.exports = isFinite; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js new file mode 100644 index 00000000..216879f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isFunction(val) { + return isKind(val, 'Function'); + } + module.exports = isFunction; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js new file mode 100644 index 00000000..29f95d96 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js @@ -0,0 +1,12 @@ +var isNumber = require('./isNumber'); + + /** + * Check if value is an integer + */ + function isInteger(val){ + return isNumber(val) && (val % 1 === 0); + } + + module.exports = isInteger; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js new file mode 100644 index 00000000..02301e04 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js @@ -0,0 +1,9 @@ +var kindOf = require('./kindOf'); + /** + * Check if value is from a specific "kind". + */ + function isKind(val, kind){ + return kindOf(val) === kind; + } + module.exports = isKind; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js new file mode 100644 index 00000000..f6efeb1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js @@ -0,0 +1,15 @@ +var isNumber = require('./isNumber'); + + /** + * Check if value is NaN for realz + */ + function isNaN(val){ + // based on the fact that NaN !== NaN + // need to check if it's a number to avoid conflicts with host objects + // also need to coerce ToNumber to avoid edge case `new Number(NaN)` + return !isNumber(val) || val != +val; + } + + module.exports = isNaN; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js new file mode 100644 index 00000000..6252f9ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js @@ -0,0 +1,9 @@ + + /** + */ + function isNull(val){ + return val === null; + } + module.exports = isNull; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js new file mode 100644 index 00000000..126c1cce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isNumber(val) { + return isKind(val, 'Number'); + } + module.exports = isNumber; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js new file mode 100644 index 00000000..7350c891 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isObject(val) { + return isKind(val, 'Object'); + } + module.exports = isObject; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js new file mode 100644 index 00000000..0d2d7b65 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js @@ -0,0 +1,14 @@ + + + /** + * Checks if the value is created by the `Object` constructor. + */ + function isPlainObject(value) { + return (!!value + && typeof value === 'object' + && value.constructor === Object); + } + + module.exports = isPlainObject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js new file mode 100644 index 00000000..fc5459a9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isRegExp(val) { + return isKind(val, 'RegExp'); + } + module.exports = isRegExp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js new file mode 100644 index 00000000..f8906584 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js @@ -0,0 +1,8 @@ +var isKind = require('./isKind'); + /** + */ + function isString(val) { + return isKind(val, 'String'); + } + module.exports = isString; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js new file mode 100644 index 00000000..fb2261df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js @@ -0,0 +1,10 @@ + + var UNDEF; + + /** + */ + function isUndef(val){ + return val === UNDEF; + } + module.exports = isUndef; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js new file mode 100644 index 00000000..9dad58ce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js @@ -0,0 +1,12 @@ +var is = require('./is'); + + /** + * Check if both values are not identical/egal + */ + function isnt(x, y){ + return !is(x, y); + } + + module.exports = isnt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js new file mode 100644 index 00000000..663464d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js @@ -0,0 +1,20 @@ + + + var _rKind = /^\[object (.*)\]$/, + _toString = Object.prototype.toString, + UNDEF; + + /** + * Gets the "kind" of value. (e.g. "String", "Number", etc) + */ + function kindOf(val) { + if (val === null) { + return 'Null'; + } else if (val === UNDEF) { + return 'Undefined'; + } else { + return _rKind.exec( _toString.call(val) )[1]; + } + } + module.exports = kindOf; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js new file mode 100644 index 00000000..e39b8734 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js @@ -0,0 +1,31 @@ +var kindOf = require('./kindOf'); + + var _win = this; + + /** + * Convert array-like object into array + */ + function toArray(val){ + var ret = [], + kind = kindOf(val), + n; + + if (val != null) { + if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { + //string, regexp, function have .length but user probably just want + //to wrap value into an array.. + ret[ret.length] = val; + } else { + //window returns true on isObject in IE7 and may have length + //property. `typeof NodeList` returns `function` on Safari so + //we can't use it (#58) + n = val.length; + while (n--) { + ret[n] = val[n]; + } + } + } + return ret; + } + module.exports = toArray; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js new file mode 100644 index 00000000..ae5c2b0f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js @@ -0,0 +1,13 @@ + + + /** + * Typecast a value to a String, using an empty string value for null or + * undefined. + */ + function toString(val){ + return val == null ? '' : val.toString(); + } + + module.exports = toString; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math.js new file mode 100644 index 00000000..c6ee889b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math.js @@ -0,0 +1,19 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'ceil' : require('./math/ceil'), + 'clamp' : require('./math/clamp'), + 'countSteps' : require('./math/countSteps'), + 'floor' : require('./math/floor'), + 'inRange' : require('./math/inRange'), + 'isNear' : require('./math/isNear'), + 'lerp' : require('./math/lerp'), + 'loop' : require('./math/loop'), + 'map' : require('./math/map'), + 'norm' : require('./math/norm'), + 'round' : require('./math/round') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js new file mode 100644 index 00000000..a279e158 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js @@ -0,0 +1,11 @@ + + /** + * Round value up with a custom radix. + */ + function ceil(val, step){ + step = Math.abs(step || 1); + return Math.ceil(val / step) * step; + } + + module.exports = ceil; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js new file mode 100644 index 00000000..e929a9a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js @@ -0,0 +1,9 @@ + + /** + * Clamps value inside range. + */ + function clamp(val, min, max){ + return val < min? min : (val > max? max : val); + } + module.exports = clamp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js new file mode 100644 index 00000000..60ac90c3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js @@ -0,0 +1,16 @@ + + /** + * Count number of full steps. + */ + function countSteps(val, step, overflow){ + val = Math.floor(val / step); + + if (overflow) { + return val % overflow; + } + + return val; + } + + module.exports = countSteps; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js new file mode 100644 index 00000000..9de50531 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js @@ -0,0 +1,10 @@ + + /** + * Floor value to full steps. + */ + function floor(val, step){ + step = Math.abs(step || 1); + return Math.floor(val / step) * step; + } + module.exports = floor; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js new file mode 100644 index 00000000..763218f8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js @@ -0,0 +1,11 @@ + + /** + * Checks if value is inside the range. + */ + function inRange(val, min, max, threshold){ + threshold = threshold || 0; + return (val + threshold >= min && val - threshold <= max); + } + + module.exports = inRange; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js new file mode 100644 index 00000000..45486b6d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js @@ -0,0 +1,9 @@ + + /** + * Check if value is close to target. + */ + function isNear(val, target, threshold){ + return (Math.abs(val - target) <= threshold); + } + module.exports = isNear; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js new file mode 100644 index 00000000..111e2717 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js @@ -0,0 +1,11 @@ + + /** + * Linear interpolation. + * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE + */ + function lerp(ratio, start, end){ + return start + (end - start) * ratio; + } + + module.exports = lerp; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js new file mode 100644 index 00000000..35207c1a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js @@ -0,0 +1,10 @@ + + /** + * Loops value inside range. + */ + function loop(val, min, max){ + return val < min? max : (val > max? min : val); + } + + module.exports = loop; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js new file mode 100644 index 00000000..96c4b787 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js @@ -0,0 +1,11 @@ +var lerp = require('./lerp'); +var norm = require('./norm'); + /** + * Maps a number from one scale to another. + * @example map(3, 0, 4, -1, 1) -> 0.5 + */ + function map(val, min1, max1, min2, max2){ + return lerp( norm(val, min1, max1), min2, max2 ); + } + module.exports = map; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js new file mode 100644 index 00000000..54caf78a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js @@ -0,0 +1,9 @@ + + /** + * Gets normalized ratio of value inside range. + */ + function norm(val, min, max){ + return (val - min) / (max - min); + } + module.exports = norm; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js new file mode 100644 index 00000000..d108e6cd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js @@ -0,0 +1,12 @@ + + /** + * Round number to a specific radix + */ + function round(value, radix){ + radix = radix || 1; // default round 1 + return Math.round(value / radix) * radix; + } + + module.exports = round; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number.js new file mode 100644 index 00000000..0b6186cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number.js @@ -0,0 +1,21 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'MAX_INT' : require('./number/MAX_INT'), + 'MAX_UINT' : require('./number/MAX_UINT'), + 'MIN_INT' : require('./number/MIN_INT'), + 'abbreviate' : require('./number/abbreviate'), + 'currencyFormat' : require('./number/currencyFormat'), + 'enforcePrecision' : require('./number/enforcePrecision'), + 'pad' : require('./number/pad'), + 'rol' : require('./number/rol'), + 'ror' : require('./number/ror'), + 'sign' : require('./number/sign'), + 'toInt' : require('./number/toInt'), + 'toUInt' : require('./number/toUInt'), + 'toUInt31' : require('./number/toUInt31') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js new file mode 100644 index 00000000..1d6f0e48 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit signed integer value. (2^31 - 1) + */ + + module.exports = 2147483647; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js new file mode 100644 index 00000000..700da0f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit unsigned integet value (2^32 - 1) + */ + + module.exports = 4294967295; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js new file mode 100644 index 00000000..b34ab2ce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Minimum 32-bit signed integer value (-2^31). + */ + + module.exports = -2147483648; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js new file mode 100644 index 00000000..dd6716b9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js @@ -0,0 +1,35 @@ +var enforcePrecision = require('./enforcePrecision'); + + var _defaultDict = { + thousand : 'K', + million : 'M', + billion : 'B' + }; + + /** + * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) + */ + function abbreviateNumber(val, nDecimals, dict){ + nDecimals = nDecimals != null? nDecimals : 1; + dict = dict || _defaultDict; + val = enforcePrecision(val, nDecimals); + + var str, mod; + + if (val < 1000000) { + mod = enforcePrecision(val / 1000, nDecimals); + // might overflow to next scale during rounding + str = mod < 1000? mod + dict.thousand : 1 + dict.million; + } else if (val < 1000000000) { + mod = enforcePrecision(val / 1000000, nDecimals); + str = mod < 1000? mod + dict.million : 1 + dict.billion; + } else { + str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; + } + + return str; + } + + module.exports = abbreviateNumber; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js new file mode 100644 index 00000000..1cf02497 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js @@ -0,0 +1,26 @@ + + + /** + * Converts number into currency format + */ + function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { + nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; + decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; + thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; + + //can't use enforce precision since it returns a number and we are + //doing a RegExp over the string + var fixed = val.toFixed(nDecimalDigits), + //separate begin [$1], middle [$2] and decimal digits [$4] + parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); + + if(parts){ //val >= 1000 || val <= -1000 + return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); + }else{ + return fixed.replace('.', decimalSeparator); + } + } + + module.exports = currencyFormat; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js new file mode 100644 index 00000000..f73a92d7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js @@ -0,0 +1,13 @@ + + /** + * Enforce a specific amount of decimal digits and also fix floating + * point rounding issues. + * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> + * 0.61` + */ + function enforcePrecision(val, nDecimalDigits){ + var pow = Math.pow(10, nDecimalDigits); + return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); + } + module.exports = enforcePrecision; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js new file mode 100644 index 00000000..da752706 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js @@ -0,0 +1,12 @@ +var lpad = require('../string/lpad'); + + /** + * Add padding zeros if n.length < minLength. + */ + function pad(n, minLength, char){ + return lpad(''+ n, minLength, char || '0'); + } + + module.exports = pad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js new file mode 100644 index 00000000..ecd58da4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js @@ -0,0 +1,10 @@ + + /** + * Bitwise circular shift left + * http://en.wikipedia.org/wiki/Circular_shift + */ + function rol(val, shift){ + return (val << shift) | (val >> (32 - shift)); + } + module.exports = rol; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js new file mode 100644 index 00000000..2eda81da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js @@ -0,0 +1,10 @@ + + /** + * Bitwise circular shift right + * http://en.wikipedia.org/wiki/Circular_shift + */ + function ror(val, shift){ + return (val >> shift) | (val << (32 - shift)); + } + module.exports = ror; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js new file mode 100644 index 00000000..b854a4ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js @@ -0,0 +1,15 @@ + + + /** + * Get sign of the value. + */ + function sign(val) { + var num = Number(val); + if (num === 0) return num; // +0 and +0 === 0 + if (isNaN(num)) return num; // NaN + return num < 0? -1 : 1; + } + + module.exports = sign; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js new file mode 100644 index 00000000..bcefae0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js @@ -0,0 +1,15 @@ + + + /** + * "Convert" value into an 32-bit integer. + * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. + * IMPORTANT: val will wrap at 2^31 and -2^31. + * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 + */ + function toInt(val){ + return ~~val; + } + + module.exports = toInt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js new file mode 100644 index 00000000..5290b627 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js @@ -0,0 +1,13 @@ + + + /** + * "Convert" value into a 32-bit unsigned integer. + * IMPORTANT: Value will wrap at 2^32. + */ + function toUInt(val){ + return val >>> 0; + } + + module.exports = toUInt; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js new file mode 100644 index 00000000..fcc5a97c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js @@ -0,0 +1,13 @@ +var MAX_INT = require('./MAX_INT'); + + /** + * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + * IMPORTANT: value wil wrap at 2^31, if negative will return 0. + */ + function toUInt31(val){ + return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); + } + + module.exports = toUInt31; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object.js new file mode 100644 index 00000000..76c06424 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object.js @@ -0,0 +1,42 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'bindAll' : require('./object/bindAll'), + 'contains' : require('./object/contains'), + 'deepEquals' : require('./object/deepEquals'), + 'deepFillIn' : require('./object/deepFillIn'), + 'deepMatches' : require('./object/deepMatches'), + 'deepMixIn' : require('./object/deepMixIn'), + 'equals' : require('./object/equals'), + 'every' : require('./object/every'), + 'fillIn' : require('./object/fillIn'), + 'filter' : require('./object/filter'), + 'find' : require('./object/find'), + 'forIn' : require('./object/forIn'), + 'forOwn' : require('./object/forOwn'), + 'functions' : require('./object/functions'), + 'get' : require('./object/get'), + 'has' : require('./object/has'), + 'hasOwn' : require('./object/hasOwn'), + 'keys' : require('./object/keys'), + 'map' : require('./object/map'), + 'matches' : require('./object/matches'), + 'max' : require('./object/max'), + 'merge' : require('./object/merge'), + 'min' : require('./object/min'), + 'mixIn' : require('./object/mixIn'), + 'namespace' : require('./object/namespace'), + 'pick' : require('./object/pick'), + 'pluck' : require('./object/pluck'), + 'reduce' : require('./object/reduce'), + 'reject' : require('./object/reject'), + 'set' : require('./object/set'), + 'size' : require('./object/size'), + 'some' : require('./object/some'), + 'unset' : require('./object/unset'), + 'values' : require('./object/values') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js new file mode 100644 index 00000000..b2f27d08 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js @@ -0,0 +1,18 @@ +var functions = require('./functions'); +var bind = require('../function/bind'); +var forEach = require('../array/forEach'); + + /** + * Binds methods of the object to be run in it's own context. + */ + function bindAll(obj, rest_methodNames){ + var keys = arguments.length > 1? + Array.prototype.slice.call(arguments, 1) : functions(obj); + forEach(keys, function(key){ + obj[key] = bind(obj[key], obj); + }); + } + + module.exports = bindAll; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js new file mode 100644 index 00000000..8076e2c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js @@ -0,0 +1,13 @@ +var some = require('./some'); + + /** + * Check if object contains value + */ + function contains(obj, needle) { + return some(obj, function(val) { + return (val === needle); + }); + } + module.exports = contains; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js new file mode 100644 index 00000000..fcde9449 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js @@ -0,0 +1,27 @@ +var isObject = require('../lang/isObject'); +var equals = require('./equals'); + + function defaultCompare(a, b) { + return a === b; + } + + /** + * Recursively checks for same properties and values. + */ + function deepEquals(a, b, callback){ + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + function compare(a, b){ + return deepEquals(a, b, callback); + } + + return equals(a, b, compare); + } + + module.exports = deepEquals; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js new file mode 100644 index 00000000..d27db44d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js @@ -0,0 +1,32 @@ +var forOwn = require('./forOwn'); +var isPlainObject = require('../lang/isPlainObject'); + + /** + * Deeply copy missing properties in the target from the defaults. + */ + function deepFillIn(target, defaults){ + var i = 0, + n = arguments.length, + obj; + + while(++i < n) { + obj = arguments[i]; + if (obj) { + forOwn(obj, function(newValue, key) { + var curValue = target[key]; + if (curValue == null) { + target[key] = newValue; + } else if (isPlainObject(curValue) + && isPlainObject(newValue)) { + deepFillIn(curValue, newValue); + } + }); + } + } + + return target; + } + + module.exports = deepFillIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js new file mode 100644 index 00000000..3366c52d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js @@ -0,0 +1,55 @@ +var forOwn = require('./forOwn'); +var isArray = require('../lang/isArray'); + + function containsMatch(array, pattern) { + var i = -1, length = array.length; + while (++i < length) { + if (deepMatches(array[i], pattern)) { + return true; + } + } + + return false; + } + + function matchArray(target, pattern) { + var i = -1, patternLength = pattern.length; + while (++i < patternLength) { + if (!containsMatch(target, pattern[i])) { + return false; + } + } + + return true; + } + + function matchObject(target, pattern) { + var result = true; + forOwn(pattern, function(val, key) { + if (!deepMatches(target[key], val)) { + // Return false to break out of forOwn early + return (result = false); + } + }); + + return result; + } + + /** + * Recursively check if the objects match. + */ + function deepMatches(target, pattern){ + if (target && typeof target === 'object') { + if (isArray(target) && isArray(pattern)) { + return matchArray(target, pattern); + } else { + return matchObject(target, pattern); + } + } else { + return target === pattern; + } + } + + module.exports = deepMatches; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js new file mode 100644 index 00000000..a97e98d0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js @@ -0,0 +1,34 @@ +var forOwn = require('./forOwn'); +var isPlainObject = require('../lang/isPlainObject'); + + /** + * Mixes objects into the target object, recursively mixing existing child + * objects. + */ + function deepMixIn(target, objects) { + var i = 0, + n = arguments.length, + obj; + + while(++i < n){ + obj = arguments[i]; + if (obj) { + forOwn(obj, copyProp, target); + } + } + + return target; + } + + function copyProp(val, key) { + var existing = this[key]; + if (isPlainObject(val) && isPlainObject(existing)) { + deepMixIn(existing, val); + } else { + this[key] = val; + } + } + + module.exports = deepMixIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js new file mode 100644 index 00000000..f50cbe4e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js @@ -0,0 +1,36 @@ +var hasOwn = require('./hasOwn'); +var every = require('./every'); +var isObject = require('../lang/isObject'); + + function defaultCompare(a, b) { + return a === b; + } + + // Makes a function to compare the object values from the specified compare + // operation callback. + function makeCompare(callback) { + return function(value, key) { + return hasOwn(this, key) && callback(value, this[key]); + }; + } + + function checkProperties(value, key) { + return hasOwn(this, key); + } + + /** + * Checks if two objects have the same keys and values. + */ + function equals(a, b, callback) { + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + return (every(a, makeCompare(callback), b) && + every(b, checkProperties, a)); + } + + module.exports = equals; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js new file mode 100644 index 00000000..01106e5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js @@ -0,0 +1,23 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object every + */ + function every(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + forOwn(obj, function(val, key) { + // we consider any falsy values as "false" on purpose so shorthand + // syntax can be used to check property existence + if (!callback(val, key, obj)) { + result = false; + return false; // break + } + }); + return result; + } + + module.exports = every; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js new file mode 100644 index 00000000..80dcdf07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js @@ -0,0 +1,20 @@ +var forEach = require('../array/forEach'); +var forOwn = require('./forOwn'); + + /** + * Copy missing properties in the obj from the defaults. + */ + function fillIn(obj, var_defaults){ + forEach(Array.prototype.slice.call(arguments, 1), function(base){ + forOwn(base, function(val, key){ + if (obj[key] == null) { + obj[key] = val; + } + }); + }); + return obj; + } + + module.exports = fillIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js new file mode 100644 index 00000000..3a83a92f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js @@ -0,0 +1,20 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Creates a new object with all the properties where the callback returns + * true. + */ + function filterValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + output[key] = value; + } + }); + + return output; + } + module.exports = filterValues; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js new file mode 100644 index 00000000..d39c0706 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js @@ -0,0 +1,21 @@ +var some = require('./some'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Returns first item that matches criteria + */ + function find(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result; + some(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + result = value; + return true; //break + } + }); + return result; + } + + module.exports = find; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js new file mode 100644 index 00000000..367f08ca --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js @@ -0,0 +1,62 @@ + + + var _hasDontEnumBug, + _dontEnums; + + function checkDontEnum(){ + _dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + + _hasDontEnumBug = true; + + for (var key in {'toString': null}) { + _hasDontEnumBug = false; + } + } + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forIn(obj, fn, thisObj){ + var key, i = 0; + // no need to check if argument is a real object that way we can use + // it for arrays, functions, date, etc. + + //post-pone check till needed + if (_hasDontEnumBug == null) checkDontEnum(); + + for (key in obj) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + + if (_hasDontEnumBug) { + while (key = _dontEnums[i++]) { + // since we aren't using hasOwn check we need to make sure the + // property was overwritten + if (obj[key] !== Object.prototype[key]) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + } + } + } + + function exec(fn, obj, key, thisObj){ + return fn.call(thisObj, obj[key], key, obj); + } + + module.exports = forIn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js new file mode 100644 index 00000000..5f2dfbfc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js @@ -0,0 +1,19 @@ +var hasOwn = require('./hasOwn'); +var forIn = require('./forIn'); + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forOwn(obj, fn, thisObj){ + forIn(obj, function(val, key){ + if (hasOwn(obj, key)) { + return fn.call(thisObj, obj[key], key, obj); + } + }); + } + + module.exports = forOwn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js new file mode 100644 index 00000000..f5717979 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js @@ -0,0 +1,18 @@ +var forIn = require('./forIn'); + + /** + * return a list of all enumerable properties that have function values + */ + function functions(obj){ + var keys = []; + forIn(obj, function(val, key){ + if (typeof val === 'function'){ + keys.push(key); + } + }); + return keys.sort(); + } + + module.exports = functions; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js new file mode 100644 index 00000000..6673561e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js @@ -0,0 +1,20 @@ + + + /** + * get "nested" object property + */ + function get(obj, prop){ + var parts = prop.split('.'), + last = parts.pop(); + + while (prop = parts.shift()) { + obj = obj[prop]; + if (typeof obj !== 'object') return; + } + + return obj[last]; + } + + module.exports = get; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js new file mode 100644 index 00000000..ca9f2289 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js @@ -0,0 +1,15 @@ +var get = require('./get'); + + var UNDEF; + + /** + * Check if object has nested property. + */ + function has(obj, prop){ + return get(obj, prop) !== UNDEF; + } + + module.exports = has; + + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js new file mode 100644 index 00000000..7e3c82ae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js @@ -0,0 +1,12 @@ + + + /** + * Safer Object.hasOwnProperty + */ + function hasOwn(obj, prop){ + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + module.exports = hasOwn; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js new file mode 100644 index 00000000..dd2f4f55 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object keys + */ + var keys = Object.keys || function (obj) { + var keys = []; + forOwn(obj, function(val, key){ + keys.push(key); + }); + return keys; + }; + + module.exports = keys; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js new file mode 100644 index 00000000..dd449a78 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js @@ -0,0 +1,18 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Creates a new object where all the values are the result of calling + * `callback`. + */ + function mapValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(val, key, obj) { + output[key] = callback(val, key, obj); + }); + + return output; + } + module.exports = mapValues; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js new file mode 100644 index 00000000..6074faa2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js @@ -0,0 +1,20 @@ +var forOwn = require('./forOwn'); + + /** + * checks if a object contains all given properties/values + */ + function matches(target, props){ + // can't use "object/every" because of circular dependency + var result = true; + forOwn(props, function(val, key){ + if (target[key] !== val) { + // break loop at first difference + return (result = false); + } + }); + return result; + } + + module.exports = matches; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js new file mode 100644 index 00000000..3e8e92c7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js @@ -0,0 +1,12 @@ +var arrMax = require('../array/max'); +var values = require('./values'); + + /** + * Returns maximum value inside object. + */ + function max(obj, compareFn) { + return arrMax(values(obj), compareFn); + } + + module.exports = max; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js new file mode 100644 index 00000000..6961f608 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js @@ -0,0 +1,40 @@ +var hasOwn = require('./hasOwn'); +var deepClone = require('../lang/deepClone'); +var isObject = require('../lang/isObject'); + + /** + * Deep merge objects. + */ + function merge() { + var i = 1, + key, val, obj, target; + + // make sure we don't modify source element and it's properties + // objects are passed by reference + target = deepClone( arguments[0] ); + + while (obj = arguments[i++]) { + for (key in obj) { + if ( ! hasOwn(obj, key) ) { + continue; + } + + val = obj[key]; + + if ( isObject(val) && isObject(target[key]) ){ + // inception, deep merge objects + target[key] = merge(target[key], val); + } else { + // make sure arrays, regexp, date, objects are cloned + target[key] = deepClone(val); + } + + } + } + + return target; + } + + module.exports = merge; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js new file mode 100644 index 00000000..e1e66976 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js @@ -0,0 +1,12 @@ +var arrMin = require('../array/min'); +var values = require('./values'); + + /** + * Returns minimum value inside object. + */ + function min(obj, iterator) { + return arrMin(values(obj), iterator); + } + + module.exports = min; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js new file mode 100644 index 00000000..55ec8fd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js @@ -0,0 +1,28 @@ +var forOwn = require('./forOwn'); + + /** + * Combine properties from all the objects into first one. + * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. + * @param {object} target Target Object + * @param {...object} objects Objects to be combined (0...n objects). + * @return {object} Target Object. + */ + function mixIn(target, objects){ + var i = 0, + n = arguments.length, + obj; + while(++i < n){ + obj = arguments[i]; + if (obj != null) { + forOwn(obj, copyProp, target); + } + } + return target; + } + + function copyProp(val, key){ + this[key] = val; + } + + module.exports = mixIn; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js new file mode 100644 index 00000000..c6e79f63 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js @@ -0,0 +1,19 @@ +var forEach = require('../array/forEach'); + + /** + * Create nested object if non-existent + */ + function namespace(obj, path){ + if (!path) return obj; + forEach(path.split('.'), function(key){ + if (!obj[key]) { + obj[key] = {}; + } + obj = obj[key]; + }); + return obj; + } + + module.exports = namespace; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js new file mode 100644 index 00000000..74e56f98 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js @@ -0,0 +1,18 @@ + + + /** + * Return a copy of the object, filtered to only have values for the whitelisted keys. + */ + function pick(obj, var_keys){ + var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), + out = {}, + i = 0, key; + while (key = keys[i++]) { + out[key] = obj[key]; + } + return out; + } + + module.exports = pick; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js new file mode 100644 index 00000000..e844df47 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js @@ -0,0 +1,13 @@ +var map = require('./map'); +var prop = require('../function/prop'); + + /** + * Extract a list of property values. + */ + function pluck(obj, propName){ + return map(obj, prop(propName)); + } + + module.exports = pluck; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js new file mode 100644 index 00000000..6f19a3a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js @@ -0,0 +1,29 @@ +var forOwn = require('./forOwn'); +var size = require('./size'); + + /** + * Object reduce + */ + function reduce(obj, callback, memo, thisObj) { + var initial = arguments.length > 2; + + if (!size(obj) && !initial) { + throw new Error('reduce of empty object with no initial value'); + } + + forOwn(obj, function(value, key, list) { + if (!initial) { + memo = value; + initial = true; + } + else { + memo = callback.call(thisObj, memo, value, key, list); + } + }); + + return memo; + } + + module.exports = reduce; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js new file mode 100644 index 00000000..74643795 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js @@ -0,0 +1,16 @@ +var filter = require('./filter'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object reject + */ + function reject(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + return filter(obj, function(value, index, obj) { + return !callback(value, index, obj); + }, thisObj); + } + + module.exports = reject; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js new file mode 100644 index 00000000..9b3cdc48 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js @@ -0,0 +1,17 @@ +var namespace = require('./namespace'); + + /** + * set "nested" object property + */ + function set(obj, prop, val){ + var parts = (/^(.+)\.(.+)$/).exec(prop); + if (parts){ + namespace(obj, parts[1])[parts[2]] = val; + } else { + obj[prop] = val; + } + } + + module.exports = set; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js new file mode 100644 index 00000000..97885953 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object size + */ + function size(obj) { + var count = 0; + forOwn(obj, function(){ + count++; + }); + return count; + } + + module.exports = size; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js new file mode 100644 index 00000000..384c6f3c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js @@ -0,0 +1,21 @@ +var forOwn = require('./forOwn'); +var makeIterator = require('../function/makeIterator_'); + + /** + * Object some + */ + function some(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + forOwn(obj, function(val, key) { + if (callback(val, key, obj)) { + result = true; + return false; // break + } + }); + return result; + } + + module.exports = some; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js new file mode 100644 index 00000000..343bca0a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js @@ -0,0 +1,23 @@ +var has = require('./has'); + + /** + * Unset object property. + */ + function unset(obj, prop){ + if (has(obj, prop)) { + var parts = prop.split('.'), + last = parts.pop(); + while (prop = parts.shift()) { + obj = obj[prop]; + } + return (delete obj[last]); + + } else { + // if property doesn't exist treat as deleted + return true; + } + } + + module.exports = unset; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js new file mode 100644 index 00000000..265a6938 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js @@ -0,0 +1,16 @@ +var forOwn = require('./forOwn'); + + /** + * Get object values + */ + function values(obj) { + var vals = []; + forOwn(obj, function(val, key){ + vals.push(val); + }); + return vals; + } + + module.exports = values; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/package.json new file mode 100644 index 00000000..76eadf21 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/package.json @@ -0,0 +1,123 @@ +{ + "name": "mout", + "description": "Modular Utilities", + "version": "0.6.0", + "homepage": "http://moutjs.com/", + "contributors": [ + { + "name": "Adam Nowotny" + }, + { + "name": "André Cruz", + "email": "amdfcruz@gmail.com" + }, + { + "name": "Conrad Zimmerman", + "url": "http://www.conradz.com" + }, + { + "name": "Friedemann Altrock", + "email": "frodenius@gmail.com" + }, + { + "name": "Jarrod Overson", + "url": "http://jarrodoverson.com" + }, + { + "name": "Miller Medeiros", + "email": "contact@millermedeiros.com", + "url": "http://blog.millermedeiros.com" + }, + { + "name": "Zach Shipley" + } + ], + "keywords": [ + "utilities", + "functional", + "amd-utils", + "stdlib" + ], + "repository": { + "type": "git", + "url": "git://github.com/mout/mout.git" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/mit-license.php" + } + ], + "bugs": { + "url": "https://github.com/mout/mout/issues/" + }, + "main": "./index.js", + "scripts": { + "prepublish": "node build cjs .", + "pretest": "node build pkg", + "test": "node node_modules/istanbul/lib/cli test tests/runner.js --hook-run-in-context" + }, + "directories": { + "doc": "./doc" + }, + "devDependencies": { + "istanbul": "~0.1.27", + "jasmine-node": "~1.2.2", + "requirejs": "2.x", + "nodefy": "*", + "mdoc": "~0.3.2", + "handlebars": "~1.0.6", + "commander": "~1.0.5", + "rocambole": "~0.2.3" + }, + "testling": { + "preprocess": "node build testling", + "browsers": { + "ie": [ + 7, + 8, + 9, + 10 + ], + "firefox": [ + 17, + "nightly" + ], + "chrome": [ + 23, + "canary" + ], + "opera": [ + 12, + "next" + ], + "safari": [ + 5.1, + 6 + ], + "iphone": [ + 6 + ], + "ipad": [ + 6 + ] + }, + "scripts": [ + "tests/lib/jasmine/jasmine.js", + "tests/lib/jasmine/jasmine.async.js", + "tests/lib/jasmine/jasmine-tap.js", + "tests/lib/requirejs/require.js", + "tests/testling/src.js", + "tests/testling/specs.js", + "tests/runner.js" + ] + }, + "readme": "![mout](http://moutjs.com/logo.png \"Modular JavaScript Utilties\")\n\nhttp://moutjs.com/\n\n[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout)\n\nAll code is library agnostic and consist mostly of helper methods that aren't\ndirectly related with the DOM, the purpose of this library isn't to replace\nDojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common\nproblems that aren't solved by most of them. Consider it as a crossbrowser\nJavaScript standard library.\n\n\n\n## Main goals ##\n\n - increase code reuse;\n - be clear (code should be clean/readable);\n - be easy to debug;\n - be easy to maintain;\n - follow best practices;\n - follow standards when possible;\n - **don't convert JavaScript into another language!**\n - be compatible with other frameworks;\n - be modular;\n - have unit tests for all modules;\n - work on multiple environments (IE7+, modern browsers, node.js);\n\n\n\n## What shouldn't be here ##\n\n - UI components;\n - CSS selector engine;\n - Event system - pub/sub;\n - Template engine;\n - Anything that isn't generic enough to be on a standard library;\n - Anything that could be a separate library and/or isn't a modular utility...\n\n\n\n## API Documentation ##\n\nOnline documentation can be found at http://moutjs.com/ or inside the\n`doc` folder.\n\n\n\n## FAQ / Wiki / IRC ##\n\nFor more info about project structure, design decisions, tips, how to\ncontribute, build system, etc, please check the [project\nwiki](https://github.com/mout/mout/wiki).\n\nWe also have an IRC channel [#moutjs on\nirc.freenode.net](http://webchat.freenode.net/?channels=moutjs)\n\n\n\n## License ##\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n\n", + "readmeFilename": "README.md", + "_id": "mout@0.6.0", + "dist": { + "shasum": "d2f7a6e5a796040bf7b6259a41b46705f49d271d" + }, + "_from": "mout@~0.6.0", + "_resolved": "https://registry.npmjs.org/mout/-/mout-0.6.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js new file mode 100644 index 00000000..22685a7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js @@ -0,0 +1,15 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'contains' : require('./queryString/contains'), + 'decode' : require('./queryString/decode'), + 'encode' : require('./queryString/encode'), + 'getParam' : require('./queryString/getParam'), + 'getQuery' : require('./queryString/getQuery'), + 'parse' : require('./queryString/parse'), + 'setParam' : require('./queryString/setParam') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js new file mode 100644 index 00000000..da678cf4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js @@ -0,0 +1,12 @@ +var getQuery = require('./getQuery'); + + /** + * Checks if query string contains parameter. + */ + function contains(url, paramName) { + var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` + return regex.test(getQuery(url)); + } + + module.exports = contains; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js new file mode 100644 index 00000000..7e689990 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js @@ -0,0 +1,21 @@ +var typecast = require('../string/typecast'); +var isString = require('../lang/isString'); + + /** + * Decode query string into an object of keys => vals. + */ + function decode(queryStr, shouldTypecast) { + var queryArr = (queryStr || '').replace('?', '').split('&'), + n = queryArr.length, + obj = {}, + item, val; + while (n--) { + item = queryArr[n].split('='); + val = shouldTypecast === false? item[1] : typecast(item[1]); + obj[item[0]] = isString(val)? decodeURIComponent(val) : val; + } + return obj; + } + + module.exports = decode; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js new file mode 100644 index 00000000..6d2b12f8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js @@ -0,0 +1,15 @@ +var forOwn = require('../object/forOwn'); + + /** + * Encode object into a query string. + */ + function encode(obj){ + var query = []; + forOwn(obj, function(val, key){ + query.push( key +'='+ encodeURIComponent(val) ); + }); + return (query.length)? '?'+ query.join('&') : ''; + } + + module.exports = encode; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js new file mode 100644 index 00000000..f149c3ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js @@ -0,0 +1,15 @@ +var typecast = require('../string/typecast'); +var getQuery = require('./getQuery'); + + /** + * Get query parameter value. + */ + function getParam(url, param, shouldTypecast){ + var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 + result = regexp.exec( getQuery(url) ), + val = (result && result[2])? result[2] : null; + return shouldTypecast === false? val : typecast(val); + } + + module.exports = getParam; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js new file mode 100644 index 00000000..5194af2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js @@ -0,0 +1,13 @@ + + + /** + * Gets full query as string with all special chars decoded. + */ + function getQuery(url) { + url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) + var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt + return (queryString)? decodeURIComponent(queryString[0]) : ''; + } + + module.exports = getQuery; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js new file mode 100644 index 00000000..532906c0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js @@ -0,0 +1,13 @@ +var decode = require('./decode'); +var getQuery = require('./getQuery'); + + /** + * Get query string, parses and decodes it. + */ + function parse(url, shouldTypecast) { + return decode(getQuery(url), shouldTypecast); + } + + module.exports = parse; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js new file mode 100644 index 00000000..052a9ba6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js @@ -0,0 +1,28 @@ + + + /** + * Set query string parameter value + */ + function setParam(url, paramName, value){ + url = url || ''; + + var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); + var param = paramName +'='+ encodeURIComponent( value ); + + if ( re.test(url) ) { + return url.replace(re, '$1'+ param); + } else { + if (url.indexOf('?') === -1) { + url += '?'; + } + if (url.indexOf('=') !== -1) { + url += '&'; + } + return url + param; + } + + } + + module.exports = setParam; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random.js new file mode 100644 index 00000000..d9267f01 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random.js @@ -0,0 +1,16 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'choice' : require('./random/choice'), + 'guid' : require('./random/guid'), + 'rand' : require('./random/rand'), + 'randBit' : require('./random/randBit'), + 'randHex' : require('./random/randHex'), + 'randInt' : require('./random/randInt'), + 'randSign' : require('./random/randSign'), + 'random' : require('./random/random') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js new file mode 100644 index 00000000..51aa82a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js @@ -0,0 +1,15 @@ +var randInt = require('./randInt'); +var isArray = require('../lang/isArray'); + + /** + * Returns a random element from the supplied arguments + * or from the array (if single argument is an array). + */ + function choice(items) { + var target = (arguments.length === 1 && isArray(items))? items : arguments; + return target[ randInt(0, target.length - 1) ]; + } + + module.exports = choice; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js new file mode 100644 index 00000000..41f6eddc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js @@ -0,0 +1,24 @@ +var randHex = require('./randHex'); +var choice = require('./choice'); + + /** + * Returns pseudo-random guid (UUID v4) + * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random + * by default and sequences can be predicted in some cases. See the + * "random/random" documentation for more info about it and how to replace + * the default PRNG. + */ + function guid() { + return ( + randHex(8)+'-'+ + randHex(4)+'-'+ + // v4 UUID always contain "4" at this position to specify it was + // randomly generated + '4' + randHex(3) +'-'+ + // v4 UUID always contain chars [a,b,8,9] at this position + choice(8, 9, 'a', 'b') + randHex(3)+'-'+ + randHex(12) + ); + } + module.exports = guid; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js new file mode 100644 index 00000000..782dec88 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js @@ -0,0 +1,15 @@ +var random = require('./random'); +var MIN_INT = require('../number/MIN_INT'); +var MAX_INT = require('../number/MAX_INT'); + + /** + * Returns random number inside range + */ + function rand(min, max){ + min = min == null? MIN_INT : min; + max = max == null? MAX_INT : max; + return min + (max - min) * random(); + } + + module.exports = rand; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js new file mode 100644 index 00000000..bd20b4a0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js @@ -0,0 +1,11 @@ +var random = require('./random'); + + /** + * Returns random bit (0 or 1) + */ + function randomBit() { + return random() > 0.5? 1 : 0; + } + + module.exports = randomBit; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js new file mode 100644 index 00000000..d8d711c3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js @@ -0,0 +1,19 @@ +var choice = require('./choice'); + + var _chars = '0123456789abcdef'.split(''); + + /** + * Returns a random hexadecimal string + */ + function randHex(size){ + size = size && size > 0? size : 6; + var str = ''; + while (size--) { + str += choice(_chars); + } + return str; + } + + module.exports = randHex; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js new file mode 100644 index 00000000..e237d964 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js @@ -0,0 +1,18 @@ +var MIN_INT = require('../number/MIN_INT'); +var MAX_INT = require('../number/MAX_INT'); +var rand = require('./rand'); + + /** + * Gets random integer inside range or snap to min/max values. + */ + function randInt(min, max){ + min = min == null? MIN_INT : ~~min; + max = max == null? MAX_INT : ~~max; + // can't be max + 0.5 otherwise it will round up if `rand` + // returns `max` causing it to overflow range. + // -0.5 and + 0.49 are required to avoid bias caused by rounding + return Math.round( rand(min - 0.5, max + 0.499999999999) ); + } + + module.exports = randInt; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js new file mode 100644 index 00000000..5a9fed76 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js @@ -0,0 +1,11 @@ +var random = require('./random'); + + /** + * Returns random sign (-1 or 1) + */ + function randomSign() { + return random() > 0.5? 1 : -1; + } + + module.exports = randomSign; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js new file mode 100644 index 00000000..670a3cc4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js @@ -0,0 +1,18 @@ + + + /** + * Just a wrapper to Math.random. No methods inside mout/random should call + * Math.random() directly so we can inject the pseudo-random number + * generator if needed (ie. in case we need a seeded random or a better + * algorithm than the native one) + */ + function random(){ + return random.get(); + } + + // we expose the method so it can be swapped if needed + random.get = Math.random; + + module.exports = random; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js new file mode 100644 index 00000000..7bcc961b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js @@ -0,0 +1,46 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'append' : require('./array/append'), + 'collect' : require('./array/collect'), + 'combine' : require('./array/combine'), + 'compact' : require('./array/compact'), + 'contains' : require('./array/contains'), + 'difference' : require('./array/difference'), + 'every' : require('./array/every'), + 'filter' : require('./array/filter'), + 'find' : require('./array/find'), + 'findIndex' : require('./array/findIndex'), + 'flatten' : require('./array/flatten'), + 'forEach' : require('./array/forEach'), + 'indexOf' : require('./array/indexOf'), + 'insert' : require('./array/insert'), + 'intersection' : require('./array/intersection'), + 'invoke' : require('./array/invoke'), + 'join' : require('./array/join'), + 'lastIndexOf' : require('./array/lastIndexOf'), + 'map' : require('./array/map'), + 'max' : require('./array/max'), + 'min' : require('./array/min'), + 'pick' : require('./array/pick'), + 'pluck' : require('./array/pluck'), + 'range' : require('./array/range'), + 'reduce' : require('./array/reduce'), + 'reduceRight' : require('./array/reduceRight'), + 'reject' : require('./array/reject'), + 'remove' : require('./array/remove'), + 'removeAll' : require('./array/removeAll'), + 'shuffle' : require('./array/shuffle'), + 'some' : require('./array/some'), + 'sort' : require('./array/sort'), + 'split' : require('./array/split'), + 'toLookup' : require('./array/toLookup'), + 'union' : require('./array/union'), + 'unique' : require('./array/unique'), + 'xor' : require('./array/xor'), + 'zip' : require('./array/zip') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js new file mode 100644 index 00000000..549d8754 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js @@ -0,0 +1,21 @@ +define(function () { + + /** + * Appends an array to the end of another. + * The first array will be modified. + */ + function append(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var pad = arr1.length, + i = -1, + len = arr2.length; + while (++i < len) { + arr1[pad + i] = arr2[i]; + } + return arr1; + } + return append; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js new file mode 100644 index 00000000..8f60cda2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js @@ -0,0 +1,26 @@ +define(['./append', '../function/makeIterator_'], function (append, makeIterator) { + + /** + * Maps the items in the array and concatenates the result arrays. + */ + function collect(arr, callback, thisObj){ + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + var value = callback(arr[i], i, arr); + if (value != null) { + append(results, value); + } + } + + return results; + } + + return collect; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js new file mode 100644 index 00000000..22efb860 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js @@ -0,0 +1,22 @@ +define(['./indexOf'], function (indexOf) { + + /** + * Combines an array with all the items of another. + * Does not allow duplicates and is case and type sensitive. + */ + function combine(arr1, arr2) { + if (arr2 == null) { + return arr1; + } + + var i = -1, len = arr2.length; + while (++i < len) { + if (indexOf(arr1, arr2[i]) === -1) { + arr1.push(arr2[i]); + } + } + + return arr1; + } + return combine; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js new file mode 100644 index 00000000..02a81098 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js @@ -0,0 +1,13 @@ +define(['./filter'], function (filter) { + + /** + * Remove all null/undefined items from array. + */ + function compact(arr) { + return filter(arr, function(val){ + return (val != null); + }); + } + + return compact; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js new file mode 100644 index 00000000..fca4f7cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js @@ -0,0 +1,10 @@ +define(['./indexOf'], function (indexOf) { + + /** + * If array contains values. + */ + function contains(arr, val) { + return indexOf(arr, val) !== -1; + } + return contains; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js new file mode 100644 index 00000000..819bda3e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js @@ -0,0 +1,19 @@ +define(['./unique', './filter', './some', './contains'], function (unique, filter, some, contains) { + + + /** + * Return a new Array with elements that aren't present in the other Arrays. + */ + function difference(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return !some(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + return difference; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js new file mode 100644 index 00000000..78ba46d3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js @@ -0,0 +1,27 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Array every + */ + function every(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (!callback(arr[i], i, arr) ) { + result = false; + break; + } + } + + return result; + } + + return every; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js new file mode 100644 index 00000000..52cf685a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js @@ -0,0 +1,26 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Array filter + */ + function filter(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + return filter; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js new file mode 100644 index 00000000..3957dcd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js @@ -0,0 +1,13 @@ +define(['./findIndex'], function (findIndex) { + + /** + * Returns first item that matches criteria + */ + function find(arr, iterator, thisObj){ + var idx = findIndex(arr, iterator, thisObj); + return idx >= 0? arr[idx] : void(0); + } + + return find; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js new file mode 100644 index 00000000..59dfeeb9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js @@ -0,0 +1,23 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Returns the index of the first item that matches criteria + */ + function findIndex(arr, iterator, thisObj){ + iterator = makeIterator(iterator, thisObj); + if (arr == null) { + return -1; + } + + var i = -1, len = arr.length; + while (++i < len) { + if (iterator(arr[i], i, arr)) { + return i; + } + } + + return -1; + } + + return findIndex; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js new file mode 100644 index 00000000..42e87f43 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js @@ -0,0 +1,42 @@ +define(['../lang/isArray', './append'], function (isArray, append) { + + /* + * Helper function to flatten to a destination array. + * Used to remove the need to create intermediate arrays while flattening. + */ + function flattenTo(arr, result, level) { + if (arr == null) { + return result; + } else if (level === 0) { + append(result, arr); + return result; + } + + var value, + i = -1, + len = arr.length; + while (++i < len) { + value = arr[i]; + if (isArray(value)) { + flattenTo(value, result, level - 1); + } else { + result.push(value); + } + } + return result; + } + + /** + * Recursively flattens an array. + * A new array containing all the elements is returned. + * If `shallow` is true, it will only flatten one level. + */ + function flatten(arr, level) { + level = level == null? -1 : level; + return flattenTo(arr, [], level); + } + + return flatten; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js new file mode 100644 index 00000000..0e045868 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Array forEach + */ + function forEach(arr, callback, thisObj) { + if (arr == null) { + return; + } + var i = -1, + len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback.call(thisObj, arr[i], i, arr) === false ) { + break; + } + } + } + + return forEach; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js new file mode 100644 index 00000000..0e75f99b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Array.indexOf + */ + function indexOf(arr, item, fromIndex) { + fromIndex = fromIndex || 0; + if (arr == null) { + return -1; + } + + var len = arr.length, + i = fromIndex < 0 ? len + fromIndex : fromIndex; + while (i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[i] === item) { + return i; + } + + i++; + } + + return -1; + } + + return indexOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js new file mode 100644 index 00000000..d8d831f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js @@ -0,0 +1,14 @@ +define(['./difference', '../lang/toArray'], function (difference, toArray) { + + /** + * Insert item into array if not already present. + */ + function insert(arr, rest_items) { + var diff = difference(toArray(arguments).slice(1), arr); + if (diff.length) { + Array.prototype.push.apply(arr, diff); + } + return arr.length; + } + return insert; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js new file mode 100644 index 00000000..64e6ee97 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js @@ -0,0 +1,20 @@ +define(['./unique', './filter', './every', './contains'], function (unique, filter, every, contains) { + + + /** + * Return a new Array with elements common to all Arrays. + * - based on underscore.js implementation + */ + function intersection(arr) { + var arrs = Array.prototype.slice.call(arguments, 1), + result = filter(unique(arr), function(needle){ + return every(arrs, function(haystack){ + return contains(haystack, needle); + }); + }); + return result; + } + + return intersection; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js new file mode 100644 index 00000000..a2e78b39 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js @@ -0,0 +1,23 @@ +define(['./forEach'], function (forEach) { + + /** + * Call `methodName` on each item of the array passing custom arguments if + * needed. + */ + function invoke(arr, methodName, var_args){ + if (arr == null) { + return arr; + } + + var args = Array.prototype.slice.call(arguments, 2); + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + value[methodName].apply(value, args); + } + + return arr; + } + + return invoke; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js new file mode 100644 index 00000000..2c618d29 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js @@ -0,0 +1,17 @@ +define(['./filter'], function(filter) { + + function isValidString(val) { + return (val != null && val !== ''); + } + + /** + * Joins strings with the specified separator inserted between each value. + * Null values and empty strings will be excluded. + */ + function join(items, separator) { + separator = separator || ''; + return filter(items, isValidString).join(separator); + } + + return join; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js new file mode 100644 index 00000000..931235f4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Array lastIndexOf + */ + function lastIndexOf(arr, item, fromIndex) { + if (arr == null) { + return -1; + } + + var len = arr.length; + fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; + fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; + + while (fromIndex >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if (arr[fromIndex] === item) { + return fromIndex; + } + fromIndex--; + } + + return -1; + } + + return lastIndexOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js new file mode 100644 index 00000000..1580b481 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js @@ -0,0 +1,22 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Array map + */ + function map(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null){ + return results; + } + + var i = -1, len = arr.length; + while (++i < len) { + results[i] = callback(arr[i], i, arr); + } + + return results; + } + + return map; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js new file mode 100644 index 00000000..a7326c89 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js @@ -0,0 +1,34 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Return maximum value inside array + */ + function max(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return Infinity; + } else if (arr.length && !iterator) { + return Math.max.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = -Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp > compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + return max; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js new file mode 100644 index 00000000..41644480 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js @@ -0,0 +1,34 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * Return minimum value inside array + */ + function min(arr, iterator, thisObj){ + if (arr == null || !arr.length) { + return -Infinity; + } else if (arr.length && !iterator) { + return Math.min.apply(Math, arr); + } else { + iterator = makeIterator(iterator, thisObj); + var result, + compare = Infinity, + value, + temp; + + var i = -1, len = arr.length; + while (++i < len) { + value = arr[i]; + temp = iterator(value, i, arr); + if (temp < compare) { + compare = temp; + result = value; + } + } + + return result; + } + } + + return min; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js new file mode 100644 index 00000000..97d7f595 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js @@ -0,0 +1,14 @@ +define(['../random/randInt'], function (randInt) { + + /** + * Remove a random item from the Array and return it + */ + function pick(arr){ + if (arr == null || !arr.length) return; + var idx = randInt(0, arr.length - 1); + return arr.splice(idx, 1)[0]; + } + + return pick; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js new file mode 100644 index 00000000..c908856e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js @@ -0,0 +1,12 @@ +define(['./map'], function (map) { + + /** + * Extract a list of property values. + */ + function pluck(arr, propName){ + return map(arr, propName); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js new file mode 100644 index 00000000..148ebf96 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js @@ -0,0 +1,27 @@ +define(['../math/countSteps'], function (countSteps) { + + /** + * Returns an Array of numbers inside range. + */ + function range(start, stop, step) { + if (stop == null) { + stop = start; + start = 0; + } + step = step || 1; + + var result = [], + nSteps = countSteps(stop - start, step), + i = start; + + while (i <= stop) { + result.push(i); + i += step; + } + + return result; + } + + return range; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js new file mode 100644 index 00000000..88aacfd5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js @@ -0,0 +1,33 @@ +define(['./forEach'], function (forEach) { + + /** + * Array reduce + */ + function reduce(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2, + result = initVal; + + if (arr == null || !arr.length) { + if (!hasInit) { + throw new Error('reduce of empty array with no initial value'); + } else { + return initVal; + } + } + + var i = -1, len = arr.length; + while (++i < len) { + if (!hasInit) { + result = arr[i]; + hasInit = true; + } else { + result = fn(result, arr[i], i, arr); + } + } + + return result; + } + + return reduce; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js new file mode 100644 index 00000000..ddae0e7f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js @@ -0,0 +1,34 @@ +define(function () { + + /** + * Array reduceRight + */ + function reduceRight(arr, fn, initVal) { + // check for args.length since initVal might be "undefined" see #gh-57 + var hasInit = arguments.length > 2; + + if (arr == null || !arr.length) { + if (hasInit) { + return initVal; + } else { + throw new Error('reduce of empty array with no initial value'); + } + } + + var i = arr.length, result = initVal, value; + while (--i >= 0) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + value = arr[i]; + if (!hasInit) { + result = value; + hasInit = true; + } else { + result = fn(result, value, i, arr); + } + } + return result; + } + + return reduceRight; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js new file mode 100644 index 00000000..db105dde --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js @@ -0,0 +1,25 @@ +define(['./forEach', '../function/makeIterator_'], function(forEach, makeIterator) { + + /** + * Array reject + */ + function reject(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var results = []; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + value = arr[i]; + if (!callback(value, i, arr)) { + results.push(value); + } + } + + return results; + } + + return reject; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js new file mode 100644 index 00000000..dec9134d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js @@ -0,0 +1,13 @@ +define(['./indexOf'], function(indexOf){ + + /** + * Remove a single item from the array. + * (it won't remove duplicates, just a single item) + */ + function remove(arr, item){ + var idx = indexOf(arr, item); + if (idx !== -1) arr.splice(idx, 1); + } + + return remove; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js new file mode 100644 index 00000000..e81022b8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js @@ -0,0 +1,15 @@ +define(['./indexOf'], function(indexOf){ + + /** + * Remove all instances of an item from array. + */ + function removeAll(arr, item){ + var idx = indexOf(arr, item); + while (idx !== -1) { + arr.splice(idx, 1); + idx = indexOf(arr, item, idx); + } + } + + return removeAll; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js new file mode 100644 index 00000000..f5a60972 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js @@ -0,0 +1,28 @@ +define(['../random/randInt', './forEach'], function (randInt, forEach) { + + /** + * Shuffle array items. + */ + function shuffle(arr) { + var results = [], + rnd; + if (arr == null) { + return results; + } + + var i = -1, len = arr.length, value; + while (++i < len) { + if (!i) { + results[0] = arr[0]; + } else { + rnd = randInt(0, i); + results[i] = results[rnd]; + results[rnd] = arr[i]; + } + } + + return results; + } + + return shuffle; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js new file mode 100644 index 00000000..e46a9781 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js @@ -0,0 +1,27 @@ +define(['../function/makeIterator_'], function (makeIterator) { + + /** + * Array some + */ + function some(arr, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length; + while (++i < len) { + // we iterate over sparse items since there is no way to make it + // work properly on IE 7-8. see #64 + if ( callback(arr[i], i, arr) ) { + result = true; + break; + } + } + + return result; + } + + return some; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js new file mode 100644 index 00000000..4c194042 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js @@ -0,0 +1,55 @@ +define(function () { + + /** + * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) + */ + function mergeSort(arr, compareFn) { + if (arr == null) { + return []; + } else if (arr.length < 2) { + return arr; + } + + if (compareFn == null) { + compareFn = defaultCompare; + } + + var mid, left, right; + + mid = ~~(arr.length / 2); + left = mergeSort( arr.slice(0, mid), compareFn ); + right = mergeSort( arr.slice(mid, arr.length), compareFn ); + + return merge(left, right, compareFn); + } + + function defaultCompare(a, b) { + return a < b ? -1 : (a > b? 1 : 0); + } + + function merge(left, right, compareFn) { + var result = []; + + while (left.length && right.length) { + if (compareFn(left[0], right[0]) <= 0) { + // if 0 it should preserve same order (stable) + result.push(left.shift()); + } else { + result.push(right.shift()); + } + } + + if (left.length) { + result.push.apply(result, left); + } + + if (right.length) { + result.push.apply(result, right); + } + + return result; + } + + return mergeSort; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js new file mode 100644 index 00000000..a17275eb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js @@ -0,0 +1,35 @@ +define(function() { + + /** + * Split array into a fixed number of segments. + */ + function split(array, segments) { + segments = segments || 2; + var results = []; + if (array == null) { + return results; + } + + var minLength = Math.floor(array.length / segments), + remainder = array.length % segments, + i = 0, + len = array.length, + segmentIndex = 0, + segmentLength; + + while (i < len) { + segmentLength = minLength; + if (segmentIndex < remainder) { + segmentLength++; + } + + results.push(array.slice(i, i + segmentLength)); + + segmentIndex++; + i += segmentLength; + } + + return results; + } + return split; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js new file mode 100644 index 00000000..aac8fd1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js @@ -0,0 +1,28 @@ +define(['../lang/isFunction'], function (isFunction) { + + /** + * Creates an object that holds a lookup for the objects in the array. + */ + function toLookup(arr, key) { + var result = {}; + if (arr == null) { + return result; + } + + var i = -1, len = arr.length, value; + if (isFunction(key)) { + while (++i < len) { + value = arr[i]; + result[key(value)] = value; + } + } else { + while (++i < len) { + value = arr[i]; + result[value[key]] = value; + } + } + + return result; + } + return toLookup; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js new file mode 100644 index 00000000..5f9922e5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js @@ -0,0 +1,18 @@ +define(['./unique', './append'], function (unique, append) { + + /** + * Concat multiple arrays and remove duplicates + */ + function union(arrs) { + var results = []; + var i = -1, len = arguments.length; + while (++i < len) { + append(results, arguments[i]); + } + + return unique(results); + } + + return union; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js new file mode 100644 index 00000000..c4bd23b4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js @@ -0,0 +1,16 @@ +define(['./indexOf', './filter'], function(indexOf, filter){ + + /** + * @return {array} Array of unique items + */ + function unique(arr){ + return filter(arr, isUnique); + } + + function isUnique(item, i, arr){ + return indexOf(arr, item, i+1) === -1; + } + + return unique; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js new file mode 100644 index 00000000..7df89d9c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js @@ -0,0 +1,24 @@ +define(['./unique', './filter', './contains'], function (unique, filter, contains) { + + + /** + * Exclusive OR. Returns items that are present in a single array. + * - like ptyhon's `symmetric_difference` + */ + function xor(arr1, arr2) { + arr1 = unique(arr1); + arr2 = unique(arr2); + + var a1 = filter(arr1, function(item){ + return !contains(arr2, item); + }), + a2 = filter(arr2, function(item){ + return !contains(arr1, item); + }); + + return a1.concat(a2); + } + + return xor; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js new file mode 100644 index 00000000..374cd282 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js @@ -0,0 +1,27 @@ +define(['./max', './pluck', './map'], function (max, pluck, map) { + + function getLength(arr) { + return arr == null ? 0 : arr.length; + } + + /** + * Merges together the values of each of the arrays with the values at the + * corresponding position. + */ + function zip(arr){ + var len = arr ? max(map(arguments, getLength)) : 0, + results = [], + i = -1, + item; + while (++i < len) { + results.push(map(arguments, function(item) { + return item == null ? undefined : item[i]; + })); + } + + return results; + } + + return zip; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js new file mode 100644 index 00000000..386e6da9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js @@ -0,0 +1,22 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'contains' : require('./collection/contains'), + 'every' : require('./collection/every'), + 'filter' : require('./collection/filter'), + 'find' : require('./collection/find'), + 'forEach' : require('./collection/forEach'), + 'make_' : require('./collection/make_'), + 'map' : require('./collection/map'), + 'max' : require('./collection/max'), + 'min' : require('./collection/min'), + 'pluck' : require('./collection/pluck'), + 'reduce' : require('./collection/reduce'), + 'reject' : require('./collection/reject'), + 'size' : require('./collection/size'), + 'some' : require('./collection/some') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js new file mode 100644 index 00000000..192167e8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { + + /** + */ + return make(arrContains, objContains); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js new file mode 100644 index 00000000..6317f503 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { + + /** + */ + return make(arrEvery, objEvery); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js new file mode 100644 index 00000000..4e7fadc8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js @@ -0,0 +1,22 @@ +define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { + + /** + * filter collection values, returns array. + */ + function filter(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + var results = []; + if (!list) { + return results; + } + forEach(list, function(value, index, list) { + if (iterator(value, index, list)) { + results[results.length] = value; + } + }); + return results; + } + + return filter; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js new file mode 100644 index 00000000..681f9414 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { + + /** + * Find value that returns true on iterator check. + */ + return make(arrFind, objFind); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js new file mode 100644 index 00000000..3b39d3ed --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { + + /** + */ + return make(arrForEach, objForEach); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js new file mode 100644 index 00000000..312e0564 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js @@ -0,0 +1,19 @@ +define(function(){ + + /** + * internal method used to create other collection modules. + */ + function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { + return function(){ + var args = Array.prototype.slice.call(arguments); + if (args[0] == null) { + return defaultReturn; + } + // array-like is treated as array + return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); + }; + } + + return makeCollectionMethod; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js new file mode 100644 index 00000000..96e24987 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js @@ -0,0 +1,20 @@ +define(['../lang/isObject', '../object/values', '../array/map', '../function/makeIterator_'], function (isObject, values, arrMap, makeIterator) { + + /** + * Map collection values, returns Array. + */ + function map(list, callback, thisObj) { + callback = makeIterator(callback, thisObj); + // list.length to check array-like object, if not array-like + // we simply map all the object values + if( isObject(list) && list.length == null ){ + list = values(list); + } + return arrMap(list, function (val, key, list) { + return callback(val, key, list); + }); + } + + return map; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js new file mode 100644 index 00000000..de9a6da5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { + + /** + * Get maximum value inside collection + */ + return make(arrMax, objMax); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js new file mode 100644 index 00000000..f0c239a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js @@ -0,0 +1,8 @@ +define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { + + /** + * Get minimum value inside collection. + */ + return make(arrMin, objMin); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js new file mode 100644 index 00000000..ef784a7a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js @@ -0,0 +1,14 @@ +define(['./map'], function (map) { + + /** + * Extract a list of property values. + */ + function pluck(list, key) { + return map(list, function(value) { + return value[key]; + }); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js new file mode 100644 index 00000000..bd05d43d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { + + /** + */ + return make(arrReduce, objReduce); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js new file mode 100644 index 00000000..581adfdc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js @@ -0,0 +1,15 @@ +define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { + + /** + * Inverse or collection/filter + */ + function reject(list, iterator, thisObj) { + iterator = makeIterator(iterator, thisObj); + return filter(list, function(value, index, list) { + return !iterator(value, index, list); + }, thisObj); + } + + return reject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js new file mode 100644 index 00000000..4e5ab419 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js @@ -0,0 +1,18 @@ +define(['../lang/isArray', '../object/size'], function (isArray, objSize) { + + /** + * Get collection size + */ + function size(list) { + if (!list) { + return 0; + } + if (isArray(list)) { + return list.length; + } + return objSize(list); + } + + return size; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js new file mode 100644 index 00000000..c0aebee2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js @@ -0,0 +1,7 @@ +define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { + + /** + */ + return make(arrSome, objSome); + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js new file mode 100644 index 00000000..4d449150 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js @@ -0,0 +1,21 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'dayOfTheYear' : require('./date/dayOfTheYear'), + 'diff' : require('./date/diff'), + 'i18n_' : require('./date/i18n_'), + 'isLeapYear' : require('./date/isLeapYear'), + 'isSame' : require('./date/isSame'), + 'parseIso' : require('./date/parseIso'), + 'startOf' : require('./date/startOf'), + 'strftime' : require('./date/strftime'), + 'timezoneAbbr' : require('./date/timezoneAbbr'), + 'timezoneOffset' : require('./date/timezoneOffset'), + 'totalDaysInMonth' : require('./date/totalDaysInMonth'), + 'totalDaysInYear' : require('./date/totalDaysInYear'), + 'weekOfTheYear' : require('./date/weekOfTheYear') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js new file mode 100644 index 00000000..dc77ae1b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js @@ -0,0 +1,13 @@ +define(['../lang/isDate'], function (isDate) { + + /** + * return the day of the year (1..366) + */ + function dayOfTheYear(date){ + return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - + Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; + } + + return dayOfTheYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js new file mode 100644 index 00000000..667165fe --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js @@ -0,0 +1,128 @@ +define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){ + + /** + * calculate the difference between dates (range) + */ + function diff(start, end, unitName){ + // sort the dates to make it easier to process (specially year/month) + if (start > end) { + var swap = start; + start = end; + end = swap; + } + + var output; + + if (unitName === 'month') { + output = getMonthsDiff(start, end); + } else if (unitName === 'year'){ + output = getYearsDiff(start, end); + } else if (unitName != null) { + if (unitName === 'day') { + // ignore timezone difference because of daylight savings time + start = toUtc(start); + end = toUtc(end); + } + output = convert(end - start, 'ms', unitName); + } else { + output = end - start; + } + + return output; + } + + + function toUtc(d){ + // we ignore timezone differences on purpose because of daylight + // savings time, otherwise it would return fractional days/weeks even + // if a full day elapsed. eg: + // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) + // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) + // diff should be 4 days and not 4.041666666666667 + return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getHours(), d.getMinutes(), d.getSeconds(), + d.getMilliseconds()); + } + + + function getMonthsDiff(start, end){ + return getElapsedMonths(start, end) + + getElapsedYears(start, end) * 12 + + getFractionalMonth(start, end); + } + + + function getYearsDiff(start, end){ + var elapsedYears = getElapsedYears(start, end); + return elapsedYears + getFractionalYear(start, end, elapsedYears); + } + + + function getElapsedMonths(start, end){ + var monthDiff = end.getMonth() - start.getMonth(); + if (monthDiff < 0) { + monthDiff += 12; + } + // less than a full month + if (start.getDate() > end.getDate()) { + monthDiff -= 1; + } + return monthDiff; + } + + + function getElapsedYears(start, end){ + var yearDiff = end.getFullYear() - start.getFullYear(); + // less than a full year + if (start.getMonth() > end.getMonth()) { + yearDiff -= 1; + } + return yearDiff; + } + + + function getFractionalMonth(start, end){ + var fractionalDiff = 0; + var startDay = start.getDate(); + var endDay = end.getDate(); + + if (startDay !== endDay) { + var startTotalDays = totalDaysInMonth(start); + var endTotalDays = totalDaysInMonth(end); + var totalDays; + var daysElapsed; + + if (startDay > endDay) { + // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) + var baseDay = startTotalDays - startDay; + daysElapsed = endDay + baseDay; + // total days should be relative to 1st day of next month if + // startDay > endTotalDays + totalDays = (startDay > endTotalDays)? + endTotalDays + baseDay + 1 : startDay + baseDay; + } else { + // fractional is only based on endMonth eg: Jan 12 - Feb 18 + // (6 fractional days, 28 days until next full month) + daysElapsed = endDay - startDay; + totalDays = endTotalDays; + } + + fractionalDiff = daysElapsed / totalDays; + } + + return fractionalDiff; + } + + + function getFractionalYear(start, end, elapsedYears){ + var base = elapsedYears? + new Date(end.getFullYear(), start.getMonth(), start.getDate()) : + start; + var elapsedDays = diff(base, end, 'day'); + return elapsedDays / totalDaysInYear(end); + } + + + return diff; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js new file mode 100644 index 00000000..5e640c22 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js @@ -0,0 +1,61 @@ +define(function(){ + // en-US (English, United States) + return { + "am" : "AM", + "pm" : "PM", + + "x": "%m/%d/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %I:%M:%S %p %Z", + + "months" : [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + + "months_abbr" : [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + + "days" : [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + + "days_abbr" : [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ] + }; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js new file mode 100644 index 00000000..47256dd2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js @@ -0,0 +1,61 @@ +define(function(){ + // pt-BR (Brazillian Portuguese) + return { + "am" : "", + "pm" : "", + + "x": "%d/%m/%y", + "X": "%H:%M:%S", + "c": "%a %d %b %Y %H:%M:%S %Z", + + "months" : [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" + ], + + "months_abbr" : [ + "Jan", + "Fev", + "Mar", + "Abr", + "Mai", + "Jun", + "Jul", + "Ago", + "Set", + "Out", + "Nov", + "Dez" + ], + + "days" : [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" + ], + + "days_abbr" : [ + "Dom", + "Seg", + "Ter", + "Qua", + "Qui", + "Sex", + "Sáb" + ] + }; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js new file mode 100644 index 00000000..c04ce885 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js @@ -0,0 +1,13 @@ +define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ + + // we also use mixIn to make sure we don't affect the original locale + var activeLocale = mixIn({}, enUS, { + // we expose a "set" method to allow overriding the global locale + set : function(localeData){ + mixIn(activeLocale, localeData); + } + }); + + return activeLocale; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js new file mode 100644 index 00000000..e400b43d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js @@ -0,0 +1,15 @@ +define(['../lang/isDate'], function (isDate) { + + /** + * checks if it's a leap year + */ + function isLeapYear(fullYear){ + if (isDate(fullYear)) { + fullYear = fullYear.getFullYear(); + } + return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); + } + + return isLeapYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js new file mode 100644 index 00000000..f30531fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js @@ -0,0 +1,16 @@ +define(['./startOf'], function (startOf) { + + /** + * Check if date is "same" with optional period + */ + function isSame(date1, date2, period){ + if (period) { + date1 = startOf(date1, period); + date2 = startOf(date2, period); + } + return Number(date1) === Number(date2); + } + + return isSame; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js new file mode 100644 index 00000000..9a2aacb0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js @@ -0,0 +1,146 @@ +define(['../array/some'], function (some) { + + var datePatterns = [ + /^([0-9]{4})$/, // YYYY + /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) + /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD + ]; + var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD + + var timePatterns = [ + /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh + /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm + /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss + ]; + + var DATE_TIME = /^(.+)T(.+)$/; + var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; + + function matchAll(str, patterns) { + var match; + var found = some(patterns, function(pattern) { + return !!(match = pattern.exec(str)); + }); + + return found ? match : null; + } + + function getDate(year, month, day) { + var date = new Date(Date.UTC(year, month, day)); + + // Explicitly set year to avoid Date.UTC making dates < 100 relative to + // 1900 + date.setUTCFullYear(year); + + var valid = + date.getUTCFullYear() === year && + date.getUTCMonth() === month && + date.getUTCDate() === day; + return valid ? +date : NaN; + } + + function parseOrdinalDate(str) { + var match = ORD_DATE.exec(str); + if (match ) { + var year = +match[1], + day = +match[2], + date = new Date(Date.UTC(year, 0, day)); + + if (date.getUTCFullYear() === year) { + return +date; + } + } + + return NaN; + } + + function parseDate(str) { + var match, year, month, day; + + var match = matchAll(str, datePatterns); + if (match === null) { + // Ordinal dates are verified differently. + return parseOrdinalDate(str); + } + + year = (match[1] === void 0) ? 0 : +match[1]; + month = (match[2] === void 0) ? 0 : +match[2] - 1; + day = (match[3] === void 0) ? 1 : +match[3]; + + return getDate(year, month, day); + } + + function getTime(hr, min, sec) { + var valid = + (hr < 24 && hr >= 0 && + min < 60 && min >= 0 && + sec < 60 && min >= 0) || + (hr === 24 && min === 0 && sec === 0); + if (!valid) { + return NaN; + } + + return ((hr * 60 + min) * 60 + sec) * 1000; + } + + function parseOffset(str) { + var match; + if (str.charAt(str.length - 1) === 'Z') { + str = str.substring(0, str.length - 1); + } else if ((match = TIME_ZONE.exec(str))) { + var match = TIME_ZONE.exec(str); + if (match) { + var hours = +match[3], + minutes = (match[4] === void 0) ? 0 : +match[4], + offset = getTime(hours, minutes, 0); + + if (match[2] === '-') { + offset *= -1; + } + + return { offset: offset, time: match[1] }; + } + } + + // No time zone specified, assume UTC + return { offset: 0, time: str }; + } + + function parseTime(str) { + var match; + var offset = parseOffset(str); + + str = offset.time; + offset = offset.offset; + if (isNaN(offset)) { + return NaN; + } + + match = matchAll(str, timePatterns); + if (match === null) { + return NaN; + } + + var hours = (match[1] === void 0) ? 0 : +match[1], + minutes = (match[2] === void 0) ? 0 : +match[2], + seconds = (match[3] === void 0) ? 0 : +match[3]; + + return getTime(hours, minutes, seconds) - offset; + } + + /** + * Parse an ISO8601 formatted date string, and return a Date object. + */ + function parseISO8601(str){ + var match = DATE_TIME.exec(str); + if (!match) { + // No time specified + return parseDate(str); + } + + return parseDate(match[1]) + parseTime(match[2]); + } + + return parseISO8601; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js new file mode 100644 index 00000000..747f114d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js @@ -0,0 +1,54 @@ +define(['../lang/clone'], function (clone) { + + /** + * get a new Date object representing start of period + */ + function startOf(date, period){ + date = clone(date); + + // intentionally removed "break" from switch since start of + // month/year/etc should also reset the following periods + switch (period) { + case 'year': + date.setMonth(0); + /* falls through */ + case 'month': + date.setDate(1); + /* falls through */ + case 'week': + case 'day': + date.setHours(0); + /* falls through */ + case 'hour': + date.setMinutes(0); + /* falls through */ + case 'minute': + date.setSeconds(0); + /* falls through */ + case 'second': + date.setMilliseconds(0); + break; + default: + throw new Error('"'+ period +'" is not a valid period'); + } + + // week is the only case that should reset the weekDay and maybe even + // overflow to previous month + if (period === 'week') { + var weekDay = date.getDay(); + var baseDate = date.getDate(); + if (weekDay) { + if (weekDay >= baseDate) { + //start of the week is on previous month + date.setDate(0); + } + date.setDate(date.getDate() - date.getDay()); + } + } + + return date; + } + + return startOf; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js new file mode 100644 index 00000000..dd782505 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js @@ -0,0 +1,113 @@ +define(['../number/pad', './i18n_', './dayOfTheYear', './timezoneOffset', './timezoneAbbr', './weekOfTheYear'], function (pad, i18n, dayOfTheYear, timezoneOffset, timezoneAbbr, weekOfTheYear) { + + var _combinations = { + 'D': '%m/%d/%y', + 'F': '%Y-%m-%d', + 'r': '%I:%M:%S %p', + 'R': '%H:%M', + 'T': '%H:%M:%S', + 'x': 'locale', + 'X': 'locale', + 'c': 'locale' + }; + + + /** + * format date based on strftime format + */ + function strftime(date, format, localeData){ + localeData = localeData || i18n; + var reToken = /%([a-z%])/gi; + + function makeIterator(fn) { + return function(match, token){ + return fn(date, token, localeData); + }; + } + + return format + .replace(reToken, makeIterator(expandCombinations)) + .replace(reToken, makeIterator(convertToken)); + } + + + function expandCombinations(date, token, l10n){ + if (token in _combinations) { + var expanded = _combinations[token]; + return expanded === 'locale'? l10n[token] : expanded; + } else { + return '%'+ token; + } + } + + + function convertToken(date, token, l10n){ + switch (token){ + case 'a': + return l10n.days_abbr[date.getDay()]; + case 'A': + return l10n.days[date.getDay()]; + case 'h': + case 'b': + return l10n.months_abbr[date.getMonth()]; + case 'B': + return l10n.months[date.getMonth()]; + case 'C': + return pad(Math.floor(date.getFullYear() / 100), 2); + case 'd': + return pad(date.getDate(), 2); + case 'e': + return pad(date.getDate(), 2, ' '); + case 'H': + return pad(date.getHours(), 2); + case 'I': + return pad(date.getHours() % 12, 2); + case 'j': + return pad(dayOfTheYear(date), 3); + case 'L': + return pad(date.getMilliseconds(), 3); + case 'm': + return pad(date.getMonth() + 1, 2); + case 'M': + return pad(date.getMinutes(), 2); + case 'n': + return '\n'; + case 'p': + return date.getHours() >= 12? l10n.pm : l10n.am; + case 'P': + return convertToken(date, 'p', l10n).toLowerCase(); + case 's': + return date.getTime() / 1000; + case 'S': + return pad(date.getSeconds(), 2); + case 't': + return '\t'; + case 'u': + var day = date.getDay(); + return day === 0? 7 : day; + case 'U': + return pad(weekOfTheYear(date), 2); + case 'w': + return date.getDay(); + case 'W': + return pad(weekOfTheYear(date, 1), 2); + case 'y': + return pad(date.getFullYear() % 100, 2); + case 'Y': + return pad(date.getFullYear(), 4); + case 'z': + return timezoneOffset(date); + case 'Z': + return timezoneAbbr(date); + case '%': + return '%'; + default: + // keep unrecognized tokens + return '%'+ token; + } + } + + + return strftime; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js new file mode 100644 index 00000000..225a6856 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js @@ -0,0 +1,17 @@ +define(['./timezoneOffset'], function(timezoneOffset) { + + /** + * Abbreviated time zone name or similar information. + */ + function timezoneAbbr(date){ + // Date.toString gives different results depending on the + // browser/system so we fallback to timezone offset + // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' + // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' + var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); + return tz? tz[1] : timezoneOffset(date); + } + + return timezoneAbbr; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js new file mode 100644 index 00000000..ca06705d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js @@ -0,0 +1,16 @@ +define(['../number/pad'], function (pad) { + + /** + * time zone as hour and minute offset from UTC (e.g. +0900) + */ + function timezoneOffset(date){ + var offset = date.getTimezoneOffset(); + var abs = Math.abs(offset); + var h = pad(Math.floor(abs / 60), 2); + var m = pad(abs % 60, 2); + return (offset > 0? '-' : '+') + h + m; + } + + return timezoneOffset; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js new file mode 100644 index 00000000..98f7e9d1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js @@ -0,0 +1,24 @@ +define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) { + + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + + /** + * returns the total amount of days in the month (considering leap years) + */ + function totalDaysInMonth(fullYear, monthIndex){ + if (isDate(fullYear)) { + var date = fullYear; + year = date.getFullYear(); + monthIndex = date.getMonth(); + } + + if (monthIndex === 1 && isLeapYear(fullYear)) { + return 29; + } else { + return DAYS_IN_MONTH[monthIndex]; + } + } + + return totalDaysInMonth; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js new file mode 100644 index 00000000..e9036b42 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js @@ -0,0 +1,13 @@ +define(['./isLeapYear'], function (isLeapYear) { + + /** + * return the amount of days in the year following the gregorian calendar + * and leap years + */ + function totalDaysInYear(fullYear){ + return isLeapYear(fullYear)? 366 : 365; + } + + return totalDaysInYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js new file mode 100644 index 00000000..8dabc458 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js @@ -0,0 +1,16 @@ +define(['./dayOfTheYear'], function (dayOfTheYear) { + + /** + * Return the week of the year based on given firstDayOfWeek + */ + function weekOfTheYear(date, firstDayOfWeek){ + firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; + var doy = dayOfTheYear(date); + var dow = (7 + date.getDay() - firstDayOfWeek) % 7; + var relativeWeekDay = 6 - firstDayOfWeek - dow; + return Math.floor((doy + relativeWeekDay) / 7); + } + + return weekOfTheYear; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js new file mode 100644 index 00000000..23f4fd74 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js @@ -0,0 +1,18 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'bind' : require('./function/bind'), + 'compose' : require('./function/compose'), + 'debounce' : require('./function/debounce'), + 'func' : require('./function/func'), + 'makeIterator_' : require('./function/makeIterator_'), + 'partial' : require('./function/partial'), + 'prop' : require('./function/prop'), + 'series' : require('./function/series'), + 'throttle' : require('./function/throttle'), + 'timeout' : require('./function/timeout') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js new file mode 100644 index 00000000..09e5e20a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js @@ -0,0 +1,23 @@ +define(function(){ + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. + * @param {Function} fn Function. + * @param {object} context Execution context. + * @param {rest} args Arguments (0...n arguments). + * @return {Function} Wrapped Function. + */ + function bind(fn, context, args){ + var argsArr = slice(arguments, 2); //curried args + return function(){ + return fn.apply(context, argsArr.concat(slice(arguments))); + }; + } + + return bind; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js new file mode 100644 index 00000000..d8b228fa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Returns a function that composes multiple functions, passing results to + * each other. + */ + function compose() { + var fns = arguments; + return function(arg){ + // only cares about the first argument since the chain can only + // deal with a single return value anyway. It should start from + // the last fn. + var n = fns.length; + while (n--) { + arg = fns[n].call(this, arg); + } + return arg; + }; + } + + return compose; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js new file mode 100644 index 00000000..21644ecc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js @@ -0,0 +1,29 @@ +define(function () { + + /** + * Debounce callback execution + */ + function debounce(fn, threshold, isAsap){ + var timeout, result; + function debounced(){ + var args = arguments, context = this; + function delayed(){ + if (! isAsap) { + result = fn.apply(context, args); + } + timeout = null; + } + if (timeout) { + clearTimeout(timeout); + } else if (isAsap) { + result = fn.apply(context, args); + } + timeout = setTimeout(delayed, threshold); + return result; + } + return debounced; + } + + return debounce; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js new file mode 100644 index 00000000..b920e00e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Returns a function that call a method on the passed object + */ + function func(name){ + return function(obj){ + return obj[name](); + }; + } + + return func; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js new file mode 100644 index 00000000..deb6e137 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js @@ -0,0 +1,33 @@ +define(['./prop', '../object/deepMatches'], function(prop, deepMatches) { + + /** + * Converts argument into a valid iterator. + * Used internally on most array/object/collection methods that receives a + * callback/iterator providing a shortcut syntax. + */ + function makeIterator(src, thisObj){ + switch(typeof src) { + case 'object': + // typeof null == "object" + return (src != null)? function(val, key, target){ + return deepMatches(val, src); + } : src; + case 'string': + case 'number': + return prop(src); + case 'function': + if (typeof thisObj === 'undefined') { + return src; + } else { + return function(val, i, arr){ + return src.call(thisObj, val, i, arr); + }; + } + default: + return src; + } + } + + return makeIterator; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js new file mode 100644 index 00000000..ad730746 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js @@ -0,0 +1,19 @@ +define(function () { + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Creates a partially applied function. + */ + function partial(fn, var_args){ + var argsArr = slice(arguments, 1); //curried args + return function(){ + return fn.apply(this, argsArr.concat(slice(arguments))); + }; + } + + return partial; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js new file mode 100644 index 00000000..c9df78ca --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Returns a function that gets a property of the passed object + */ + function prop(name){ + return function(obj){ + return obj[name]; + }; + } + + return prop; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js new file mode 100644 index 00000000..c8856a27 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js @@ -0,0 +1,22 @@ +define(function () { + + /** + * Returns a function that will execute a list of functions in sequence + * passing the same arguments to each one. (useful for batch processing + * items during a forEach loop) + */ + function series(){ + var fns = arguments; + return function(){ + var i = 0, + n = fns.length; + while (i < n) { + fns[i].apply(this, arguments); + i += 1; + } + }; + } + + return series; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js new file mode 100644 index 00000000..8ce3929a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js @@ -0,0 +1,32 @@ +define(['../time/now'], function (now) { + + /** + */ + function throttle(fn, delay){ + var context, timeout, result, args, + cur, diff, prev = 0; + function delayed(){ + prev = now(); + timeout = null; + result = fn.apply(context, args); + } + function throttled(){ + context = this; + args = arguments; + cur = now(); + diff = delay - (cur - prev); + if (diff <= 0) { + clearTimeout(timeout); + prev = cur; + result = fn.apply(context, args); + } else if (! timeout) { + timeout = setTimeout(delayed, diff); + } + return result; + } + return throttled; + } + + return throttle; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js new file mode 100644 index 00000000..15388bdd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js @@ -0,0 +1,21 @@ +define(function () { + + function slice(arr, offset){ + return Array.prototype.slice.call(arr, offset || 0); + } + + /** + * Delays the call of a function within a given context. + */ + function timeout(fn, millis, context){ + + var args = slice(arguments, 3); + + return setTimeout(function() { + fn.apply(context, args); + }, millis); + } + + return timeout; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js new file mode 100644 index 00000000..744bb119 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js @@ -0,0 +1,24 @@ +/**@license + * mout v0.6.0 | http://moutjs.com | MIT license + */ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'VERSION' : '0.6.0', + 'array' : require('./array'), + 'collection' : require('./collection'), + 'date' : require('./date'), + 'function' : require('./function'), + 'lang' : require('./lang'), + 'math' : require('./math'), + 'number' : require('./number'), + 'object' : require('./object'), + 'queryString' : require('./queryString'), + 'random' : require('./random'), + 'string' : require('./string'), + 'time' : require('./time') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js new file mode 100644 index 00000000..de16b597 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js @@ -0,0 +1,36 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'clone' : require('./lang/clone'), + 'createObject' : require('./lang/createObject'), + 'ctorApply' : require('./lang/ctorApply'), + 'deepClone' : require('./lang/deepClone'), + 'defaults' : require('./lang/defaults'), + 'inheritPrototype' : require('./lang/inheritPrototype'), + 'is' : require('./lang/is'), + 'isArguments' : require('./lang/isArguments'), + 'isArray' : require('./lang/isArray'), + 'isBoolean' : require('./lang/isBoolean'), + 'isDate' : require('./lang/isDate'), + 'isEmpty' : require('./lang/isEmpty'), + 'isFinite' : require('./lang/isFinite'), + 'isFunction' : require('./lang/isFunction'), + 'isInteger' : require('./lang/isInteger'), + 'isKind' : require('./lang/isKind'), + 'isNaN' : require('./lang/isNaN'), + 'isNull' : require('./lang/isNull'), + 'isNumber' : require('./lang/isNumber'), + 'isObject' : require('./lang/isObject'), + 'isPlainObject' : require('./lang/isPlainObject'), + 'isRegExp' : require('./lang/isRegExp'), + 'isString' : require('./lang/isString'), + 'isUndefined' : require('./lang/isUndefined'), + 'isnt' : require('./lang/isnt'), + 'kindOf' : require('./lang/kindOf'), + 'toArray' : require('./lang/toArray'), + 'toString' : require('./lang/toString') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js new file mode 100644 index 00000000..468489a1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js @@ -0,0 +1,47 @@ +define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { + + /** + * Clone native types. + */ + function clone(val){ + switch (kindOf(val)) { + case 'Object': + return cloneObject(val); + case 'Array': + return cloneArray(val); + case 'RegExp': + return cloneRegExp(val); + case 'Date': + return cloneDate(val); + default: + return val; + } + } + + function cloneObject(source) { + if (isPlainObject(source)) { + return mixIn({}, source); + } else { + return source; + } + } + + function cloneRegExp(r) { + var flags = ''; + flags += r.multiline ? 'm' : ''; + flags += r.global ? 'g' : ''; + flags += r.ignorecase ? 'i' : ''; + return new RegExp(r.source, flags); + } + + function cloneDate(date) { + return new Date(+date); + } + + function cloneArray(arr) { + return arr.slice(); + } + + return clone; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js new file mode 100644 index 00000000..f7661500 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js @@ -0,0 +1,18 @@ +define(['../object/mixIn'], function(mixIn){ + + /** + * Create Object using prototypal inheritance and setting custom properties. + * - Mix between Douglas Crockford Prototypal Inheritance and the EcmaScript 5 `Object.create()` method. + * @param {object} parent Parent Object. + * @param {object} [props] Object properties. + * @return {object} Created object. + */ + function createObject(parent, props){ + function F(){} + F.prototype = parent; + return mixIn(new F(), props); + + } + return createObject; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js new file mode 100644 index 00000000..a9ac1c54 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js @@ -0,0 +1,17 @@ +define(function () { + + function F(){} + + /** + * Do fn.apply on a constructor. + */ + function ctorApply(ctor, args) { + F.prototype = ctor.prototype; + var instance = new F(); + ctor.apply(instance, args); + return instance; + } + + return ctorApply; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js new file mode 100644 index 00000000..d45c10aa --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js @@ -0,0 +1,45 @@ +define(['./clone', '../object/forOwn', './kindOf', './isPlainObject'], function (clone, forOwn, kindOf, isPlainObject) { + + /** + * Recursively clone native types. + */ + function deepClone(val, instanceClone) { + switch ( kindOf(val) ) { + case 'Object': + return cloneObject(val, instanceClone); + case 'Array': + return cloneArray(val, instanceClone); + default: + return clone(val); + } + } + + function cloneObject(source, instanceClone) { + if (isPlainObject(source)) { + var out = {}; + forOwn(source, function(val, key) { + this[key] = deepClone(val, instanceClone); + }, out); + return out; + } else if (instanceClone) { + return instanceClone(source); + } else { + return source; + } + } + + function cloneArray(arr, instanceClone) { + var out = [], + i = -1, + n = arr.length, + val; + while (++i < n) { + out[i] = deepClone(arr[i], instanceClone); + } + return out; + } + + return deepClone; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js new file mode 100644 index 00000000..5156b1bb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js @@ -0,0 +1,16 @@ +define(['./toArray', '../array/find'], function (toArray, find) { + + /** + * Return first non void argument + */ + function defaults(var_args){ + return find(toArray(arguments), nonVoid); + } + + function nonVoid(val){ + return val != null; + } + + return defaults; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js new file mode 100644 index 00000000..c1fda3a7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js @@ -0,0 +1,16 @@ +define(['./createObject'], function(createObject){ + + /** + * Inherit prototype from another Object. + * - inspired by Nicholas Zackas Solution + * @param {object} child Child object + * @param {object} parent Parent Object + */ + function inheritPrototype(child, parent){ + var p = createObject(parent.prototype); + p.constructor = child; + child.prototype = p; + } + + return inheritPrototype; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js new file mode 100644 index 00000000..261a2077 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js @@ -0,0 +1,23 @@ +define(function () { + + /** + * Check if both arguments are egal. + */ + function is(x, y){ + // implementation borrowed from harmony:egal spec + if (x === y) { + // 0 === -0, but they are not identical + return x !== 0 || 1 / x === 1 / y; + } + + // NaN !== NaN, but they are identical. + // NaNs are the only non-reflexive value, i.e., if x !== x, + // then x is a NaN. + // isNaN is broken: it converts its argument to number, so + // isNaN("foo") => true + return x !== x && y !== y; + } + + return is; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js new file mode 100644 index 00000000..f889ee8e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js @@ -0,0 +1,15 @@ +define(['./isKind'], function (isKind) { + + /** + */ + var isArgs = isKind(arguments, 'Arguments')? + function(val){ + return isKind(val, 'Arguments'); + } : + function(val){ + // Arguments is an Object on IE7 + return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); + }; + + return isArgs; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js new file mode 100644 index 00000000..886e2aa5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + var isArray = Array.isArray || function (val) { + return isKind(val, 'Array'); + }; + return isArray; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js new file mode 100644 index 00000000..1ca27a69 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isBoolean(val) { + return isKind(val, 'Boolean'); + } + return isBoolean; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js new file mode 100644 index 00000000..2708d676 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isDate(val) { + return isKind(val, 'Date'); + } + return isDate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js new file mode 100644 index 00000000..4cc3d2db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js @@ -0,0 +1,23 @@ +define(['../object/forOwn', './isArray'], function (forOwn, isArray) { + + function isEmpty(val){ + if (val == null) { + // typeof null == 'object' so we check it first + return false; + } else if ( typeof val === 'string' || isArray(val) ) { + return !val.length; + } else if ( typeof val === 'object' || typeof val === 'function' ) { + var result = true; + forOwn(val, function(){ + result = false; + return false; // break loop + }); + return result; + } else { + return false; + } + } + + return isEmpty; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js new file mode 100644 index 00000000..5a982f4b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js @@ -0,0 +1,21 @@ +define(['./isNumber'], function (isNumber) { + + var global = this; + + /** + * Check if value is finite + */ + function isFinite(val){ + var is = false; + if (typeof val === 'string' && val !== '') { + is = global.isFinite( parseFloat(val) ); + } else if (isNumber(val)){ + // need to use isNumber because of Number constructor + is = global.isFinite( val ); + } + return is; + } + + return isFinite; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js new file mode 100644 index 00000000..ff5df7f0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isFunction(val) { + return isKind(val, 'Function'); + } + return isFunction; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js new file mode 100644 index 00000000..1931f516 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js @@ -0,0 +1,12 @@ +define(['./isNumber'], function (isNumber) { + + /** + * Check if value is an integer + */ + function isInteger(val){ + return isNumber(val) && (val % 1 === 0); + } + + return isInteger; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js new file mode 100644 index 00000000..6937a12f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js @@ -0,0 +1,9 @@ +define(['./kindOf'], function (kindOf) { + /** + * Check if value is from a specific "kind". + */ + function isKind(val, kind){ + return kindOf(val) === kind; + } + return isKind; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js new file mode 100644 index 00000000..9467a3c8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js @@ -0,0 +1,15 @@ +define(['./isNumber'], function (isNumber) { + + /** + * Check if value is NaN for realz + */ + function isNaN(val){ + // based on the fact that NaN !== NaN + // need to check if it's a number to avoid conflicts with host objects + // also need to coerce ToNumber to avoid edge case `new Number(NaN)` + return !isNumber(val) || val != +val; + } + + return isNaN; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js new file mode 100644 index 00000000..506e05ea --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js @@ -0,0 +1,9 @@ +define(function () { + /** + */ + function isNull(val){ + return val === null; + } + return isNull; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js new file mode 100644 index 00000000..9a832c5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isNumber(val) { + return isKind(val, 'Number'); + } + return isNumber; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js new file mode 100644 index 00000000..0befb063 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isObject(val) { + return isKind(val, 'Object'); + } + return isObject; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js new file mode 100644 index 00000000..6c5854fd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js @@ -0,0 +1,14 @@ +define(function () { + + /** + * Checks if the value is created by the `Object` constructor. + */ + function isPlainObject(value) { + return (!!value + && typeof value === 'object' + && value.constructor === Object); + } + + return isPlainObject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js new file mode 100644 index 00000000..d78a03da --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isRegExp(val) { + return isKind(val, 'RegExp'); + } + return isRegExp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js new file mode 100644 index 00000000..8a42fe01 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js @@ -0,0 +1,8 @@ +define(['./isKind'], function (isKind) { + /** + */ + function isString(val) { + return isKind(val, 'String'); + } + return isString; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js new file mode 100644 index 00000000..c57b28eb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js @@ -0,0 +1,10 @@ +define(function () { + var UNDEF; + + /** + */ + function isUndef(val){ + return val === UNDEF; + } + return isUndef; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js new file mode 100644 index 00000000..d4336222 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js @@ -0,0 +1,12 @@ +define(['./is'], function (is) { + + /** + * Check if both values are not identical/egal + */ + function isnt(x, y){ + return !is(x, y); + } + + return isnt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js new file mode 100644 index 00000000..97d21d15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js @@ -0,0 +1,20 @@ +define(function () { + + var _rKind = /^\[object (.*)\]$/, + _toString = Object.prototype.toString, + UNDEF; + + /** + * Gets the "kind" of value. (e.g. "String", "Number", etc) + */ + function kindOf(val) { + if (val === null) { + return 'Null'; + } else if (val === UNDEF) { + return 'Undefined'; + } else { + return _rKind.exec( _toString.call(val) )[1]; + } + } + return kindOf; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js new file mode 100644 index 00000000..552916f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js @@ -0,0 +1,31 @@ +define(['./kindOf'], function (kindOf) { + + var _win = this; + + /** + * Convert array-like object into array + */ + function toArray(val){ + var ret = [], + kind = kindOf(val), + n; + + if (val != null) { + if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { + //string, regexp, function have .length but user probably just want + //to wrap value into an array.. + ret[ret.length] = val; + } else { + //window returns true on isObject in IE7 and may have length + //property. `typeof NodeList` returns `function` on Safari so + //we can't use it (#58) + n = val.length; + while (n--) { + ret[n] = val[n]; + } + } + } + return ret; + } + return toArray; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js new file mode 100644 index 00000000..c28b89af --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * Typecast a value to a String, using an empty string value for null or + * undefined. + */ + function toString(val){ + return val == null ? '' : val.toString(); + } + + return toString; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js new file mode 100644 index 00000000..e2ba8705 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js @@ -0,0 +1,19 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'ceil' : require('./math/ceil'), + 'clamp' : require('./math/clamp'), + 'countSteps' : require('./math/countSteps'), + 'floor' : require('./math/floor'), + 'inRange' : require('./math/inRange'), + 'isNear' : require('./math/isNear'), + 'lerp' : require('./math/lerp'), + 'loop' : require('./math/loop'), + 'map' : require('./math/map'), + 'norm' : require('./math/norm'), + 'round' : require('./math/round') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js new file mode 100644 index 00000000..d73b0581 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Round value up with a custom radix. + */ + function ceil(val, step){ + step = Math.abs(step || 1); + return Math.ceil(val / step) * step; + } + + return ceil; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js new file mode 100644 index 00000000..fb5a1484 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Clamps value inside range. + */ + function clamp(val, min, max){ + return val < min? min : (val > max? max : val); + } + return clamp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js new file mode 100644 index 00000000..0ecb32f6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js @@ -0,0 +1,16 @@ +define(function(){ + /** + * Count number of full steps. + */ + function countSteps(val, step, overflow){ + val = Math.floor(val / step); + + if (overflow) { + return val % overflow; + } + + return val; + } + + return countSteps; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js new file mode 100644 index 00000000..8a4456b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Floor value to full steps. + */ + function floor(val, step){ + step = Math.abs(step || 1); + return Math.floor(val / step) * step; + } + return floor; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js new file mode 100644 index 00000000..0c890536 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Checks if value is inside the range. + */ + function inRange(val, min, max, threshold){ + threshold = threshold || 0; + return (val + threshold >= min && val - threshold <= max); + } + + return inRange; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js new file mode 100644 index 00000000..b308a0b0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Check if value is close to target. + */ + function isNear(val, target, threshold){ + return (Math.abs(val - target) <= threshold); + } + return isNear; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js new file mode 100644 index 00000000..26b99d04 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js @@ -0,0 +1,11 @@ +define(function(){ + /** + * Linear interpolation. + * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE + */ + function lerp(ratio, start, end){ + return start + (end - start) * ratio; + } + + return lerp; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js new file mode 100644 index 00000000..c735ecf6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Loops value inside range. + */ + function loop(val, min, max){ + return val < min? max : (val > max? min : val); + } + + return loop; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js new file mode 100644 index 00000000..bf7dc5d5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js @@ -0,0 +1,10 @@ +define(['./lerp', './norm'], function(lerp, norm){ + /** + * Maps a number from one scale to another. + * @example map(3, 0, 4, -1, 1) -> 0.5 + */ + function map(val, min1, max1, min2, max2){ + return lerp( norm(val, min1, max1), min2, max2 ); + } + return map; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js new file mode 100644 index 00000000..fccae20e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js @@ -0,0 +1,9 @@ +define(function(){ + /** + * Gets normalized ratio of value inside range. + */ + function norm(val, min, max){ + return (val - min) / (max - min); + } + return norm; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js new file mode 100644 index 00000000..b43e4ac2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js @@ -0,0 +1,12 @@ +define(function () { + /** + * Round number to a specific radix + */ + function round(value, radix){ + radix = radix || 1; // default round 1 + return Math.round(value / radix) * radix; + } + + return round; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js new file mode 100644 index 00000000..cb52fc75 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js @@ -0,0 +1,21 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'MAX_INT' : require('./number/MAX_INT'), + 'MAX_UINT' : require('./number/MAX_UINT'), + 'MIN_INT' : require('./number/MIN_INT'), + 'abbreviate' : require('./number/abbreviate'), + 'currencyFormat' : require('./number/currencyFormat'), + 'enforcePrecision' : require('./number/enforcePrecision'), + 'pad' : require('./number/pad'), + 'rol' : require('./number/rol'), + 'ror' : require('./number/ror'), + 'sign' : require('./number/sign'), + 'toInt' : require('./number/toInt'), + 'toUInt' : require('./number/toUInt'), + 'toUInt31' : require('./number/toUInt31') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js new file mode 100644 index 00000000..23a6e1a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit signed integer value. (2^31 - 1) + */ +define(function(){ + return 2147483647; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js new file mode 100644 index 00000000..a035096c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js @@ -0,0 +1,6 @@ +/** + * @constant Maximum 32-bit unsigned integet value (2^32 - 1) + */ +define(function(){ + return 4294967295; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js new file mode 100644 index 00000000..9b3e9781 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js @@ -0,0 +1,6 @@ +/** + * @constant Minimum 32-bit signed integer value (-2^31). + */ +define(function(){ + return -2147483648; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js new file mode 100644 index 00000000..7e7405ad --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js @@ -0,0 +1,35 @@ +define(['./enforcePrecision'], function (enforcePrecision) { + + var _defaultDict = { + thousand : 'K', + million : 'M', + billion : 'B' + }; + + /** + * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) + */ + function abbreviateNumber(val, nDecimals, dict){ + nDecimals = nDecimals != null? nDecimals : 1; + dict = dict || _defaultDict; + val = enforcePrecision(val, nDecimals); + + var str, mod; + + if (val < 1000000) { + mod = enforcePrecision(val / 1000, nDecimals); + // might overflow to next scale during rounding + str = mod < 1000? mod + dict.thousand : 1 + dict.million; + } else if (val < 1000000000) { + mod = enforcePrecision(val / 1000000, nDecimals); + str = mod < 1000? mod + dict.million : 1 + dict.billion; + } else { + str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; + } + + return str; + } + + return abbreviateNumber; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js new file mode 100644 index 00000000..dcde8fc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js @@ -0,0 +1,26 @@ +define(function () { + + /** + * Converts number into currency format + */ + function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { + nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; + decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; + thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; + + //can't use enforce precision since it returns a number and we are + //doing a RegExp over the string + var fixed = val.toFixed(nDecimalDigits), + //separate begin [$1], middle [$2] and decimal digits [$4] + parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); + + if(parts){ //val >= 1000 || val <= -1000 + return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); + }else{ + return fixed.replace('.', decimalSeparator); + } + } + + return currencyFormat; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js new file mode 100644 index 00000000..84554d0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js @@ -0,0 +1,13 @@ +define(function(){ + /** + * Enforce a specific amount of decimal digits and also fix floating + * point rounding issues. + * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> + * 0.61` + */ + function enforcePrecision(val, nDecimalDigits){ + var pow = Math.pow(10, nDecimalDigits); + return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); + } + return enforcePrecision; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js new file mode 100644 index 00000000..3b2c062a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js @@ -0,0 +1,12 @@ +define(['../string/lpad'], function(lpad){ + + /** + * Add padding zeros if n.length < minLength. + */ + function pad(n, minLength, char){ + return lpad(''+ n, minLength, char || '0'); + } + + return pad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js new file mode 100644 index 00000000..a148f444 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Bitwise circular shift left + * http://en.wikipedia.org/wiki/Circular_shift + */ + function rol(val, shift){ + return (val << shift) | (val >> (32 - shift)); + } + return rol; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js new file mode 100644 index 00000000..b5c66f92 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js @@ -0,0 +1,10 @@ +define(function(){ + /** + * Bitwise circular shift right + * http://en.wikipedia.org/wiki/Circular_shift + */ + function ror(val, shift){ + return (val >> shift) | (val << (32 - shift)); + } + return ror; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js new file mode 100644 index 00000000..dfc131d5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js @@ -0,0 +1,15 @@ +define(function () { + + /** + * Get sign of the value. + */ + function sign(val) { + var num = Number(val); + if (num === 0) return num; // +0 and +0 === 0 + if (isNaN(num)) return num; // NaN + return num < 0? -1 : 1; + } + + return sign; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js new file mode 100644 index 00000000..1e9b4c0b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js @@ -0,0 +1,15 @@ +define(function(){ + + /** + * "Convert" value into an 32-bit integer. + * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. + * IMPORTANT: val will wrap at 2^31 and -2^31. + * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 + */ + function toInt(val){ + return ~~val; + } + + return toInt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js new file mode 100644 index 00000000..d5b25b2c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * "Convert" value into a 32-bit unsigned integer. + * IMPORTANT: Value will wrap at 2^32. + */ + function toUInt(val){ + return val >>> 0; + } + + return toUInt; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js new file mode 100644 index 00000000..9785a054 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js @@ -0,0 +1,13 @@ +define(['./MAX_INT'], function(MAX_INT){ + + /** + * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). + * IMPORTANT: value wil wrap at 2^31, if negative will return 0. + */ + function toUInt31(val){ + return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); + } + + return toUInt31; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js new file mode 100644 index 00000000..343e7826 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js @@ -0,0 +1,42 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'bindAll' : require('./object/bindAll'), + 'contains' : require('./object/contains'), + 'deepEquals' : require('./object/deepEquals'), + 'deepFillIn' : require('./object/deepFillIn'), + 'deepMatches' : require('./object/deepMatches'), + 'deepMixIn' : require('./object/deepMixIn'), + 'equals' : require('./object/equals'), + 'every' : require('./object/every'), + 'fillIn' : require('./object/fillIn'), + 'filter' : require('./object/filter'), + 'find' : require('./object/find'), + 'forIn' : require('./object/forIn'), + 'forOwn' : require('./object/forOwn'), + 'functions' : require('./object/functions'), + 'get' : require('./object/get'), + 'has' : require('./object/has'), + 'hasOwn' : require('./object/hasOwn'), + 'keys' : require('./object/keys'), + 'map' : require('./object/map'), + 'matches' : require('./object/matches'), + 'max' : require('./object/max'), + 'merge' : require('./object/merge'), + 'min' : require('./object/min'), + 'mixIn' : require('./object/mixIn'), + 'namespace' : require('./object/namespace'), + 'pick' : require('./object/pick'), + 'pluck' : require('./object/pluck'), + 'reduce' : require('./object/reduce'), + 'reject' : require('./object/reject'), + 'set' : require('./object/set'), + 'size' : require('./object/size'), + 'some' : require('./object/some'), + 'unset' : require('./object/unset'), + 'values' : require('./object/values') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js new file mode 100644 index 00000000..b131ed15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js @@ -0,0 +1,16 @@ +define(['./functions', '../function/bind', '../array/forEach'], function (functions, bind, forEach) { + + /** + * Binds methods of the object to be run in it's own context. + */ + function bindAll(obj, rest_methodNames){ + var keys = arguments.length > 1? + Array.prototype.slice.call(arguments, 1) : functions(obj); + forEach(keys, function(key){ + obj[key] = bind(obj[key], obj); + }); + } + + return bindAll; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js new file mode 100644 index 00000000..297e8986 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js @@ -0,0 +1,13 @@ +define(['./some'], function (some) { + + /** + * Check if object contains value + */ + function contains(obj, needle) { + return some(obj, function(val) { + return (val === needle); + }); + } + return contains; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js new file mode 100644 index 00000000..8b7d5d15 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js @@ -0,0 +1,26 @@ +define(['../lang/isObject', './equals'], function (isObject, equals) { + + function defaultCompare(a, b) { + return a === b; + } + + /** + * Recursively checks for same properties and values. + */ + function deepEquals(a, b, callback){ + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + function compare(a, b){ + return deepEquals(a, b, callback); + } + + return equals(a, b, compare); + } + + return deepEquals; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js new file mode 100644 index 00000000..84ba154a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js @@ -0,0 +1,31 @@ +define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { + + /** + * Deeply copy missing properties in the target from the defaults. + */ + function deepFillIn(target, defaults){ + var i = 0, + n = arguments.length, + obj; + + while(++i < n) { + obj = arguments[i]; + if (obj) { + forOwn(obj, function(newValue, key) { + var curValue = target[key]; + if (curValue == null) { + target[key] = newValue; + } else if (isPlainObject(curValue) + && isPlainObject(newValue)) { + deepFillIn(curValue, newValue); + } + }); + } + } + + return target; + } + + return deepFillIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js new file mode 100644 index 00000000..2eae6297 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js @@ -0,0 +1,54 @@ +define(['./forOwn', '../lang/isArray'], function(forOwn, isArray) { + + function containsMatch(array, pattern) { + var i = -1, length = array.length; + while (++i < length) { + if (deepMatches(array[i], pattern)) { + return true; + } + } + + return false; + } + + function matchArray(target, pattern) { + var i = -1, patternLength = pattern.length; + while (++i < patternLength) { + if (!containsMatch(target, pattern[i])) { + return false; + } + } + + return true; + } + + function matchObject(target, pattern) { + var result = true; + forOwn(pattern, function(val, key) { + if (!deepMatches(target[key], val)) { + // Return false to break out of forOwn early + return (result = false); + } + }); + + return result; + } + + /** + * Recursively check if the objects match. + */ + function deepMatches(target, pattern){ + if (target && typeof target === 'object') { + if (isArray(target) && isArray(pattern)) { + return matchArray(target, pattern); + } else { + return matchObject(target, pattern); + } + } else { + return target === pattern; + } + } + + return deepMatches; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js new file mode 100644 index 00000000..1b4178ef --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js @@ -0,0 +1,33 @@ +define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { + + /** + * Mixes objects into the target object, recursively mixing existing child + * objects. + */ + function deepMixIn(target, objects) { + var i = 0, + n = arguments.length, + obj; + + while(++i < n){ + obj = arguments[i]; + if (obj) { + forOwn(obj, copyProp, target); + } + } + + return target; + } + + function copyProp(val, key) { + var existing = this[key]; + if (isPlainObject(val) && isPlainObject(existing)) { + deepMixIn(existing, val); + } else { + this[key] = val; + } + } + + return deepMixIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js new file mode 100644 index 00000000..596cb952 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js @@ -0,0 +1,34 @@ +define(['./hasOwn', './every', '../lang/isObject'], function(hasOwn, every, isObject) { + + function defaultCompare(a, b) { + return a === b; + } + + // Makes a function to compare the object values from the specified compare + // operation callback. + function makeCompare(callback) { + return function(value, key) { + return hasOwn(this, key) && callback(value, this[key]); + }; + } + + function checkProperties(value, key) { + return hasOwn(this, key); + } + + /** + * Checks if two objects have the same keys and values. + */ + function equals(a, b, callback) { + callback = callback || defaultCompare; + + if (!isObject(a) || !isObject(b)) { + return callback(a, b); + } + + return (every(a, makeCompare(callback), b) && + every(b, checkProperties, a)); + } + + return equals; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js new file mode 100644 index 00000000..52983a5e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js @@ -0,0 +1,22 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Object every + */ + function every(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = true; + forOwn(obj, function(val, key) { + // we consider any falsy values as "false" on purpose so shorthand + // syntax can be used to check property existence + if (!callback(val, key, obj)) { + result = false; + return false; // break + } + }); + return result; + } + + return every; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js new file mode 100644 index 00000000..0845d3c2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js @@ -0,0 +1,19 @@ +define(['../array/forEach', './forOwn'], function (forEach, forOwn) { + + /** + * Copy missing properties in the obj from the defaults. + */ + function fillIn(obj, var_defaults){ + forEach(Array.prototype.slice.call(arguments, 1), function(base){ + forOwn(base, function(val, key){ + if (obj[key] == null) { + obj[key] = val; + } + }); + }); + return obj; + } + + return fillIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js new file mode 100644 index 00000000..f213b915 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js @@ -0,0 +1,19 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Creates a new object with all the properties where the callback returns + * true. + */ + function filterValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + output[key] = value; + } + }); + + return output; + } + return filterValues; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js new file mode 100644 index 00000000..47e6b09d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js @@ -0,0 +1,20 @@ +define(['./some', '../function/makeIterator_'], function(some, makeIterator) { + + /** + * Returns first item that matches criteria + */ + function find(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result; + some(obj, function(value, key, obj) { + if (callback(value, key, obj)) { + result = value; + return true; //break + } + }); + return result; + } + + return find; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js new file mode 100644 index 00000000..2058e9cb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js @@ -0,0 +1,62 @@ +define(function () { + + var _hasDontEnumBug, + _dontEnums; + + function checkDontEnum(){ + _dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + + _hasDontEnumBug = true; + + for (var key in {'toString': null}) { + _hasDontEnumBug = false; + } + } + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forIn(obj, fn, thisObj){ + var key, i = 0; + // no need to check if argument is a real object that way we can use + // it for arrays, functions, date, etc. + + //post-pone check till needed + if (_hasDontEnumBug == null) checkDontEnum(); + + for (key in obj) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + + if (_hasDontEnumBug) { + while (key = _dontEnums[i++]) { + // since we aren't using hasOwn check we need to make sure the + // property was overwritten + if (obj[key] !== Object.prototype[key]) { + if (exec(fn, obj, key, thisObj) === false) { + break; + } + } + } + } + } + + function exec(fn, obj, key, thisObj){ + return fn.call(thisObj, obj[key], key, obj); + } + + return forIn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js new file mode 100644 index 00000000..b40cbaf1 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js @@ -0,0 +1,18 @@ +define(['./hasOwn', './forIn'], function (hasOwn, forIn) { + + /** + * Similar to Array/forEach but works over object properties and fixes Don't + * Enum bug on IE. + * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + */ + function forOwn(obj, fn, thisObj){ + forIn(obj, function(val, key){ + if (hasOwn(obj, key)) { + return fn.call(thisObj, obj[key], key, obj); + } + }); + } + + return forOwn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js new file mode 100644 index 00000000..60fee3dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js @@ -0,0 +1,18 @@ +define(['./forIn'], function (forIn) { + + /** + * return a list of all enumerable properties that have function values + */ + function functions(obj){ + var keys = []; + forIn(obj, function(val, key){ + if (typeof val === 'function'){ + keys.push(key); + } + }); + return keys.sort(); + } + + return functions; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js new file mode 100644 index 00000000..ca80b059 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js @@ -0,0 +1,20 @@ +define(function () { + + /** + * get "nested" object property + */ + function get(obj, prop){ + var parts = prop.split('.'), + last = parts.pop(); + + while (prop = parts.shift()) { + obj = obj[prop]; + if (typeof obj !== 'object') return; + } + + return obj[last]; + } + + return get; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js new file mode 100644 index 00000000..cc29817f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js @@ -0,0 +1,15 @@ +define(['./get'], function (get) { + + var UNDEF; + + /** + * Check if object has nested property. + */ + function has(obj, prop){ + return get(obj, prop) !== UNDEF; + } + + return has; + +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js new file mode 100644 index 00000000..5c53bcf2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js @@ -0,0 +1,12 @@ +define(function () { + + /** + * Safer Object.hasOwnProperty + */ + function hasOwn(obj, prop){ + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + return hasOwn; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js new file mode 100644 index 00000000..ed7c4f91 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object keys + */ + var keys = Object.keys || function (obj) { + var keys = []; + forOwn(obj, function(val, key){ + keys.push(key); + }); + return keys; + }; + + return keys; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js new file mode 100644 index 00000000..2958f6b0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js @@ -0,0 +1,17 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Creates a new object where all the values are the result of calling + * `callback`. + */ + function mapValues(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var output = {}; + forOwn(obj, function(val, key, obj) { + output[key] = callback(val, key, obj); + }); + + return output; + } + return mapValues; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js new file mode 100644 index 00000000..73ff427c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js @@ -0,0 +1,20 @@ +define(['./forOwn'], function (forOwn) { + + /** + * checks if a object contains all given properties/values + */ + function matches(target, props){ + // can't use "object/every" because of circular dependency + var result = true; + forOwn(props, function(val, key){ + if (target[key] !== val) { + // break loop at first difference + return (result = false); + } + }); + return result; + } + + return matches; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js new file mode 100644 index 00000000..ef311dcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js @@ -0,0 +1,11 @@ +define(['../array/max', './values'], function(arrMax, values) { + + /** + * Returns maximum value inside object. + */ + function max(obj, compareFn) { + return arrMax(values(obj), compareFn); + } + + return max; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js new file mode 100644 index 00000000..d7cfedec --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js @@ -0,0 +1,38 @@ +define(['./hasOwn', '../lang/deepClone', '../lang/isObject'], function (hasOwn, deepClone, isObject) { + + /** + * Deep merge objects. + */ + function merge() { + var i = 1, + key, val, obj, target; + + // make sure we don't modify source element and it's properties + // objects are passed by reference + target = deepClone( arguments[0] ); + + while (obj = arguments[i++]) { + for (key in obj) { + if ( ! hasOwn(obj, key) ) { + continue; + } + + val = obj[key]; + + if ( isObject(val) && isObject(target[key]) ){ + // inception, deep merge objects + target[key] = merge(target[key], val); + } else { + // make sure arrays, regexp, date, objects are cloned + target[key] = deepClone(val); + } + + } + } + + return target; + } + + return merge; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js new file mode 100644 index 00000000..9fb4c1a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js @@ -0,0 +1,11 @@ +define(['../array/min', './values'], function(arrMin, values) { + + /** + * Returns minimum value inside object. + */ + function min(obj, iterator) { + return arrMin(values(obj), iterator); + } + + return min; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js new file mode 100644 index 00000000..6210b7e7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js @@ -0,0 +1,28 @@ +define(['./forOwn'], function(forOwn){ + + /** + * Combine properties from all the objects into first one. + * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. + * @param {object} target Target Object + * @param {...object} objects Objects to be combined (0...n objects). + * @return {object} Target Object. + */ + function mixIn(target, objects){ + var i = 0, + n = arguments.length, + obj; + while(++i < n){ + obj = arguments[i]; + if (obj != null) { + forOwn(obj, copyProp, target); + } + } + return target; + } + + function copyProp(val, key){ + this[key] = val; + } + + return mixIn; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js new file mode 100644 index 00000000..7ed65db8 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js @@ -0,0 +1,19 @@ +define(['../array/forEach'], function (forEach) { + + /** + * Create nested object if non-existent + */ + function namespace(obj, path){ + if (!path) return obj; + forEach(path.split('.'), function(key){ + if (!obj[key]) { + obj[key] = {}; + } + obj = obj[key]; + }); + return obj; + } + + return namespace; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js new file mode 100644 index 00000000..76e22bfc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js @@ -0,0 +1,18 @@ +define(function(){ + + /** + * Return a copy of the object, filtered to only have values for the whitelisted keys. + */ + function pick(obj, var_keys){ + var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), + out = {}, + i = 0, key; + while (key = keys[i++]) { + out[key] = obj[key]; + } + return out; + } + + return pick; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js new file mode 100644 index 00000000..d47744bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js @@ -0,0 +1,12 @@ +define(['./map', '../function/prop'], function (map, prop) { + + /** + * Extract a list of property values. + */ + function pluck(obj, propName){ + return map(obj, prop(propName)); + } + + return pluck; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js new file mode 100644 index 00000000..d3a57788 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js @@ -0,0 +1,28 @@ +define(['./forOwn', './size'], function(forOwn, size) { + + /** + * Object reduce + */ + function reduce(obj, callback, memo, thisObj) { + var initial = arguments.length > 2; + + if (!size(obj) && !initial) { + throw new Error('reduce of empty object with no initial value'); + } + + forOwn(obj, function(value, key, list) { + if (!initial) { + memo = value; + initial = true; + } + else { + memo = callback.call(thisObj, memo, value, key, list); + } + }); + + return memo; + } + + return reduce; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js new file mode 100644 index 00000000..84296428 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js @@ -0,0 +1,15 @@ +define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { + + /** + * Object reject + */ + function reject(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + return filter(obj, function(value, index, obj) { + return !callback(value, index, obj); + }, thisObj); + } + + return reject; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js new file mode 100644 index 00000000..b8fa25a3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js @@ -0,0 +1,17 @@ +define(['./namespace'], function (namespace) { + + /** + * set "nested" object property + */ + function set(obj, prop, val){ + var parts = (/^(.+)\.(.+)$/).exec(prop); + if (parts){ + namespace(obj, parts[1])[parts[2]] = val; + } else { + obj[prop] = val; + } + } + + return set; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js new file mode 100644 index 00000000..c6e377cf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object size + */ + function size(obj) { + var count = 0; + forOwn(obj, function(){ + count++; + }); + return count; + } + + return size; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js new file mode 100644 index 00000000..1bd6fdae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js @@ -0,0 +1,20 @@ +define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { + + /** + * Object some + */ + function some(obj, callback, thisObj) { + callback = makeIterator(callback, thisObj); + var result = false; + forOwn(obj, function(val, key) { + if (callback(val, key, obj)) { + result = true; + return false; // break + } + }); + return result; + } + + return some; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js new file mode 100644 index 00000000..787fc19a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js @@ -0,0 +1,23 @@ +define(['./has'], function (has) { + + /** + * Unset object property. + */ + function unset(obj, prop){ + if (has(obj, prop)) { + var parts = prop.split('.'), + last = parts.pop(); + while (prop = parts.shift()) { + obj = obj[prop]; + } + return (delete obj[last]); + + } else { + // if property doesn't exist treat as deleted + return true; + } + } + + return unset; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js new file mode 100644 index 00000000..b311fd09 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js @@ -0,0 +1,16 @@ +define(['./forOwn'], function (forOwn) { + + /** + * Get object values + */ + function values(obj) { + var vals = []; + forOwn(obj, function(val, key){ + vals.push(val); + }); + return vals; + } + + return values; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js new file mode 100644 index 00000000..44346127 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js @@ -0,0 +1,15 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'contains' : require('./queryString/contains'), + 'decode' : require('./queryString/decode'), + 'encode' : require('./queryString/encode'), + 'getParam' : require('./queryString/getParam'), + 'getQuery' : require('./queryString/getQuery'), + 'parse' : require('./queryString/parse'), + 'setParam' : require('./queryString/setParam') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js new file mode 100644 index 00000000..a6d11cce --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js @@ -0,0 +1,12 @@ +define(['./getQuery'], function (getQuery) { + + /** + * Checks if query string contains parameter. + */ + function contains(url, paramName) { + var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` + return regex.test(getQuery(url)); + } + + return contains; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js new file mode 100644 index 00000000..02bc1609 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js @@ -0,0 +1,20 @@ +define(['../string/typecast', '../lang/isString'], function (typecast, isString) { + + /** + * Decode query string into an object of keys => vals. + */ + function decode(queryStr, shouldTypecast) { + var queryArr = (queryStr || '').replace('?', '').split('&'), + n = queryArr.length, + obj = {}, + item, val; + while (n--) { + item = queryArr[n].split('='); + val = shouldTypecast === false? item[1] : typecast(item[1]); + obj[item[0]] = isString(val)? decodeURIComponent(val) : val; + } + return obj; + } + + return decode; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js new file mode 100644 index 00000000..bd72a5b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js @@ -0,0 +1,15 @@ +define(['../object/forOwn'], function (forOwn) { + + /** + * Encode object into a query string. + */ + function encode(obj){ + var query = []; + forOwn(obj, function(val, key){ + query.push( key +'='+ encodeURIComponent(val) ); + }); + return (query.length)? '?'+ query.join('&') : ''; + } + + return encode; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js new file mode 100644 index 00000000..d9813724 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js @@ -0,0 +1,14 @@ +define(['../string/typecast', './getQuery'], function (typecast, getQuery) { + + /** + * Get query parameter value. + */ + function getParam(url, param, shouldTypecast){ + var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 + result = regexp.exec( getQuery(url) ), + val = (result && result[2])? result[2] : null; + return shouldTypecast === false? val : typecast(val); + } + + return getParam; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js new file mode 100644 index 00000000..aa3d99f3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js @@ -0,0 +1,13 @@ +define(function () { + + /** + * Gets full query as string with all special chars decoded. + */ + function getQuery(url) { + url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) + var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt + return (queryString)? decodeURIComponent(queryString[0]) : ''; + } + + return getQuery; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js new file mode 100644 index 00000000..ac153e3f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js @@ -0,0 +1,12 @@ +define(['./decode', './getQuery'], function (decode, getQuery) { + + /** + * Get query string, parses and decodes it. + */ + function parse(url, shouldTypecast) { + return decode(getQuery(url), shouldTypecast); + } + + return parse; +}); + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js new file mode 100644 index 00000000..97081aa7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js @@ -0,0 +1,28 @@ +define(function () { + + /** + * Set query string parameter value + */ + function setParam(url, paramName, value){ + url = url || ''; + + var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); + var param = paramName +'='+ encodeURIComponent( value ); + + if ( re.test(url) ) { + return url.replace(re, '$1'+ param); + } else { + if (url.indexOf('?') === -1) { + url += '?'; + } + if (url.indexOf('=') !== -1) { + url += '&'; + } + return url + param; + } + + } + + return setParam; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js new file mode 100644 index 00000000..b2641ee3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js @@ -0,0 +1,16 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'choice' : require('./random/choice'), + 'guid' : require('./random/guid'), + 'rand' : require('./random/rand'), + 'randBit' : require('./random/randBit'), + 'randHex' : require('./random/randHex'), + 'randInt' : require('./random/randInt'), + 'randSign' : require('./random/randSign'), + 'random' : require('./random/random') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js new file mode 100644 index 00000000..0d0c38df --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js @@ -0,0 +1,14 @@ +define(['./randInt', '../lang/isArray'], function (randInt, isArray) { + + /** + * Returns a random element from the supplied arguments + * or from the array (if single argument is an array). + */ + function choice(items) { + var target = (arguments.length === 1 && isArray(items))? items : arguments; + return target[ randInt(0, target.length - 1) ]; + } + + return choice; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js new file mode 100644 index 00000000..82f3a2db --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js @@ -0,0 +1,23 @@ +define(['./randHex', './choice'], function (randHex, choice) { + + /** + * Returns pseudo-random guid (UUID v4) + * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random + * by default and sequences can be predicted in some cases. See the + * "random/random" documentation for more info about it and how to replace + * the default PRNG. + */ + function guid() { + return ( + randHex(8)+'-'+ + randHex(4)+'-'+ + // v4 UUID always contain "4" at this position to specify it was + // randomly generated + '4' + randHex(3) +'-'+ + // v4 UUID always contain chars [a,b,8,9] at this position + choice(8, 9, 'a', 'b') + randHex(3)+'-'+ + randHex(12) + ); + } + return guid; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js new file mode 100644 index 00000000..b8c231dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js @@ -0,0 +1,13 @@ +define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ + + /** + * Returns random number inside range + */ + function rand(min, max){ + min = min == null? MIN_INT : min; + max = max == null? MAX_INT : max; + return min + (max - min) * random(); + } + + return rand; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js new file mode 100644 index 00000000..b3422d2d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js @@ -0,0 +1,11 @@ +define(['./random'], function (random) { + + /** + * Returns random bit (0 or 1) + */ + function randomBit() { + return random() > 0.5? 1 : 0; + } + + return randomBit; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js new file mode 100644 index 00000000..6e9bf1c5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js @@ -0,0 +1,19 @@ +define(['./choice'], function (choice) { + + var _chars = '0123456789abcdef'.split(''); + + /** + * Returns a random hexadecimal string + */ + function randHex(size){ + size = size && size > 0? size : 6; + var str = ''; + while (size--) { + str += choice(_chars); + } + return str; + } + + return randHex; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js new file mode 100644 index 00000000..1750e9de --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js @@ -0,0 +1,16 @@ +define(['../number/MIN_INT', '../number/MAX_INT', './rand'], function(MIN_INT, MAX_INT, rand){ + + /** + * Gets random integer inside range or snap to min/max values. + */ + function randInt(min, max){ + min = min == null? MIN_INT : ~~min; + max = max == null? MAX_INT : ~~max; + // can't be max + 0.5 otherwise it will round up if `rand` + // returns `max` causing it to overflow range. + // -0.5 and + 0.49 are required to avoid bias caused by rounding + return Math.round( rand(min - 0.5, max + 0.499999999999) ); + } + + return randInt; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js new file mode 100644 index 00000000..4141cdf6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js @@ -0,0 +1,11 @@ +define(['./random'], function (random) { + + /** + * Returns random sign (-1 or 1) + */ + function randomSign() { + return random() > 0.5? 1 : -1; + } + + return randomSign; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js new file mode 100644 index 00000000..4270822e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js @@ -0,0 +1,18 @@ +define(function () { + + /** + * Just a wrapper to Math.random. No methods inside mout/random should call + * Math.random() directly so we can inject the pseudo-random number + * generator if needed (ie. in case we need a seeded random or a better + * algorithm than the native one) + */ + function random(){ + return random.get(); + } + + // we expose the method so it can be swapped if needed + random.get = Math.random; + + return random; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js new file mode 100644 index 00000000..3f5fd804 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js @@ -0,0 +1,45 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'WHITE_SPACES' : require('./string/WHITE_SPACES'), + 'camelCase' : require('./string/camelCase'), + 'contains' : require('./string/contains'), + 'crop' : require('./string/crop'), + 'endsWith' : require('./string/endsWith'), + 'escapeHtml' : require('./string/escapeHtml'), + 'escapeRegExp' : require('./string/escapeRegExp'), + 'escapeUnicode' : require('./string/escapeUnicode'), + 'hyphenate' : require('./string/hyphenate'), + 'interpolate' : require('./string/interpolate'), + 'lowerCase' : require('./string/lowerCase'), + 'lpad' : require('./string/lpad'), + 'ltrim' : require('./string/ltrim'), + 'makePath' : require('./string/makePath'), + 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), + 'pascalCase' : require('./string/pascalCase'), + 'properCase' : require('./string/properCase'), + 'removeNonASCII' : require('./string/removeNonASCII'), + 'removeNonWord' : require('./string/removeNonWord'), + 'repeat' : require('./string/repeat'), + 'replace' : require('./string/replace'), + 'replaceAccents' : require('./string/replaceAccents'), + 'rpad' : require('./string/rpad'), + 'rtrim' : require('./string/rtrim'), + 'sentenceCase' : require('./string/sentenceCase'), + 'slugify' : require('./string/slugify'), + 'startsWith' : require('./string/startsWith'), + 'stripHtmlTags' : require('./string/stripHtmlTags'), + 'trim' : require('./string/trim'), + 'truncate' : require('./string/truncate'), + 'typecast' : require('./string/typecast'), + 'unCamelCase' : require('./string/unCamelCase'), + 'underscore' : require('./string/underscore'), + 'unescapeHtml' : require('./string/unescapeHtml'), + 'unescapeUnicode' : require('./string/unescapeUnicode'), + 'unhyphenate' : require('./string/unhyphenate'), + 'upperCase' : require('./string/upperCase') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js new file mode 100644 index 00000000..e830d86d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js @@ -0,0 +1,12 @@ +define(function() { + /** + * Contains all Unicode white-spaces. Taken from + * http://en.wikipedia.org/wiki/Whitespace_character. + */ + return [ + ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', + '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', + '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', + '\u205F', '\u3000' + ]; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js new file mode 100644 index 00000000..02e6c04d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js @@ -0,0 +1,16 @@ +define(['../lang/toString', './replaceAccents', './removeNonWord', './upperCase', './lowerCase'], function(toString, replaceAccents, removeNonWord, upperCase, lowerCase){ + /** + * Convert string to camelCase text. + */ + function camelCase(str){ + str = toString(str); + str = replaceAccents(str); + str = removeNonWord(str) + .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces + .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE + .replace(/\s+/g, '') //remove spaces + .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase + return str; + } + return camelCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js new file mode 100644 index 00000000..825b5a5f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js @@ -0,0 +1,14 @@ +define(['../lang/toString'], function(toString) { + + /** + * Searches for a given substring + */ + function contains(str, substring, fromIndex){ + str = toString(str); + substring = toString(substring); + return str.indexOf(substring, fromIndex) !== -1; + } + + return contains; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js new file mode 100644 index 00000000..3c073f05 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './truncate'], function (toString, truncate) { + /** + * Truncate string at full words. + */ + function crop(str, maxChars, append) { + str = toString(str); + return truncate(str, maxChars, append, true); + } + + return crop; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js new file mode 100644 index 00000000..31a73f20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function(toString) { + /** + * Checks if string ends with specified suffix. + */ + function endsWith(str, suffix) { + str = toString(str); + suffix = toString(suffix); + + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + + return endsWith; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js new file mode 100644 index 00000000..de34b61b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function(toString) { + + /** + * Escapes a string for insertion into HTML. + */ + function escapeHtml(str){ + str = toString(str) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/'/g, ''') + .replace(/"/g, '"'); + return str; + } + + return escapeHtml; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js new file mode 100644 index 00000000..32facac0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js @@ -0,0 +1,15 @@ +define(['../lang/toString'], function(toString) { + + var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; + + /** + * Escape RegExp string chars. + */ + function escapeRegExp(str) { + str = toString(str); + return str.replace(ESCAPE_CHARS,'\\$&'); + } + + return escapeRegExp; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js new file mode 100644 index 00000000..bd5e8c4c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js @@ -0,0 +1,21 @@ +define(['../lang/toString'], function(toString) { + + /** + * Escape string into unicode sequences + */ + function escapeUnicode(str, shouldEscapePrintable){ + str = toString(str); + return str.replace(/[\s\S]/g, function(ch){ + // skip printable ASCII chars if we should not escape them + if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { + return ch; + } + // we use "000" and slice(-4) for brevity, need to pad zeros, + // unicode escape always have 4 chars after "\u" + return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); + }); + } + + return escapeUnicode; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js new file mode 100644 index 00000000..679c405c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js @@ -0,0 +1,12 @@ +define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ + /** + * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function hyphenate(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "-"); + } + + return hyphenate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js new file mode 100644 index 00000000..ecb8ba80 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function(toString) { + + var stache = /\{\{(\w+)\}\}/g; //mustache-like + + /** + * String interpolation + */ + function interpolate(template, replacements, syntax){ + template = toString(template); + var replaceFn = function(match, prop){ + return (prop in replacements)? toString(replacements[prop]) : ''; + }; + return template.replace(syntax || stache, replaceFn); + } + + return interpolate; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js new file mode 100644 index 00000000..b045d69c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * "Safer" String.toLowerCase() + */ + function lowerCase(str){ + str = toString(str); + return str.toLowerCase(); + } + + return lowerCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js new file mode 100644 index 00000000..ea4f5fbf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js @@ -0,0 +1,16 @@ +define(['../lang/toString', './repeat'], function(toString, repeat) { + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function lpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + + return ((str.length < minLen) + ? repeat(ch, minLen - str.length) + str : str); + } + + return lpad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js new file mode 100644 index 00000000..477df953 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js @@ -0,0 +1,33 @@ +define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ + /** + * Remove chars from beginning of string. + */ + function ltrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var start = 0, + len = str.length, + charLen = chars.length, + found = true, + i, c; + + while (found && start < len) { + found = false; + i = -1; + c = str.charAt(start); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + start++; + break; + } + } + } + + return (start >= len) ? '' : str.substr(start, len); + } + + return ltrim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js new file mode 100644 index 00000000..7aa7baba --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js @@ -0,0 +1,13 @@ +define(['../array/join'], function(join){ + + /** + * Group arguments as path segments, if any of the args is `null` or an + * empty string it will be ignored from resulting path. + */ + function makePath(var_args){ + var result = join(Array.prototype.slice.call(arguments), '/'); + return result.replace(/\/{2,}/g, '/'); + } + + return makePath; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js new file mode 100644 index 00000000..44e4194f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function (toString) { + + /** + * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) + */ + function normalizeLineBreaks(str, lineEnd) { + str = toString(str); + lineEnd = lineEnd || '\n'; + + return str + .replace(/\r\n/g, lineEnd) // DOS + .replace(/\r/g, lineEnd) // Mac + .replace(/\n/g, lineEnd); // Unix + } + + return normalizeLineBreaks; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js new file mode 100644 index 00000000..ead9ead4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ + /** + * camelCase + UPPERCASE first char + */ + function pascalCase(str){ + str = toString(str); + return camelCase(str).replace(/^[a-z]/, upperCase); + } + + return pascalCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js new file mode 100644 index 00000000..2987b507 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ + /** + * UPPERCASE first char of each word. + */ + function properCase(str){ + str = toString(str); + return lowerCase(str).replace(/^\w|\s\w/g, upperCase); + } + + return properCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js new file mode 100644 index 00000000..4905869d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js @@ -0,0 +1,14 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove non-printable ASCII chars + */ + function removeNonASCII(str){ + str = toString(str); + + // Matches non-printable ASCII chars - + // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters + return str.replace(/[^\x20-\x7E]/g, ''); + } + + return removeNonASCII; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js new file mode 100644 index 00000000..2b1a2040 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove non-word chars. + */ + function removeNonWord(str){ + str = toString(str); + return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); + } + + return removeNonWord; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js new file mode 100644 index 00000000..02f5659f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function(toString){ + + /** + * Repeat string n times + */ + function repeat(str, n){ + str = toString(str); + return (new Array(n + 1)).join(str); + } + + return repeat; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js new file mode 100644 index 00000000..8b762fdc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js @@ -0,0 +1,32 @@ +define(['../lang/toString', '../lang/toArray'], function (toString, toArray) { + + /** + * Replace string(s) with the replacement(s) in the source. + */ + function replace(str, search, replacements) { + str = toString(str); + search = toArray(search); + replacements = toArray(replacements); + + var searchLength = search.length, + replacementsLength = replacements.length; + + if (replacementsLength !== 1 && searchLength !== replacementsLength) { + throw new Error('Unequal number of searches and replacements'); + } + + var i = -1; + while (++i < searchLength) { + // Use the first replacement for all searches if only one + // replacement is provided + str = str.replace( + search[i], + replacements[(replacementsLength === 1) ? 0 : i]); + } + + return str; + } + + return replace; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js new file mode 100644 index 00000000..3a63f55a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js @@ -0,0 +1,36 @@ +define(['../lang/toString'], function(toString){ + /** + * Replaces all accented chars with regular ones + */ + function replaceAccents(str){ + str = toString(str); + + // verifies if the String has accents and replace them + if (str.search(/[\xC0-\xFF]/g) > -1) { + str = str + .replace(/[\xC0-\xC5]/g, "A") + .replace(/[\xC6]/g, "AE") + .replace(/[\xC7]/g, "C") + .replace(/[\xC8-\xCB]/g, "E") + .replace(/[\xCC-\xCF]/g, "I") + .replace(/[\xD0]/g, "D") + .replace(/[\xD1]/g, "N") + .replace(/[\xD2-\xD6\xD8]/g, "O") + .replace(/[\xD9-\xDC]/g, "U") + .replace(/[\xDD]/g, "Y") + .replace(/[\xDE]/g, "P") + .replace(/[\xE0-\xE5]/g, "a") + .replace(/[\xE6]/g, "ae") + .replace(/[\xE7]/g, "c") + .replace(/[\xE8-\xEB]/g, "e") + .replace(/[\xEC-\xEF]/g, "i") + .replace(/[\xF1]/g, "n") + .replace(/[\xF2-\xF6\xF8]/g, "o") + .replace(/[\xF9-\xFC]/g, "u") + .replace(/[\xFE]/g, "p") + .replace(/[\xFD\xFF]/g, "y"); + } + return str; + } + return replaceAccents; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js new file mode 100644 index 00000000..2efd9c88 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js @@ -0,0 +1,14 @@ +define(['../lang/toString', './repeat'], function (toString, repeat) { + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function rpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; + } + + return rpad; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js new file mode 100644 index 00000000..a4cc282d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js @@ -0,0 +1,32 @@ +define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ + /** + * Remove chars from end of string. + */ + function rtrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var end = str.length - 1, + charLen = chars.length, + found = true, + i, c; + + while (found && end >= 0) { + found = false; + i = -1; + c = str.charAt(end); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + end--; + break; + } + } + } + + return (end >= 0) ? str.substring(0, end + 1) : ''; + } + + return rtrim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js new file mode 100644 index 00000000..cfe45af5 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js @@ -0,0 +1,13 @@ +define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ + /** + * UPPERCASE first char of each sentence and lowercase other chars. + */ + function sentenceCase(str){ + str = toString(str); + + // Replace first char of each sentence (new line or after '.\s+') to + // UPPERCASE + return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); + } + return sentenceCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js new file mode 100644 index 00000000..c6d68c7e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js @@ -0,0 +1,21 @@ +define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ + /** + * Convert to lower case, remove accents, remove non-word chars and + * replace spaces with the specified delimeter. + * Does not split camelCase text. + */ + function slugify(str, delimeter){ + str = toString(str); + + if (delimeter == null) { + delimeter = "-"; + } + str = replaceAccents(str); + str = removeNonWord(str); + str = trim(str) //should come after removeNonWord + .replace(/ +/g, delimeter) //replace spaces with delimeter + .toLowerCase(); + return str; + } + return slugify; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js new file mode 100644 index 00000000..88ae5453 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js @@ -0,0 +1,13 @@ +define(['../lang/toString'], function (toString) { + /** + * Checks if string starts with specified prefix. + */ + function startsWith(str, prefix) { + str = toString(str); + prefix = toString(prefix); + + return str.indexOf(prefix) === 0; + } + + return startsWith; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js new file mode 100644 index 00000000..e8da956d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js @@ -0,0 +1,11 @@ +define(['../lang/toString'], function(toString){ + /** + * Remove HTML tags from string. + */ + function stripHtmlTags(str){ + str = toString(str); + + return str.replace(/<[^>]*>/g, ''); + } + return stripHtmlTags; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js new file mode 100644 index 00000000..55526041 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js @@ -0,0 +1,12 @@ +define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ + /** + * Remove white-spaces from beginning and end of string. + */ + function trim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + return ltrim(rtrim(str, chars), chars); + } + + return trim; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js new file mode 100644 index 00000000..34000d9f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js @@ -0,0 +1,20 @@ +define(['../lang/toString', './trim'], function(toString, trim){ + /** + * Limit number of chars. + */ + function truncate(str, maxChars, append, onlyFullWords){ + str = toString(str); + append = append || '...'; + maxChars = onlyFullWords? maxChars + 1 : maxChars; + + str = trim(str); + if(str.length <= maxChars){ + return str; + } + str = str.substr(0, maxChars - append.length); + //crop at last space or remove trailing whitespace + str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); + return str + append; + } + return truncate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js new file mode 100644 index 00000000..a7c83153 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js @@ -0,0 +1,29 @@ +define(function () { + + var UNDEF; + + /** + * Parses string and convert it into a native value. + */ + function typecast(val) { + var r; + if ( val === null || val === 'null' ) { + r = null; + } else if ( val === 'true' ) { + r = true; + } else if ( val === 'false' ) { + r = false; + } else if ( val === UNDEF || val === 'undefined' ) { + r = UNDEF; + } else if ( val === '' || isNaN(val) ) { + //isNaN('') returns false + r = val; + } else { + //parseFloat(null || '') returns NaN + r = parseFloat(val); + } + return r; + } + + return typecast; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js new file mode 100644 index 00000000..eeef39b6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js @@ -0,0 +1,23 @@ +define(['../lang/toString'], function(toString){ + + var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; + + /** + * Add space between camelCase text. + */ + function unCamelCase(str, delimiter){ + if (delimiter == null) { + delimiter = ' '; + } + + function join(str, c1, c2) { + return c1 + delimiter + c2; + } + + str = toString(str); + str = str.replace(CAMEL_CASE_BORDER, join); + str = str.toLowerCase(); //add space between camelCase text + return str; + } + return unCamelCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js new file mode 100644 index 00000000..75dd4649 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js @@ -0,0 +1,11 @@ +define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ + /** + * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function underscore(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "_"); + } + return underscore; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js new file mode 100644 index 00000000..173c69c2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js @@ -0,0 +1,18 @@ +define(['../lang/toString'], function (toString) { + + /** + * Unescapes HTML special chars + */ + function unescapeHtml(str){ + str = toString(str) + .replace(/&/g , '&') + .replace(/</g , '<') + .replace(/>/g , '>') + .replace(/'/g , "'") + .replace(/"/g, '"'); + return str; + } + + return unescapeHtml; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js new file mode 100644 index 00000000..d4a7ba1d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js @@ -0,0 +1,16 @@ +define(['../lang/toString'], function(toString) { + + /** + * Unescape unicode char sequences + */ + function unescapeUnicode(str){ + str = toString(str); + return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ + var code = parseInt(ch.slice(2), 16); + return String.fromCharCode(code); + }); + } + + return unescapeUnicode; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js new file mode 100644 index 00000000..6ac2fa4c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js @@ -0,0 +1,10 @@ +define(['../lang/toString'], function(toString){ + /** + * Replaces hyphens with spaces. (only hyphens between word chars) + */ + function unhyphenate(str){ + str = toString(str); + return str.replace(/(\w)(-)(\w)/g, '$1 $3'); + } + return unhyphenate; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js new file mode 100644 index 00000000..8b2073e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js @@ -0,0 +1,10 @@ +define(['../lang/toString'], function(toString){ + /** + * "Safer" String.toUpperCase() + */ + function upperCase(str){ + str = toString(str); + return str.toUpperCase(); + } + return upperCase; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js new file mode 100644 index 00000000..67c90685 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js @@ -0,0 +1,12 @@ +define(function(require){ + +//automatically generated, do not edit! +//run `node build` instead +return { + 'convert' : require('./time/convert'), + 'now' : require('./time/now'), + 'parseMs' : require('./time/parseMs'), + 'toTimeString' : require('./time/toTimeString') +}; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js new file mode 100644 index 00000000..2de0cf2e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js @@ -0,0 +1,41 @@ +define(function () { + + /** + * convert time into another unit + */ + function convert(val, sourceUnitName, destinationUnitName){ + destinationUnitName = destinationUnitName || 'ms'; + return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); + } + + + //TODO: maybe extract to a separate module + function getUnit(unitName){ + switch(unitName){ + case 'ms': + case 'millisecond': + return 1; + case 's': + case 'second': + return 1000; + case 'm': + case 'minute': + return 60000; + case 'h': + case 'hour': + return 3600000; + case 'd': + case 'day': + return 86400000; + case 'w': + case 'week': + return 604800000; + default: + throw new Error('"'+ unitName + '" is not a valid unit'); + } + } + + + return convert; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js new file mode 100644 index 00000000..a3a38bcb --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js @@ -0,0 +1,12 @@ +define(function () { + + /** + * Get current time in miliseconds + */ + var now = (typeof Date.now === 'function')? Date.now : function(){ + return +(new Date()); + }; + + return now; + +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js new file mode 100644 index 00000000..964929ae --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js @@ -0,0 +1,17 @@ +define(['../math/countSteps'], function(countSteps){ + + /** + * Parse timestamp into an object. + */ + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + return parseMs; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js new file mode 100644 index 00000000..edf18218 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js @@ -0,0 +1,23 @@ +define(['../math/countSteps', '../number/pad'], function(countSteps, pad){ + + var HOUR = 3600000, + MINUTE = 60000, + SECOND = 1000; + + /** + * Format timestamp into a time string. + */ + function toTimeString(ms){ + var h = ms < HOUR ? 0 : countSteps(ms, HOUR), + m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), + s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), + str = ''; + + str += h? h + ':' : ''; + str += pad(m, 2) + ':'; + str += pad(s, 2); + + return str; + } + return toTimeString; +}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string.js new file mode 100644 index 00000000..7f0ca3bd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string.js @@ -0,0 +1,45 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'WHITE_SPACES' : require('./string/WHITE_SPACES'), + 'camelCase' : require('./string/camelCase'), + 'contains' : require('./string/contains'), + 'crop' : require('./string/crop'), + 'endsWith' : require('./string/endsWith'), + 'escapeHtml' : require('./string/escapeHtml'), + 'escapeRegExp' : require('./string/escapeRegExp'), + 'escapeUnicode' : require('./string/escapeUnicode'), + 'hyphenate' : require('./string/hyphenate'), + 'interpolate' : require('./string/interpolate'), + 'lowerCase' : require('./string/lowerCase'), + 'lpad' : require('./string/lpad'), + 'ltrim' : require('./string/ltrim'), + 'makePath' : require('./string/makePath'), + 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), + 'pascalCase' : require('./string/pascalCase'), + 'properCase' : require('./string/properCase'), + 'removeNonASCII' : require('./string/removeNonASCII'), + 'removeNonWord' : require('./string/removeNonWord'), + 'repeat' : require('./string/repeat'), + 'replace' : require('./string/replace'), + 'replaceAccents' : require('./string/replaceAccents'), + 'rpad' : require('./string/rpad'), + 'rtrim' : require('./string/rtrim'), + 'sentenceCase' : require('./string/sentenceCase'), + 'slugify' : require('./string/slugify'), + 'startsWith' : require('./string/startsWith'), + 'stripHtmlTags' : require('./string/stripHtmlTags'), + 'trim' : require('./string/trim'), + 'truncate' : require('./string/truncate'), + 'typecast' : require('./string/typecast'), + 'unCamelCase' : require('./string/unCamelCase'), + 'underscore' : require('./string/underscore'), + 'unescapeHtml' : require('./string/unescapeHtml'), + 'unescapeUnicode' : require('./string/unescapeUnicode'), + 'unhyphenate' : require('./string/unhyphenate'), + 'upperCase' : require('./string/upperCase') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js new file mode 100644 index 00000000..03e01254 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js @@ -0,0 +1,12 @@ + + /** + * Contains all Unicode white-spaces. Taken from + * http://en.wikipedia.org/wiki/Whitespace_character. + */ + module.exports = [ + ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', + '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', + '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', + '\u205F', '\u3000' + ]; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js new file mode 100644 index 00000000..aadb69a2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js @@ -0,0 +1,20 @@ +var toString = require('../lang/toString'); +var replaceAccents = require('./replaceAccents'); +var removeNonWord = require('./removeNonWord'); +var upperCase = require('./upperCase'); +var lowerCase = require('./lowerCase'); + /** + * Convert string to camelCase text. + */ + function camelCase(str){ + str = toString(str); + str = replaceAccents(str); + str = removeNonWord(str) + .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces + .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE + .replace(/\s+/g, '') //remove spaces + .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase + return str; + } + module.exports = camelCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js new file mode 100644 index 00000000..cb22cae4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); + + /** + * Searches for a given substring + */ + function contains(str, substring, fromIndex){ + str = toString(str); + substring = toString(substring); + return str.indexOf(substring, fromIndex) !== -1; + } + + module.exports = contains; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js new file mode 100644 index 00000000..53b93b49 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js @@ -0,0 +1,12 @@ +var toString = require('../lang/toString'); +var truncate = require('./truncate'); + /** + * Truncate string at full words. + */ + function crop(str, maxChars, append) { + str = toString(str); + return truncate(str, maxChars, append, true); + } + + module.exports = crop; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js new file mode 100644 index 00000000..d504e9dd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + /** + * Checks if string ends with specified suffix. + */ + function endsWith(str, suffix) { + str = toString(str); + suffix = toString(suffix); + + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + + module.exports = endsWith; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js new file mode 100644 index 00000000..e67c4b21 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Escapes a string for insertion into HTML. + */ + function escapeHtml(str){ + str = toString(str) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/'/g, ''') + .replace(/"/g, '"'); + return str; + } + + module.exports = escapeHtml; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js new file mode 100644 index 00000000..70cb84ff --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); + + var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; + + /** + * Escape RegExp string chars. + */ + function escapeRegExp(str) { + str = toString(str); + return str.replace(ESCAPE_CHARS,'\\$&'); + } + + module.exports = escapeRegExp; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js new file mode 100644 index 00000000..ec649adf --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js @@ -0,0 +1,21 @@ +var toString = require('../lang/toString'); + + /** + * Escape string into unicode sequences + */ + function escapeUnicode(str, shouldEscapePrintable){ + str = toString(str); + return str.replace(/[\s\S]/g, function(ch){ + // skip printable ASCII chars if we should not escape them + if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { + return ch; + } + // we use "000" and slice(-4) for brevity, need to pad zeros, + // unicode escape always have 4 chars after "\u" + return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); + }); + } + + module.exports = escapeUnicode; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js new file mode 100644 index 00000000..95e32436 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); +var slugify = require('./slugify'); +var unCamelCase = require('./unCamelCase'); + /** + * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function hyphenate(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "-"); + } + + module.exports = hyphenate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js new file mode 100644 index 00000000..ac88fac2 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + var stache = /\{\{(\w+)\}\}/g; //mustache-like + + /** + * String interpolation + */ + function interpolate(template, replacements, syntax){ + template = toString(template); + var replaceFn = function(match, prop){ + return (prop in replacements)? toString(replacements[prop]) : ''; + }; + return template.replace(syntax || stache, replaceFn); + } + + module.exports = interpolate; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js new file mode 100644 index 00000000..30bb7ad9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * "Safer" String.toLowerCase() + */ + function lowerCase(str){ + str = toString(str); + return str.toLowerCase(); + } + + module.exports = lowerCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js new file mode 100644 index 00000000..694d711e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js @@ -0,0 +1,17 @@ +var toString = require('../lang/toString'); +var repeat = require('./repeat'); + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function lpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + + return ((str.length < minLen) + ? repeat(ch, minLen - str.length) + str : str); + } + + module.exports = lpad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js new file mode 100644 index 00000000..23d7b33f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js @@ -0,0 +1,34 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); + /** + * Remove chars from beginning of string. + */ + function ltrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var start = 0, + len = str.length, + charLen = chars.length, + found = true, + i, c; + + while (found && start < len) { + found = false; + i = -1; + c = str.charAt(start); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + start++; + break; + } + } + } + + return (start >= len) ? '' : str.substr(start, len); + } + + module.exports = ltrim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js new file mode 100644 index 00000000..69aef310 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js @@ -0,0 +1,13 @@ +var join = require('../array/join'); + + /** + * Group arguments as path segments, if any of the args is `null` or an + * empty string it will be ignored from resulting path. + */ + function makePath(var_args){ + var result = join(Array.prototype.slice.call(arguments), '/'); + return result.replace(/\/{2,}/g, '/'); + } + + module.exports = makePath; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js new file mode 100644 index 00000000..8a8dccfd --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) + */ + function normalizeLineBreaks(str, lineEnd) { + str = toString(str); + lineEnd = lineEnd || '\n'; + + return str + .replace(/\r\n/g, lineEnd) // DOS + .replace(/\r/g, lineEnd) // Mac + .replace(/\n/g, lineEnd); // Unix + } + + module.exports = normalizeLineBreaks; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js new file mode 100644 index 00000000..fd190353 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var camelCase = require('./camelCase'); +var upperCase = require('./upperCase'); + /** + * camelCase + UPPERCASE first char + */ + function pascalCase(str){ + str = toString(str); + return camelCase(str).replace(/^[a-z]/, upperCase); + } + + module.exports = pascalCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js new file mode 100644 index 00000000..61636be4 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var lowerCase = require('./lowerCase'); +var upperCase = require('./upperCase'); + /** + * UPPERCASE first char of each word. + */ + function properCase(str){ + str = toString(str); + return lowerCase(str).replace(/^\w|\s\w/g, upperCase); + } + + module.exports = properCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js new file mode 100644 index 00000000..fb463816 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js @@ -0,0 +1,14 @@ +var toString = require('../lang/toString'); + /** + * Remove non-printable ASCII chars + */ + function removeNonASCII(str){ + str = toString(str); + + // Matches non-printable ASCII chars - + // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters + return str.replace(/[^\x20-\x7E]/g, ''); + } + + module.exports = removeNonASCII; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js new file mode 100644 index 00000000..bdd153b9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * Remove non-word chars. + */ + function removeNonWord(str){ + str = toString(str); + return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); + } + + module.exports = removeNonWord; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js new file mode 100644 index 00000000..0f9b4754 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + + /** + * Repeat string n times + */ + function repeat(str, n){ + str = toString(str); + return (new Array(n + 1)).join(str); + } + + module.exports = repeat; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js new file mode 100644 index 00000000..14433fc7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js @@ -0,0 +1,33 @@ +var toString = require('../lang/toString'); +var toArray = require('../lang/toArray'); + + /** + * Replace string(s) with the replacement(s) in the source. + */ + function replace(str, search, replacements) { + str = toString(str); + search = toArray(search); + replacements = toArray(replacements); + + var searchLength = search.length, + replacementsLength = replacements.length; + + if (replacementsLength !== 1 && searchLength !== replacementsLength) { + throw new Error('Unequal number of searches and replacements'); + } + + var i = -1; + while (++i < searchLength) { + // Use the first replacement for all searches if only one + // replacement is provided + str = str.replace( + search[i], + replacements[(replacementsLength === 1) ? 0 : i]); + } + + return str; + } + + module.exports = replace; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js new file mode 100644 index 00000000..bb221265 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js @@ -0,0 +1,36 @@ +var toString = require('../lang/toString'); + /** + * Replaces all accented chars with regular ones + */ + function replaceAccents(str){ + str = toString(str); + + // verifies if the String has accents and replace them + if (str.search(/[\xC0-\xFF]/g) > -1) { + str = str + .replace(/[\xC0-\xC5]/g, "A") + .replace(/[\xC6]/g, "AE") + .replace(/[\xC7]/g, "C") + .replace(/[\xC8-\xCB]/g, "E") + .replace(/[\xCC-\xCF]/g, "I") + .replace(/[\xD0]/g, "D") + .replace(/[\xD1]/g, "N") + .replace(/[\xD2-\xD6\xD8]/g, "O") + .replace(/[\xD9-\xDC]/g, "U") + .replace(/[\xDD]/g, "Y") + .replace(/[\xDE]/g, "P") + .replace(/[\xE0-\xE5]/g, "a") + .replace(/[\xE6]/g, "ae") + .replace(/[\xE7]/g, "c") + .replace(/[\xE8-\xEB]/g, "e") + .replace(/[\xEC-\xEF]/g, "i") + .replace(/[\xF1]/g, "n") + .replace(/[\xF2-\xF6\xF8]/g, "o") + .replace(/[\xF9-\xFC]/g, "u") + .replace(/[\xFE]/g, "p") + .replace(/[\xFD\xFF]/g, "y"); + } + return str; + } + module.exports = replaceAccents; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js new file mode 100644 index 00000000..99f6378d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var repeat = require('./repeat'); + + /** + * Pad string with `char` if its' length is smaller than `minLen` + */ + function rpad(str, minLen, ch) { + str = toString(str); + ch = ch || ' '; + return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; + } + + module.exports = rpad; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js new file mode 100644 index 00000000..66ba80e9 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js @@ -0,0 +1,33 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); + /** + * Remove chars from end of string. + */ + function rtrim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + + var end = str.length - 1, + charLen = chars.length, + found = true, + i, c; + + while (found && end >= 0) { + found = false; + i = -1; + c = str.charAt(end); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + end--; + break; + } + } + } + + return (end >= 0) ? str.substring(0, end + 1) : ''; + } + + module.exports = rtrim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js new file mode 100644 index 00000000..354104c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var lowerCase = require('./lowerCase'); +var upperCase = require('./upperCase'); + /** + * UPPERCASE first char of each sentence and lowercase other chars. + */ + function sentenceCase(str){ + str = toString(str); + + // Replace first char of each sentence (new line or after '.\s+') to + // UPPERCASE + return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); + } + module.exports = sentenceCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js new file mode 100644 index 00000000..142f0d9b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js @@ -0,0 +1,24 @@ +var toString = require('../lang/toString'); +var replaceAccents = require('./replaceAccents'); +var removeNonWord = require('./removeNonWord'); +var trim = require('./trim'); + /** + * Convert to lower case, remove accents, remove non-word chars and + * replace spaces with the specified delimeter. + * Does not split camelCase text. + */ + function slugify(str, delimeter){ + str = toString(str); + + if (delimeter == null) { + delimeter = "-"; + } + str = replaceAccents(str); + str = removeNonWord(str); + str = trim(str) //should come after removeNonWord + .replace(/ +/g, delimeter) //replace spaces with delimeter + .toLowerCase(); + return str; + } + module.exports = slugify; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js new file mode 100644 index 00000000..bce2bd20 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); + /** + * Checks if string starts with specified prefix. + */ + function startsWith(str, prefix) { + str = toString(str); + prefix = toString(prefix); + + return str.indexOf(prefix) === 0; + } + + module.exports = startsWith; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js new file mode 100644 index 00000000..01d17b0e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js @@ -0,0 +1,11 @@ +var toString = require('../lang/toString'); + /** + * Remove HTML tags from string. + */ + function stripHtmlTags(str){ + str = toString(str); + + return str.replace(/<[^>]*>/g, ''); + } + module.exports = stripHtmlTags; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js new file mode 100644 index 00000000..9652b0c7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js @@ -0,0 +1,15 @@ +var toString = require('../lang/toString'); +var WHITE_SPACES = require('./WHITE_SPACES'); +var ltrim = require('./ltrim'); +var rtrim = require('./rtrim'); + /** + * Remove white-spaces from beginning and end of string. + */ + function trim(str, chars) { + str = toString(str); + chars = chars || WHITE_SPACES; + return ltrim(rtrim(str, chars), chars); + } + + module.exports = trim; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js new file mode 100644 index 00000000..a98d6c7d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js @@ -0,0 +1,21 @@ +var toString = require('../lang/toString'); +var trim = require('./trim'); + /** + * Limit number of chars. + */ + function truncate(str, maxChars, append, onlyFullWords){ + str = toString(str); + append = append || '...'; + maxChars = onlyFullWords? maxChars + 1 : maxChars; + + str = trim(str); + if(str.length <= maxChars){ + return str; + } + str = str.substr(0, maxChars - append.length); + //crop at last space or remove trailing whitespace + str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); + return str + append; + } + module.exports = truncate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js new file mode 100644 index 00000000..c1386a49 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js @@ -0,0 +1,29 @@ + + + var UNDEF; + + /** + * Parses string and convert it into a native value. + */ + function typecast(val) { + var r; + if ( val === null || val === 'null' ) { + r = null; + } else if ( val === 'true' ) { + r = true; + } else if ( val === 'false' ) { + r = false; + } else if ( val === UNDEF || val === 'undefined' ) { + r = UNDEF; + } else if ( val === '' || isNaN(val) ) { + //isNaN('') returns false + r = val; + } else { + //parseFloat(null || '') returns NaN + r = parseFloat(val); + } + return r; + } + + module.exports = typecast; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js new file mode 100644 index 00000000..4968f378 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js @@ -0,0 +1,23 @@ +var toString = require('../lang/toString'); + + var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; + + /** + * Add space between camelCase text. + */ + function unCamelCase(str, delimiter){ + if (delimiter == null) { + delimiter = ' '; + } + + function join(str, c1, c2) { + return c1 + delimiter + c2; + } + + str = toString(str); + str = str.replace(CAMEL_CASE_BORDER, join); + str = str.toLowerCase(); //add space between camelCase text + return str; + } + module.exports = unCamelCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js new file mode 100644 index 00000000..ebd6e2b7 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js @@ -0,0 +1,13 @@ +var toString = require('../lang/toString'); +var slugify = require('./slugify'); +var unCamelCase = require('./unCamelCase'); + /** + * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. + */ + function underscore(str){ + str = toString(str); + str = unCamelCase(str); + return slugify(str, "_"); + } + module.exports = underscore; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js new file mode 100644 index 00000000..52cf3f45 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js @@ -0,0 +1,18 @@ +var toString = require('../lang/toString'); + + /** + * Unescapes HTML special chars + */ + function unescapeHtml(str){ + str = toString(str) + .replace(/&/g , '&') + .replace(/</g , '<') + .replace(/>/g , '>') + .replace(/'/g , "'") + .replace(/"/g, '"'); + return str; + } + + module.exports = unescapeHtml; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js new file mode 100644 index 00000000..0b7fb73b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js @@ -0,0 +1,16 @@ +var toString = require('../lang/toString'); + + /** + * Unescape unicode char sequences + */ + function unescapeUnicode(str){ + str = toString(str); + return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ + var code = parseInt(ch.slice(2), 16); + return String.fromCharCode(code); + }); + } + + module.exports = unescapeUnicode; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js new file mode 100644 index 00000000..311dfa17 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js @@ -0,0 +1,10 @@ +var toString = require('../lang/toString'); + /** + * Replaces hyphens with spaces. (only hyphens between word chars) + */ + function unhyphenate(str){ + str = toString(str); + return str.replace(/(\w)(-)(\w)/g, '$1 $3'); + } + module.exports = unhyphenate; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js new file mode 100644 index 00000000..6c92552c --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js @@ -0,0 +1,10 @@ +var toString = require('../lang/toString'); + /** + * "Safer" String.toUpperCase() + */ + function upperCase(str){ + str = toString(str); + return str.toUpperCase(); + } + module.exports = upperCase; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time.js new file mode 100644 index 00000000..9f533296 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time.js @@ -0,0 +1,12 @@ + + +//automatically generated, do not edit! +//run `node build` instead +module.exports = { + 'convert' : require('./time/convert'), + 'now' : require('./time/now'), + 'parseMs' : require('./time/parseMs'), + 'toTimeString' : require('./time/toTimeString') +}; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js new file mode 100644 index 00000000..852a0f03 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js @@ -0,0 +1,41 @@ + + + /** + * convert time into another unit + */ + function convert(val, sourceUnitName, destinationUnitName){ + destinationUnitName = destinationUnitName || 'ms'; + return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); + } + + + //TODO: maybe extract to a separate module + function getUnit(unitName){ + switch(unitName){ + case 'ms': + case 'millisecond': + return 1; + case 's': + case 'second': + return 1000; + case 'm': + case 'minute': + return 60000; + case 'h': + case 'hour': + return 3600000; + case 'd': + case 'day': + return 86400000; + case 'w': + case 'week': + return 604800000; + default: + throw new Error('"'+ unitName + '" is not a valid unit'); + } + } + + + module.exports = convert; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js new file mode 100644 index 00000000..effcfbe3 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js @@ -0,0 +1,12 @@ + + + /** + * Get current time in miliseconds + */ + var now = (typeof Date.now === 'function')? Date.now : function(){ + return +(new Date()); + }; + + module.exports = now; + + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js new file mode 100644 index 00000000..6d997976 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js @@ -0,0 +1,17 @@ +var countSteps = require('../math/countSteps'); + + /** + * Parse timestamp into an object. + */ + function parseMs(ms){ + return { + milliseconds : countSteps(ms, 1, 1000), + seconds : countSteps(ms, 1000, 60), + minutes : countSteps(ms, 60000, 60), + hours : countSteps(ms, 3600000, 24), + days : countSteps(ms, 86400000) + }; + } + + module.exports = parseMs; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js new file mode 100644 index 00000000..101d69fc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js @@ -0,0 +1,24 @@ +var countSteps = require('../math/countSteps'); +var pad = require('../number/pad'); + + var HOUR = 3600000, + MINUTE = 60000, + SECOND = 1000; + + /** + * Format timestamp into a time string. + */ + function toTimeString(ms){ + var h = ms < HOUR ? 0 : countSteps(ms, HOUR), + m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), + s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), + str = ''; + + str += h? h + ':' : ''; + str += pad(m, 2) + ':'; + str += pad(s, 2); + + return str; + } + module.exports = toTimeString; + diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore new file mode 100644 index 00000000..f1250e58 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/History.md new file mode 100644 index 00000000..88119480 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/History.md @@ -0,0 +1,42 @@ + +1.0.0 / 2013-06-18 +================== + + * remove .version + * >=. Closes #19 + * Merge pull request #15 from davglass/readline-osx + * On OSX revert back to terminal hack to avoid a readline bug + +0.1.0 / 2012-09-19 +================== + + * Fixed logic bug that caused bar to jump one extra space at the end [davglass] + * Working with readline impl, even on Windows [davglass] + * Using readline instead of the \r hack [davglass] + +0.0.5 / 2012-08-07 +================== + + * add ability to tick by zero chunks - tick(0) + * fix ETA. Closes #4 [lwille] + +0.0.4 / 2011-11-14 +================== + + * Allow more recent versions of node + +0.0.3 / 2011-04-20 +================== + + * Changed; erase the line when complete + +0.0.2 / 2011-04-20 +================== + + * Added custom tokens support + * Fixed; clear line before writing + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Makefile new file mode 100644 index 00000000..36a3ed7d --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Makefile @@ -0,0 +1,5 @@ + +test: + @echo "populate me" + +.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md new file mode 100644 index 00000000..4e08a49b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md @@ -0,0 +1,117 @@ +# node-progress + + Flexible ascii progress bar + +## Installation + + npm install progress + +## Usage + + First we create a `ProgressBar`, giving it a format string + as well as the `total`, telling the progress bar when it will + be considered complete. After that all we need to do is `tick()` appropriately. + +```javascript +var ProgressBar = require('progress'); + +var bar = new ProgressBar(':bar', { total: 10 }); +var timer = setInterval(function(){ + bar.tick(); + if (bar.complete) { + console.log('\ncomplete\n'); + clearInterval(timer); + } +}, 100); +``` + +## Options: + + - `total` total number of ticks to complete + - `width` the displayed width of the progress bar defaulting to total + - `stream` the output stream defaulting to stdout + - `complete` completion character defaulting to "=" + - `incomplete` incomplete character defaulting to "-" + - `clear` option to clear the bar on completion defaulting to false + - `callback` optional function to call when the progress bar completes + +## Tokens: + + - `:bar` the progress bar itself + - `:current` current tick number + - `:total` total ticks + - `:elapsed` time elapsed in seconds + - `:percent` completion percentage + - `:eta` estimated completion time in seconds + +## Examples + +### Download + + In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length. + +```javascript +var ProgressBar = require('../') + , https = require('https'); + +var req = https.request({ + host: 'download.github.com' + , port: 443 + , path: '/visionmedia-node-jscoverage-0d4608a.zip' +}); + +req.on('response', function(res){ + var len = parseInt(res.headers['content-length'], 10); + + console.log(); + var bar = new ProgressBar(' downloading [:bar] :percent :etas', { + complete: '=' + , incomplete: ' ' + , width: 20 + , total: len + }); + + res.on('data', function(chunk){ + bar.tick(chunk.length); + }); + + res.on('end', function(){ + console.log('\n'); + }); +}); + +req.end(); +``` + + The code above will generate a progress bar that looks like this: + +``` +downloading [===== ] 29% 3.7s +``` + +You can see more examples in the `examples` folder. + +## License + +(The MIT License) + +Copyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>` + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/index.js new file mode 100644 index 00000000..4449dd30 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/node-progress'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js new file mode 100644 index 00000000..ca0ce4f0 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js @@ -0,0 +1,183 @@ +/*! + * node-progress + * Copyright(c) 2011 TJ Holowaychuk + * MIT Licensed + */ + +/** + * Expose `ProgressBar`. + */ + +exports = module.exports = ProgressBar; + +/** + * Initialize a `ProgressBar` with the given + * `fmt` string and `options` or `total`. + * + * Options: + * + * - `total` total number of ticks to complete + * - `width` the displayed width of the progress bar defaulting to total + * - `stream` the output stream defaulting to stdout + * - `complete` completion character defaulting to "=" + * - `incomplete` incomplete character defaulting to "-" + * - `callback` optional function to call when the progress bar completes + * + * Tokens: + * + * - `:bar` the progress bar itself + * - `:current` current tick number + * - `:total` total ticks + * - `:elapsed` time elapsed in seconds + * - `:percent` completion percentage + * - `:eta` eta in seconds + * + * @param {String} fmt + * @param {Object|Number} options or total + * @api public + */ + +function ProgressBar(fmt, options) { + this.rl = require('readline').createInterface({ + input: process.stdin, + output: options.stream || process.stdout + }); + this.rl.setPrompt('', 0); + this.rl.clearLine = function() { + this.write(null, {ctrl: true, name: 'u'}); + }; + + if (typeof(options) == 'number') { + var total = options; + options = {}; + options.total = total; + } else { + options = options || {}; + if ('string' != typeof fmt) throw new Error('format required'); + if ('number' != typeof options.total) throw new Error('total required'); + } + + this.fmt = fmt; + this.curr = 0; + this.total = options.total; + this.width = options.width || this.total; + this.clear = options.clear + this.chars = { + complete: options.complete || '=' + , incomplete: options.incomplete || '-' + }; + this.callback = options.callback || function () {}; +} + +/** + * "tick" the progress bar with optional `len` and + * optional `tokens`. + * + * @param {Number|Object} len or tokens + * @param {Object} tokens + * @api public + */ + +ProgressBar.prototype.tick = function(len, tokens){ + if (len !== 0) + len = len || 1; + + // swap tokens + if ('object' == typeof len) tokens = len, len = 1; + + // start time for eta + if (0 == this.curr) this.start = new Date; + + this.curr += len + this.render(tokens); + + // progress complete + if (this.curr >= this.total) { + this.complete = true; + this.terminate(); + this.callback(this); + return; + } +}; + +/** + * Method to render the progress bar with optional `tokens` to + * place in the progress bar's `fmt` field. + * + * @param {Object} tokens + * @api public + */ + +ProgressBar.prototype.render = function(tokens){ + if(!process.stdout.isTTY) { + return; + } + + var ratio = this.curr / this.total; + ratio = Math.min(Math.max(ratio, 0), 1); + + var percent = ratio * 100 + , complete = Math.round(this.width * ratio) + , incomplete + , elapsed = new Date - this.start + , eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); + + complete = Array(complete).join(this.chars.complete); + incomplete = Array(this.width - complete.length).join(this.chars.incomplete); + + var str = this.fmt + .replace(':bar', complete + incomplete) + .replace(':current', this.curr) + .replace(':total', this.total) + .replace(':elapsed', isNaN(elapsed) ? "0.0" : (elapsed / 1000).toFixed(1)) + .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? "0.0" : (eta / 1000).toFixed(1)) + .replace(':percent', percent.toFixed(0) + '%'); + + if (tokens) { + for (var key in tokens) { + str = str.replace(':' + key, tokens[key]); + } + } + + this.rl.clearLine(); + this.rl.write(str); +}; + +/** + * "update" the progress bar to represent an exact percentage. + * The ratio (between 0 and 1) specified will be multiplied by `total` and + * floored, representing the closest available "tick." For example, if a + * progress bar has a length of 3 and `update(0.5)` is called, the progress + * will be set to 1. + * + * A ratio of 0.5 will attempt to set the progress to halfway. + * + * @param {Number} ratio The ratio (between 0 and 1 inclusive) to set the + * overall completion to. + * @api public + */ + +ProgressBar.prototype.update = function(ratio, tokens) { + var goal = Math.floor(ratio * this.total); + var delta = goal - this.curr; + + this.tick(delta, tokens); +}; + +/** + * Terminates a progress bar. + * + * @api public + */ + +ProgressBar.prototype.terminate = function() { + this.rl.resume(); + + if (this.clear) { + this.rl.clearLine(); + this.rl.close(); + } else { + this.rl.close(); + console.log(); + } +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/package.json new file mode 100644 index 00000000..c4744b51 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/package.json @@ -0,0 +1,34 @@ +{ + "name": "progress", + "version": "1.1.3", + "description": "Flexible ascii progress bar", + "keywords": [ + "cli", + "progress" + ], + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "dependencies": {}, + "main": "index", + "engines": { + "node": ">=0.4.0" + }, + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/node-progress" + }, + "readme": "# node-progress\n\n Flexible ascii progress bar\n\n## Installation\n\n npm install progress\n\n## Usage\n\n First we create a `ProgressBar`, giving it a format string\n as well as the `total`, telling the progress bar when it will\n be considered complete. After that all we need to do is `tick()` appropriately.\n\n```javascript\nvar ProgressBar = require('progress');\n\nvar bar = new ProgressBar(':bar', { total: 10 });\nvar timer = setInterval(function(){\n bar.tick();\n if (bar.complete) {\n console.log('\\ncomplete\\n');\n clearInterval(timer);\n }\n}, 100);\n```\n\n## Options:\n\n - `total` total number of ticks to complete\n - `width` the displayed width of the progress bar defaulting to total\n - `stream` the output stream defaulting to stdout\n - `complete` completion character defaulting to \"=\"\n - `incomplete` incomplete character defaulting to \"-\"\n - `clear` option to clear the bar on completion defaulting to false\n - `callback` optional function to call when the progress bar completes\n\n## Tokens:\n\n - `:bar` the progress bar itself\n - `:current` current tick number\n - `:total` total ticks\n - `:elapsed` time elapsed in seconds\n - `:percent` completion percentage\n - `:eta` estimated completion time in seconds\n\n## Examples\n\n### Download\n\n In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length.\n\n```javascript\nvar ProgressBar = require('../')\n , https = require('https');\n\nvar req = https.request({\n host: 'download.github.com'\n , port: 443\n , path: '/visionmedia-node-jscoverage-0d4608a.zip'\n});\n\nreq.on('response', function(res){\n var len = parseInt(res.headers['content-length'], 10);\n\n console.log();\n var bar = new ProgressBar(' downloading [:bar] :percent :etas', {\n complete: '='\n , incomplete: ' '\n , width: 20\n , total: len\n });\n\n res.on('data', function(chunk){\n bar.tick(chunk.length);\n });\n\n res.on('end', function(){\n console.log('\\n');\n });\n});\n\nreq.end();\n```\n\n The code above will generate a progress bar that looks like this:\n\n```\ndownloading [===== ] 29% 3.7s\n```\n\nYou can see more examples in the `examples` folder.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>`\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", + "readmeFilename": "Readme.md", + "bugs": { + "url": "https://github.com/visionmedia/node-progress/issues" + }, + "homepage": "https://github.com/visionmedia/node-progress", + "_id": "progress@1.1.3", + "dist": { + "shasum": "42f89c5fc3b6f0408a0bdd68993b174f96aababf" + }, + "_from": "progress@~1.1.0", + "_resolved": "https://registry.npmjs.org/progress/-/progress-1.1.3.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS new file mode 100644 index 00000000..247b7543 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS @@ -0,0 +1,6 @@ +# Authors sorted by whether or not they're me. +Isaac Z. Schlueter (http://blog.izs.me) +Wayne Larsen (http://github.com/wvl) +ritch +Marcel Laverdet +Yosef Dinerstein diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE new file mode 100644 index 00000000..05a40109 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md new file mode 100644 index 00000000..cd123b65 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md @@ -0,0 +1,30 @@ +`rm -rf` for node. + +Install with `npm install rimraf`, or just drop rimraf.js somewhere. + +## API + +`rimraf(f, callback)` + +The callback will be called with an error if there is one. Certain +errors are handled for you: + +* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of + `opts.maxBusyTries` times before giving up. +* `ENOENT` - If the file doesn't exist, rimraf will return + successfully, since your desired outcome is already the case. + +## rimraf.sync + +It can remove stuff synchronously, too. But that's not so good. Use +the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf ` which is useful for cross platform support. + +## mkdirp + +If you need to create a directory recursively, check out +[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js new file mode 100755 index 00000000..29bfa8a6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}); + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf ') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + process.exit(help ? 0 : 1) +} else { + args.forEach(function(arg) { + rimraf.sync(arg) + }) +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json new file mode 100644 index 00000000..211cc9dc --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json @@ -0,0 +1,60 @@ +{ + "name": "rimraf", + "version": "2.2.6", + "main": "rimraf.js", + "description": "A deep deletion module for node (like `rm -rf`)", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": { + "type": "MIT", + "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "test": "cd test && bash run.sh" + }, + "bin": { + "rimraf": "./bin.js" + }, + "contributors": [ + { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + { + "name": "Wayne Larsen", + "email": "wayne@larsen.st", + "url": "http://github.com/wvl" + }, + { + "name": "ritch", + "email": "skawful@gmail.com" + }, + { + "name": "Marcel Laverdet" + }, + { + "name": "Yosef Dinerstein", + "email": "yosefd@microsoft.com" + } + ], + "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf ` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" + }, + "homepage": "https://github.com/isaacs/rimraf", + "_id": "rimraf@2.2.6", + "dist": { + "shasum": "7ada6a6d39b2301af3c8fe7b936c2e46e7c4463d" + }, + "_from": "rimraf@~2.2.6", + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js new file mode 100644 index 00000000..ce62051f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js @@ -0,0 +1,178 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var path = require("path") +var fs = require("fs") + +// for EMFILE handling +var timeout = 0 +exports.EMFILE_MAX = 1000 +exports.BUSYTRIES_MAX = 3 + +var isWindows = (process.platform === "win32") + +function rimraf (p, cb) { + if (!cb) throw new Error("No callback passed to rimraf()") + + var busyTries = 0 + rimraf_(p, function CB (er) { + if (er) { + if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && + busyTries < exports.BUSYTRIES_MAX) { + busyTries ++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, CB) + }, time) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { + return setTimeout(function () { + rimraf_(p, CB) + }, timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + cb(er) + }) +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, cb) { + fs.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) + if (er.code === "EISDIR") + return rmdir(p, er, cb) + } + return cb(er) + }) +} + +function fixWinEPERM (p, er, cb) { + fs.chmod(p, 666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + fs.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, er, cb) + else + fs.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, er, cb) { + try { + fs.chmodSync(p, 666) + } catch (er2) { + if (er2.code !== "ENOENT") + throw er + } + + try { + var stats = fs.statSync(p) + } catch (er3) { + if (er3 !== "ENOENT") + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, er) + else + fs.unlinkSync(p) +} + +function rmdir (p, originalEr, cb) { + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + fs.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, cb) { + fs.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return fs.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + fs.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p) { + try { + fs.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) + if (er.code !== "EISDIR") + throw er + rmdirSync(p, er) + } +} + +function rmdirSync (p, originalEr) { + try { + fs.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p) + } +} + +function rmkidsSync (p) { + fs.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f)) + }) + fs.rmdirSync(p) +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh new file mode 100644 index 00000000..598f0163 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e +for i in test-*.js; do + echo -n $i ... + bash setup.sh + node $i + ! [ -d target ] + echo "pass" +done +rm -rf target diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh new file mode 100644 index 00000000..2602e631 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -e + +files=10 +folders=2 +depth=4 +target="$PWD/target" + +rm -rf target + +fill () { + local depth=$1 + local files=$2 + local folders=$3 + local target=$4 + + if ! [ -d $target ]; then + mkdir -p $target + fi + + local f + + f=$files + while [ $f -gt 0 ]; do + touch "$target/f-$depth-$f" + let f-- + done + + let depth-- + + if [ $depth -le 0 ]; then + return 0 + fi + + f=$folders + while [ $f -gt 0 ]; do + mkdir "$target/folder-$depth-$f" + fill $depth $files $folders "$target/d-$depth-$f" + let f-- + done +} + +fill $depth $files $folders $target + +# sanity assert +[ -d $target ] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js new file mode 100644 index 00000000..9c2e0b7b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js @@ -0,0 +1,5 @@ +var rimraf = require("../rimraf") + , path = require("path") +rimraf(path.join(__dirname, "target"), function (er) { + if (er) throw er +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js new file mode 100644 index 00000000..eb71f104 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js @@ -0,0 +1,3 @@ +var rimraf = require("../rimraf") + , path = require("path") +rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/LICENSE new file mode 100644 index 00000000..05a40109 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/LICENSE @@ -0,0 +1,23 @@ +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/README.md new file mode 100644 index 00000000..ff1eb531 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/README.md @@ -0,0 +1,5 @@ +The "which" util from npm's guts. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/bin/which new file mode 100755 index 00000000..8432ce2f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/bin/which @@ -0,0 +1,14 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) { + console.error("Usage: which ") + process.exit(1) +} + +which(process.argv[2], function (er, thing) { + if (er) { + console.error(er.message) + process.exit(er.errno || 127) + } + console.log(thing) +}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/package.json new file mode 100644 index 00000000..f1938b07 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/package.json @@ -0,0 +1,35 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "which", + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "version": "1.0.5", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "main": "which.js", + "bin": { + "which": "./bin/which" + }, + "engines": { + "node": "*" + }, + "dependencies": {}, + "devDependencies": {}, + "readme": "The \"which\" util from npm's guts.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "homepage": "https://github.com/isaacs/node-which", + "_id": "which@1.0.5", + "dist": { + "shasum": "195619a6ad7e8fefd0aa76445a6d4c8d370a322c" + }, + "_from": "which@~1.0.5", + "_resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/which.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/which.js new file mode 100644 index 00000000..db7e8f74 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/which.js @@ -0,0 +1,104 @@ +module.exports = which +which.sync = whichSync + +var path = require("path") + , fs + , COLON = process.platform === "win32" ? ";" : ":" + , isExe + +try { + fs = require("graceful-fs") +} catch (ex) { + fs = require("fs") +} + +if (process.platform == "win32") { + // On windows, there is no good way to check that a file is executable + isExe = function isExe () { return true } +} else { + isExe = function isExe (mod, uid, gid) { + //console.error(mod, uid, gid); + //console.error("isExe?", (mod & 0111).toString(8)) + var ret = (mod & 0001) + || (mod & 0010) && process.getgid && gid === process.getgid() + || (mod & 0100) && process.getuid && uid === process.getuid() + //console.error("isExe?", ret) + return ret + } +} + + + +function which (cmd, cb) { + if (isAbsolute(cmd)) return cb(null, cmd) + var pathEnv = (process.env.PATH || "").split(COLON) + , pathExt = [""] + if (process.platform === "win32") { + pathEnv.push(process.cwd()) + pathExt = (process.env.PATHEXT || ".EXE").split(COLON) + if (cmd.indexOf(".") !== -1) pathExt.unshift("") + } + //console.error("pathEnv", pathEnv) + ;(function F (i, l) { + if (i === l) return cb(new Error("not found: "+cmd)) + var p = path.resolve(pathEnv[i], cmd) + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + //console.error(p + ext) + fs.stat(p + ext, function (er, stat) { + if (!er && + stat && + stat.isFile() && + isExe(stat.mode, stat.uid, stat.gid)) { + //console.error("yes, exe!", p + ext) + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd) { + if (isAbsolute(cmd)) return cmd + var pathEnv = (process.env.PATH || "").split(COLON) + , pathExt = [""] + if (process.platform === "win32") { + pathEnv.push(process.cwd()) + pathExt = (process.env.PATHEXT || ".EXE").split(COLON) + if (cmd.indexOf(".") !== -1) pathExt.unshift("") + } + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var p = path.join(pathEnv[i], cmd) + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var stat + try { stat = fs.statSync(cur) } catch (ex) {} + if (stat && + stat.isFile() && + isExe(stat.mode, stat.uid, stat.gid)) return cur + } + } + throw new Error("not found: "+cmd) +} + +var isAbsolute = process.platform === "win32" ? absWin : absUnix + +function absWin (p) { + if (absUnix(p)) return true + // pull off the device/UNC bit from a windows path. + // from node's lib/path.js + var splitDeviceRe = + /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ + , result = splitDeviceRe.exec(p) + , device = result[1] || '' + , isUnc = device && device.charAt(1) !== ':' + , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute + + return isAbsolute +} + +function absUnix (p) { + return p.charAt(0) === "/" || p === "" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/package.json new file mode 100644 index 00000000..66d4488e --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/package.json @@ -0,0 +1,54 @@ +{ + "name": "bin-wrapper", + "version": "0.1.9", + "description": "Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies", + "keywords": [ + "bin", + "build", + "make", + "wrapper" + ], + "homepage": "https://github.com/kevva/bin-wrapper", + "bugs": { + "url": "https://github.com/kevva/bin-wrapper/issues" + }, + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "http://kevinmartensson.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/kevva/bin-wrapper.git" + }, + "scripts": { + "test": "mocha --reporter list --timeout 0" + }, + "main": "bin-wrapper.js", + "files": [ + "bin-wrapper.js" + ], + "dependencies": { + "download": "~0.1.2", + "isbin": "0.0.2", + "mout": "~0.6.0", + "progress": "~1.1.0", + "rimraf": "~2.2.6", + "which": "~1.0.5" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "readme": "# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper)\n\nBinary wrapper for Node.js that makes your programs seamlessly available as local dependencies\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper`\n\n## Examples\n\nAll `platform` and `arch` specific options takes precedence over the base \noptions. See [test.js](test.js) for a full fleshed example.\n\n```js\nvar Bin = require('bin-wrapper');\n\nvar opts = {\n name: 'Gifsicle',\n bin: 'gifsicle',\n path: 'vendor',\n url: 'http://url/to/gifsicle',\n src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz',\n buildScript: './configure --bindir=\"vendor\" && make install',\n platform: {\n win32: {\n bin: 'gifsicle.exe',\n url: [\n 'http://url/to/gifsicle.exe'\n 'http://url/to/gifsicle.dll'\n ]\n }\n }\n}\nvar bin = new Bin(opts);\n\nbin.check('--version', function (works) {\n if (!works) {\n console.log('Pre-build test failed, compiling from source');\n return bin.build();\n }\n\n console.log('Binary passed the test');\n});\n```\n\nGet the path to your binary with `bin.path`.\n\n```js\nconsole.log(bin.path);\n// => path/to/vendor/gifsicle\n```\n\n## API\n\n### .check(cmd, cb)\n\nCheck if a binary is present and working. If it isn't, download and test it by \nrunning the binary with `cmd` and see if it exits correctly.\n\n### .build(cb)\n\nDownload the source archive defined in the `src` property and build it using the \nbuild script defined in the `buildScript` property.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", + "readmeFilename": "README.md", + "_id": "bin-wrapper@0.1.9", + "dist": { + "shasum": "237ee496fb6049caedaba51ad9e62fc199a86060" + }, + "_from": "bin-wrapper@~0.1.3", + "_resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-0.1.9.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/chalk.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/chalk.js new file mode 100644 index 00000000..17c6dbab --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/chalk.js @@ -0,0 +1,62 @@ +'use strict'; +var ansi = require('ansi-styles'); +var defineProps = Object.defineProperties; + +ansi.grey = ansi.gray; + +var styles = (function () { + var ret = {}; + + Object.keys(ansi).forEach(function (key) { + ret[key] = { + get: function () { + this._styles.push(key); + return this; + } + }; + }); + + return ret; +})(); + +var chalk = module.exports = defineProps({}, init()); + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + var obj = defineProps(function self(str) { + if (!chalk.enabled) { + return str; + } + + return self._styles.reduce(function (str, name) { + var code = ansi[name]; + return code[0] + (str || '') + code[1]; + }, str); + }, styles); + + obj._styles = []; + + return obj[name]; + } + } + }); + + return ret; +} + +chalk.styles = ansi; + +chalk.stripColor = function (str) { + return str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''); +}; + +chalk.supportsColor = require('has-color'); + +// detect mode if not set manually +if (chalk.enabled === undefined) { + chalk.enabled = chalk.supportsColor; +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js new file mode 100644 index 00000000..56a5d19b --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js @@ -0,0 +1,29 @@ +'use strict'; +module.exports = { + reset: ['\x1b[0m', '\x1b[0m'], + + bold: ['\x1b[1m', '\x1b[22m'], + italic: ['\x1b[3m', '\x1b[23m'], + underline: ['\x1b[4m', '\x1b[24m'], + inverse: ['\x1b[7m', '\x1b[27m'], + strikethrough: ['\x1b[9m', '\x1b[29m'], + + black: ['\x1b[30m', '\x1b[39m'], + red: ['\x1b[31m', '\x1b[39m'], + green: ['\x1b[32m', '\x1b[39m'], + yellow: ['\x1b[33m', '\x1b[39m'], + blue: ['\x1b[34m', '\x1b[39m'], + magenta: ['\x1b[35m', '\x1b[39m'], + cyan: ['\x1b[36m', '\x1b[39m'], + white: ['\x1b[37m', '\x1b[39m'], + gray: ['\x1B[90m', '\x1b[39m'], + + bgBlack: ['\x1b[40m', '\x1b[49m'], + bgRed: ['\x1b[41m', '\x1b[49m'], + bgGreen: ['\x1b[42m', '\x1b[49m'], + bgYellow: ['\x1b[43m', '\x1b[49m'], + bgBlue: ['\x1b[44m', '\x1b[49m'], + bgMagenta: ['\x1b[45m', '\x1b[49m'], + bgCyan: ['\x1b[46m', '\x1b[49m'], + bgWhite: ['\x1b[47m', '\x1b[49m'] +}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..8acdb5e6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/package.json @@ -0,0 +1,62 @@ +{ + "name": "ansi-styles", + "version": "0.2.0", + "description": "ANSI escape codes for colorizing strings in the terminal", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "homepage": "https://github.com/sindresorhus/ansi-styles", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-styles/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "ansi-styles.js" + ], + "main": "ansi-styles", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> ANSI escape codes for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green[0] + 'Hello world!' + ansi.green[1]);\n```\n\n## API\n\nEach style is an array of a start and end escape code.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "_id": "ansi-styles@0.2.0", + "dist": { + "shasum": "359ab4b15dcd64ba6d74734b72c36360a9af2c19" + }, + "_from": "ansi-styles@~0.2.0", + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..646837c6 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/readme.md @@ -0,0 +1,65 @@ +# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) + +> ANSI escape codes for colorizing strings in the terminal. + +You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. + +![screenshot](screenshot.png) + + +## Install + +Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` + + +## Example + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green[0] + 'Hello world!' + ansi.green[1]); +``` + +## API + +Each style is an array of a start and end escape code. + + +## Styles + +### General + +- reset +- bold +- italic +- underline +- inverse +- strikethrough + +### Text colors + +- black +- red +- green +- yellow +- blue +- magenta +- cyan +- white +- gray + +### Background colors + +- bgBlack +- bgRed +- bgGreen +- bgYellow +- bgBlue +- bgMagenta +- bgCyan +- bgWhite + + +## License + +MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/has-color.js new file mode 100644 index 00000000..27316b1f --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/has-color.js @@ -0,0 +1,24 @@ +'use strict'; +module.exports = (function () { + if (process.argv.indexOf('--no-color') !== -1) { + return false; + } + + if (process.argv.indexOf('--color') !== -1) { + return true; + } + + if (!process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); +})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/package.json new file mode 100644 index 00000000..d60b2d0a --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/package.json @@ -0,0 +1,59 @@ +{ + "name": "has-color", + "version": "0.1.4", + "description": "Detect whether a terminal supports color", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "capability", + "detect" + ], + "homepage": "https://github.com/sindresorhus/has-color", + "bugs": { + "url": "https://github.com/sindresorhus/has-color/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "has-color.js" + ], + "main": "has-color", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/has-color.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "_id": "has-color@0.1.4", + "dist": { + "shasum": "d1dadeea5b9e8b446bf08603532333710c95a290" + }, + "_from": "has-color@~0.1.0", + "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.4.tgz" +} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/readme.md new file mode 100644 index 00000000..0918c851 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/readme.md @@ -0,0 +1,28 @@ +# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) + +> Detect whether a terminal supports color. + +Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). + + +## Install + +Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` + + +## Example + +```js +var hasColor = require('has-color'); + +if (hasColor) { + console.log('Terminal supports color.'); +} +``` + +It obeys the CLI flags `--color` and `--no-color`. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/package.json new file mode 100644 index 00000000..46a63f05 --- /dev/null +++ b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/package.json @@ -0,0 +1,65 @@ +{ + "name": "chalk", + "version": "0.2.1", + "description": "Terminal string styling done right", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "ansi", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "homepage": "https://github.com/sindresorhus/chalk", + "bugs": { + "url": "https://github.com/sindresorhus/chalk/issues" + }, + "license": "MIT", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "files": [ + "chalk.js" + ], + "main": "chalk", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/chalk.git" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "has-color": "~0.1.0", + "ansi-styles": "~0.2.0" + }, + "devDependencies": { + "mocha": "~1.12.0" + }, + "engines": { + "node": ">=0.8.0" + }, + "readme": "# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n> Terminal string styling done right.\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log(chalk.blue('Hello world!'));\n\n// combine styled and normal strings\nconsole.log(chalk.blue('Hello') + 'World' + chalk.red('!'));\n\n// compose multiple styles using the chainable API\nconsole.log(chalk.blue.bgRed.bold('Hello world!'));\n\n// nest styles\nchalk.red('Hello' + chalk.underline.bgBlue('world') + '!');\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.\\