diff --git a/server/assets/assets_gen.go b/server/assets/assets_gen.go index 245774a..0f04c21 100644 --- a/server/assets/assets_gen.go +++ b/server/assets/assets_gen.go @@ -60,7 +60,7 @@ var Bytes = map[string]*EmbeddedAsset{ 0x66,0x6f,0x72,0x6d,0x3e,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x7b,0x7b,0x20,0x65,0x6e,0x64,0x20,0x7d,0x7d,0x0a, }}, "pages/home.tmpl": &EmbeddedAsset{ - ModTime: time.Unix(1585083572, 0), + ModTime: time.Unix(1585184231, 0), Bytes: []byte{ 0x7b,0x7b,0x20,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x22,0x75,0x73,0x65,0x72,0x22,0x20,0x7d,0x7d,0x0a,0x3c,0x64,0x69,0x76, 0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x70,0x61,0x64,0x64,0x65,0x64,0x20,0x62,0x6f,0x78,0x22,0x3e,0x0a,0x20,0x20,0x20, @@ -276,108 +276,111 @@ var Bytes = map[string]*EmbeddedAsset{ 0x72,0x65,0x6e,0x63,0x65,0x73,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x72,0x61,0x6e,0x67, 0x65,0x20,0x24,0x70,0x72,0x65,0x66,0x20,0x3a,0x3d,0x20,0x2e,0x54,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x50,0x72,0x65, 0x66,0x65,0x72,0x65,0x6e,0x63,0x65,0x73,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x3c,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x66,0x6f, -0x72,0x6d,0x20,0x69,0x64,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x7b,0x7b, -0x20,0x24,0x70,0x72,0x65,0x66,0x2e,0x43,0x6c,0x69,0x65,0x6e,0x74,0x20,0x7d,0x7d,0x22,0x20,0x61,0x63,0x74,0x69,0x6f,0x6e, -0x3d,0x22,0x7b,0x7b,0x20,0x70,0x72,0x69,0x6e,0x74,0x66,0x20,0x22,0x2f,0x61,0x64,0x6d,0x69,0x6e,0x2f,0x64,0x65,0x6c,0x65, -0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x5f,0x70,0x72,0x65,0x66,0x5f,0x64,0x6f,0x3f,0x63,0x6c,0x69, -0x65,0x6e,0x74,0x3d,0x25,0x73,0x22,0x20,0x24,0x70,0x72,0x65,0x66,0x2e,0x43,0x6c,0x69,0x65,0x6e,0x74,0x20,0x7c,0x20,0x70, -0x61,0x74,0x68,0x20,0x7d,0x7d,0x22,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64,0x3d,0x22,0x70,0x6f,0x73,0x74,0x22,0x3e,0x3c,0x2f, -0x66,0x6f,0x72,0x6d,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, -0x64,0x3e,0x7b,0x7b,0x20,0x24,0x70,0x72,0x65,0x66,0x2e,0x43,0x6c,0x69,0x65,0x6e,0x74,0x20,0x7d,0x7d,0x3c,0x2f,0x74,0x64, -0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x7b,0x7b, -0x20,0x24,0x70,0x72,0x65,0x66,0x2e,0x50,0x72,0x6f,0x66,0x69,0x6c,0x65,0x20,0x7d,0x7d,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x69,0x6e,0x70,0x75, -0x74,0x20,0x66,0x6f,0x72,0x6d,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x7b, -0x7b,0x20,0x24,0x70,0x72,0x65,0x66,0x2e,0x43,0x6c,0x69,0x65,0x6e,0x74,0x20,0x7d,0x7d,0x22,0x20,0x74,0x79,0x70,0x65,0x3d, -0x22,0x73,0x75,0x62,0x6d,0x69,0x74,0x22,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22,0x64,0x65,0x6c,0x65,0x74,0x65,0x22,0x3e, -0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x72,0x3e,0x0a, +0x3c,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20, +0x24,0x66,0x6f,0x72,0x6d,0x53,0x75,0x66,0x66,0x69,0x78,0x20,0x3a,0x3d,0x20,0x6b,0x65,0x62,0x61,0x62,0x63,0x61,0x73,0x65, +0x20,0x24,0x70,0x72,0x65,0x66,0x2e,0x43,0x6c,0x69,0x65,0x6e,0x74,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x66,0x6f,0x72,0x6d,0x20,0x69,0x64,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73, +0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x7b,0x7b,0x20,0x24,0x66,0x6f,0x72,0x6d,0x53,0x75,0x66,0x66,0x69,0x78, +0x20,0x7d,0x7d,0x22,0x20,0x61,0x63,0x74,0x69,0x6f,0x6e,0x3d,0x22,0x7b,0x7b,0x20,0x70,0x72,0x69,0x6e,0x74,0x66,0x20,0x22, +0x2f,0x61,0x64,0x6d,0x69,0x6e,0x2f,0x64,0x65,0x6c,0x65,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x5f, +0x70,0x72,0x65,0x66,0x5f,0x64,0x6f,0x3f,0x63,0x6c,0x69,0x65,0x6e,0x74,0x3d,0x25,0x73,0x22,0x20,0x24,0x70,0x72,0x65,0x66, +0x2e,0x43,0x6c,0x69,0x65,0x6e,0x74,0x20,0x7c,0x20,0x70,0x61,0x74,0x68,0x20,0x7d,0x7d,0x22,0x20,0x6d,0x65,0x74,0x68,0x6f, +0x64,0x3d,0x22,0x70,0x6f,0x73,0x74,0x22,0x3e,0x3c,0x2f,0x66,0x6f,0x72,0x6d,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x7b,0x7b,0x20,0x24,0x70,0x72,0x65,0x66,0x2e,0x43,0x6c, +0x69,0x65,0x6e,0x74,0x20,0x7d,0x7d,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x7b,0x7b,0x20,0x24,0x70,0x72,0x65,0x66,0x2e,0x50,0x72,0x6f,0x66,0x69,0x6c, +0x65,0x20,0x7d,0x7d,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x66,0x6f,0x72,0x6d,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73, +0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x7b,0x7b,0x20,0x24,0x66,0x6f,0x72,0x6d,0x53,0x75,0x66,0x66,0x69,0x78, +0x20,0x7d,0x7d,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x73,0x75,0x62,0x6d,0x69,0x74,0x22,0x20,0x76,0x61,0x6c,0x75,0x65, +0x3d,0x22,0x64,0x65,0x6c,0x65,0x74,0x65,0x22,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x65,0x6e,0x64, +0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x3c,0x66,0x6f,0x72,0x6d,0x20,0x69,0x64,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65, +0x2d,0x70,0x72,0x65,0x66,0x2d,0x61,0x64,0x64,0x22,0x20,0x61,0x63,0x74,0x69,0x6f,0x6e,0x3d,0x22,0x7b,0x7b,0x20,0x70,0x61, +0x74,0x68,0x20,0x22,0x2f,0x61,0x64,0x6d,0x69,0x6e,0x2f,0x63,0x72,0x65,0x61,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x63, +0x6f,0x64,0x65,0x5f,0x70,0x72,0x65,0x66,0x5f,0x64,0x6f,0x22,0x20,0x7d,0x7d,0x22,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64,0x3d, +0x22,0x70,0x6f,0x73,0x74,0x22,0x3e,0x3c,0x2f,0x66,0x6f,0x72,0x6d,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x66,0x6f,0x72,0x6d,0x3d,0x22,0x74,0x72,0x61,0x6e, +0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x61,0x64,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x74,0x65, +0x78,0x74,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x63,0x6c,0x69,0x65,0x6e,0x74,0x22,0x20,0x70,0x6c,0x61,0x63,0x65,0x68, +0x6f,0x6c,0x64,0x65,0x72,0x3d,0x22,0x63,0x6c,0x69,0x65,0x6e,0x74,0x20,0x6e,0x61,0x6d,0x65,0x22,0x3e,0x3c,0x2f,0x74,0x64, +0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x73,0x65,0x6c,0x65,0x63, +0x74,0x20,0x66,0x6f,0x72,0x6d,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x61, +0x64,0x64,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x70,0x72,0x6f,0x66,0x69,0x6c,0x65,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x72,0x61,0x6e,0x67,0x65,0x20,0x24,0x70,0x72, +0x6f,0x66,0x69,0x6c,0x65,0x20,0x3a,0x3d,0x20,0x2e,0x54,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x50,0x72,0x6f,0x66,0x69, +0x6c,0x65,0x73,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x3c,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22,0x7b,0x7b,0x20,0x24,0x70,0x72, +0x6f,0x66,0x69,0x6c,0x65,0x20,0x7d,0x7d,0x22,0x3e,0x7b,0x7b,0x20,0x24,0x70,0x72,0x6f,0x66,0x69,0x6c,0x65,0x20,0x7d,0x7d, +0x3c,0x2f,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x7b,0x7b,0x20,0x65,0x6e,0x64,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x3c,0x2f,0x73,0x65,0x6c,0x65,0x63,0x74,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x66,0x6f,0x72,0x6d,0x3d,0x22,0x74,0x72,0x61,0x6e, +0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x61,0x64,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x73,0x75, +0x62,0x6d,0x69,0x74,0x22,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22,0x73,0x61,0x76,0x65,0x22,0x3e,0x3c,0x2f,0x74,0x64,0x3e, +0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c, +0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0a,0x20,0x20,0x20,0x20,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x3c,0x2f,0x64,0x69,0x76, +0x3e,0x0a,0x3c,0x64,0x69,0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x70,0x61,0x64,0x64,0x65,0x64,0x20,0x62,0x6f,0x78, +0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x3c,0x64,0x69,0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x62,0x6f,0x78,0x2d,0x74, +0x69,0x74,0x6c,0x65,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x69,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x6d,0x64,0x69,0x20,0x6d,0x64,0x69,0x2d,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x6d,0x75,0x73,0x69,0x63,0x22, +0x3e,0x3c,0x2f,0x69,0x3e,0x20,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x73,0x0a,0x20,0x20,0x20,0x20,0x3c,0x2f,0x64,0x69, +0x76,0x3e,0x0a,0x20,0x20,0x20,0x20,0x3c,0x64,0x69,0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x62,0x6c,0x6f,0x63,0x6b, +0x2d,0x72,0x69,0x67,0x68,0x74,0x20,0x74,0x65,0x78,0x74,0x2d,0x72,0x69,0x67,0x68,0x74,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x69,0x66,0x20,0x65,0x71,0x20,0x28,0x6c,0x65,0x6e,0x20,0x2e,0x50,0x6c,0x61,0x79,0x6c, +0x69,0x73,0x74,0x73,0x29,0x20,0x30,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c, +0x73,0x70,0x61,0x6e,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x6c,0x69,0x67,0x68,0x74,0x22,0x3e, +0x6e,0x6f,0x20,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x73,0x20,0x79,0x65,0x74,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x0a, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x65,0x6e,0x64,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x3c,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x66,0x6f,0x72,0x6d, -0x20,0x69,0x64,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x61,0x64,0x64,0x22, -0x20,0x61,0x63,0x74,0x69,0x6f,0x6e,0x3d,0x22,0x7b,0x7b,0x20,0x70,0x61,0x74,0x68,0x20,0x22,0x2f,0x61,0x64,0x6d,0x69,0x6e, -0x2f,0x63,0x72,0x65,0x61,0x74,0x65,0x5f,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x5f,0x70,0x72,0x65,0x66,0x5f,0x64, -0x6f,0x22,0x20,0x7d,0x7d,0x22,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64,0x3d,0x22,0x70,0x6f,0x73,0x74,0x22,0x3e,0x3c,0x2f,0x66, -0x6f,0x72,0x6d,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x69,0x6e, -0x70,0x75,0x74,0x20,0x66,0x6f,0x72,0x6d,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66, -0x2d,0x61,0x64,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x74,0x65,0x78,0x74,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22, -0x63,0x6c,0x69,0x65,0x6e,0x74,0x22,0x20,0x70,0x6c,0x61,0x63,0x65,0x68,0x6f,0x6c,0x64,0x65,0x72,0x3d,0x22,0x63,0x6c,0x69, -0x65,0x6e,0x74,0x20,0x6e,0x61,0x6d,0x65,0x22,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x73,0x65,0x6c,0x65,0x63,0x74,0x20,0x66,0x6f,0x72,0x6d,0x3d,0x22,0x74,0x72, -0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66,0x2d,0x61,0x64,0x64,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22, -0x70,0x72,0x6f,0x66,0x69,0x6c,0x65,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x7b,0x7b,0x20,0x72,0x61,0x6e,0x67,0x65,0x20,0x24,0x70,0x72,0x6f,0x66,0x69,0x6c,0x65,0x20,0x3a,0x3d,0x20,0x2e, -0x54,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x50,0x72,0x6f,0x66,0x69,0x6c,0x65,0x73,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x6f,0x70,0x74,0x69,0x6f,0x6e, -0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22,0x7b,0x7b,0x20,0x24,0x70,0x72,0x6f,0x66,0x69,0x6c,0x65,0x20,0x7d,0x7d,0x22,0x3e, -0x7b,0x7b,0x20,0x24,0x70,0x72,0x6f,0x66,0x69,0x6c,0x65,0x20,0x7d,0x7d,0x3c,0x2f,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x3e,0x0a, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x65,0x6e,0x64,0x20,0x7d, -0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x73,0x65,0x6c,0x65,0x63,0x74,0x3e,0x3c, -0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x69,0x6e, -0x70,0x75,0x74,0x20,0x66,0x6f,0x72,0x6d,0x3d,0x22,0x74,0x72,0x61,0x6e,0x73,0x63,0x6f,0x64,0x65,0x2d,0x70,0x72,0x65,0x66, -0x2d,0x61,0x64,0x64,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x73,0x75,0x62,0x6d,0x69,0x74,0x22,0x20,0x76,0x61,0x6c,0x75, -0x65,0x3d,0x22,0x73,0x61,0x76,0x65,0x22,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c, -0x2f,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0a,0x20,0x20, -0x20,0x20,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x3c,0x64,0x69,0x76,0x20,0x63,0x6c,0x61, -0x73,0x73,0x3d,0x22,0x70,0x61,0x64,0x64,0x65,0x64,0x20,0x62,0x6f,0x78,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x3c,0x64,0x69, -0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x62,0x6f,0x78,0x2d,0x74,0x69,0x74,0x6c,0x65,0x22,0x3e,0x0a,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x3c,0x69,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x6d,0x64,0x69,0x20,0x6d,0x64,0x69,0x2d,0x70, -0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x6d,0x75,0x73,0x69,0x63,0x22,0x3e,0x3c,0x2f,0x69,0x3e,0x20,0x70,0x6c,0x61,0x79, -0x6c,0x69,0x73,0x74,0x73,0x0a,0x20,0x20,0x20,0x20,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x20,0x20,0x20,0x20,0x3c,0x64,0x69, -0x76,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x62,0x6c,0x6f,0x63,0x6b,0x2d,0x72,0x69,0x67,0x68,0x74,0x20,0x74,0x65,0x78, -0x74,0x2d,0x72,0x69,0x67,0x68,0x74,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x69,0x66,0x20, -0x65,0x71,0x20,0x28,0x6c,0x65,0x6e,0x20,0x2e,0x50,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x73,0x29,0x20,0x30,0x20,0x7d,0x7d, -0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x73,0x70,0x61,0x6e,0x20,0x63,0x6c,0x61,0x73,0x73, -0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x6c,0x69,0x67,0x68,0x74,0x22,0x3e,0x6e,0x6f,0x20,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73, -0x74,0x73,0x20,0x79,0x65,0x74,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b, -0x20,0x65,0x6e,0x64,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x69, -0x64,0x3d,0x22,0x72,0x65,0x63,0x65,0x6e,0x74,0x2d,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x73,0x22,0x3e,0x0a,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x72,0x61,0x6e,0x67,0x65,0x20,0x24,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74, -0x20,0x3a,0x3d,0x20,0x2e,0x50,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x73,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c, -0x74,0x64,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x72,0x69,0x67,0x68,0x74,0x22,0x3e,0x7b,0x7b, -0x20,0x24,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2e,0x4e,0x61,0x6d,0x65,0x20,0x7d,0x7d,0x3c,0x2f,0x74,0x64,0x3e,0x0a, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x63,0x6c, -0x61,0x73,0x73,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x6c,0x69,0x67,0x68,0x74,0x22,0x3e,0x28,0x7b,0x7b,0x20,0x24,0x70,0x6c, -0x61,0x79,0x6c,0x69,0x73,0x74,0x2e,0x54,0x72,0x61,0x63,0x6b,0x43,0x6f,0x75,0x6e,0x74,0x20,0x7d,0x7d,0x20,0x74,0x72,0x61, -0x63,0x6b,0x73,0x29,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x6e,0x6f,0x2d,0x73,0x6d,0x61,0x6c,0x6c, -0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x6c,0x69,0x67,0x68, -0x74,0x22,0x20,0x74,0x69,0x74,0x6c,0x65,0x3d,0x22,0x7b,0x7b,0x20,0x24,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2e,0x43, -0x72,0x65,0x61,0x74,0x65,0x64,0x41,0x74,0x20,0x7d,0x7d,0x22,0x3e,0x7b,0x7b,0x20,0x24,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73, -0x74,0x2e,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x41,0x74,0x20,0x7c,0x20,0x64,0x61,0x74,0x65,0x48,0x75,0x6d,0x61,0x6e,0x20, -0x7d,0x7d,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x3c,0x2f,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x65,0x6e,0x64,0x20, -0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x61,0x62,0x6c,0x65,0x3e,0x0a,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x3c,0x66,0x6f,0x72,0x6d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x64, -0x3d,0x22,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x75,0x70,0x6c,0x6f,0x61,0x64,0x2d,0x66,0x6f,0x72,0x6d,0x22,0x0a, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e,0x63,0x74,0x79,0x70,0x65,0x3d,0x22,0x6d,0x75,0x6c, -0x74,0x69,0x70,0x61,0x72,0x74,0x2f,0x66,0x6f,0x72,0x6d,0x2d,0x64,0x61,0x74,0x61,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x6f,0x6e,0x3d,0x22,0x7b,0x7b,0x20,0x70,0x61,0x74,0x68,0x20,0x22,0x2f, -0x61,0x64,0x6d,0x69,0x6e,0x2f,0x75,0x70,0x6c,0x6f,0x61,0x64,0x5f,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x5f,0x64,0x6f, -0x22,0x20,0x7d,0x7d,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64, -0x3d,0x22,0x70,0x6f,0x73,0x74,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x64,0x69,0x76,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x6f,0x73,0x69,0x74,0x69, -0x6f,0x6e,0x3a,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x3b,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x69,0x64,0x3d,0x22,0x70,0x6c,0x61,0x79,0x6c, -0x69,0x73,0x74,0x2d,0x75,0x70,0x6c,0x6f,0x61,0x64,0x2d,0x69,0x6e,0x70,0x75,0x74,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d, -0x22,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x61,0x62,0x73,0x6f,0x6c,0x75,0x74,0x65,0x3b,0x20,0x6f,0x70,0x61, -0x63,0x69,0x74,0x79,0x3a,0x20,0x30,0x3b,0x22,0x20,0x6e,0x61,0x6d,0x65,0x3d,0x22,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74, -0x2d,0x66,0x69,0x6c,0x65,0x73,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x66,0x69,0x6c,0x65,0x22,0x20,0x6d,0x75,0x6c,0x74, -0x69,0x70,0x6c,0x65,0x20,0x2f,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x62,0x75,0x74,0x74,0x6f,0x6e,0x22,0x20,0x76,0x61,0x6c, -0x75,0x65,0x3d,0x22,0x75,0x70,0x6c,0x6f,0x61,0x64,0x20,0x6d,0x33,0x75,0x38,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x66, -0x6f,0x72,0x6d,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x73,0x63,0x72,0x69,0x70,0x74,0x3e,0x0a,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x2e,0x67,0x65,0x74,0x45,0x6c, -0x65,0x6d,0x65,0x6e,0x74,0x42,0x79,0x49,0x64,0x28,0x22,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x75,0x70,0x6c,0x6f, -0x61,0x64,0x2d,0x69,0x6e,0x70,0x75,0x74,0x22,0x29,0x2e,0x6f,0x6e,0x63,0x68,0x61,0x6e,0x67,0x65,0x20,0x3d,0x20,0x28,0x65, -0x29,0x20,0x3d,0x3e,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64, -0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x2e,0x67,0x65,0x74,0x45,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x42,0x79,0x49,0x64,0x28,0x22, -0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x75,0x70,0x6c,0x6f,0x61,0x64,0x2d,0x66,0x6f,0x72,0x6d,0x22,0x29,0x2e,0x73, -0x75,0x62,0x6d,0x69,0x74,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x73,0x63,0x72,0x69,0x70,0x74,0x3e,0x0a,0x20,0x20,0x20,0x20,0x3c,0x2f,0x64, -0x69,0x76,0x3e,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x7b,0x7b,0x20,0x65,0x6e,0x64,0x20,0x7d,0x7d,0x0a, +0x20,0x20,0x3c,0x74,0x61,0x62,0x6c,0x65,0x20,0x69,0x64,0x3d,0x22,0x72,0x65,0x63,0x65,0x6e,0x74,0x2d,0x70,0x6c,0x61,0x79, +0x6c,0x69,0x73,0x74,0x73,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7b,0x7b,0x20,0x72,0x61,0x6e,0x67,0x65, +0x20,0x24,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x20,0x3a,0x3d,0x20,0x2e,0x50,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x73, +0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x74,0x65,0x78,0x74, +0x2d,0x72,0x69,0x67,0x68,0x74,0x22,0x3e,0x7b,0x7b,0x20,0x24,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2e,0x4e,0x61,0x6d, +0x65,0x20,0x7d,0x7d,0x3c,0x2f,0x74,0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74, +0x64,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d,0x22,0x74,0x65,0x78,0x74,0x2d,0x6c,0x69,0x67,0x68, +0x74,0x22,0x3e,0x28,0x7b,0x7b,0x20,0x24,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2e,0x54,0x72,0x61,0x63,0x6b,0x43,0x6f, +0x75,0x6e,0x74,0x20,0x7d,0x7d,0x20,0x74,0x72,0x61,0x63,0x6b,0x73,0x29,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x74, +0x64,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x74,0x64,0x20,0x63,0x6c,0x61,0x73,0x73, +0x3d,0x22,0x6e,0x6f,0x2d,0x73,0x6d,0x61,0x6c,0x6c,0x22,0x3e,0x3c,0x73,0x70,0x61,0x6e,0x20,0x63,0x6c,0x61,0x73,0x73,0x3d, +0x22,0x74,0x65,0x78,0x74,0x2d,0x6c,0x69,0x67,0x68,0x74,0x22,0x20,0x74,0x69,0x74,0x6c,0x65,0x3d,0x22,0x7b,0x7b,0x20,0x24, +0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2e,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x41,0x74,0x20,0x7d,0x7d,0x22,0x3e,0x7b, +0x7b,0x20,0x24,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2e,0x43,0x72,0x65,0x61,0x74,0x65,0x64,0x41,0x74,0x20,0x7c,0x20, +0x64,0x61,0x74,0x65,0x48,0x75,0x6d,0x61,0x6e,0x20,0x7d,0x7d,0x3c,0x2f,0x73,0x70,0x61,0x6e,0x3e,0x3c,0x2f,0x74,0x64,0x3e, +0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74,0x72,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x7b,0x7b,0x20,0x65,0x6e,0x64,0x20,0x7d,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x74, +0x61,0x62,0x6c,0x65,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x66,0x6f,0x72,0x6d,0x0a,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x69,0x64,0x3d,0x22,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x75,0x70,0x6c, +0x6f,0x61,0x64,0x2d,0x66,0x6f,0x72,0x6d,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x65,0x6e, +0x63,0x74,0x79,0x70,0x65,0x3d,0x22,0x6d,0x75,0x6c,0x74,0x69,0x70,0x61,0x72,0x74,0x2f,0x66,0x6f,0x72,0x6d,0x2d,0x64,0x61, +0x74,0x61,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x61,0x63,0x74,0x69,0x6f,0x6e,0x3d,0x22, +0x7b,0x7b,0x20,0x70,0x61,0x74,0x68,0x20,0x22,0x2f,0x61,0x64,0x6d,0x69,0x6e,0x2f,0x75,0x70,0x6c,0x6f,0x61,0x64,0x5f,0x70, +0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x5f,0x64,0x6f,0x22,0x20,0x7d,0x7d,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x6d,0x65,0x74,0x68,0x6f,0x64,0x3d,0x22,0x70,0x6f,0x73,0x74,0x22,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x64,0x69,0x76,0x20,0x73,0x74,0x79, +0x6c,0x65,0x3d,0x22,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x72,0x65,0x6c,0x61,0x74,0x69,0x76,0x65,0x3b,0x22, +0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x69,0x6e,0x70,0x75,0x74, +0x20,0x69,0x64,0x3d,0x22,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x75,0x70,0x6c,0x6f,0x61,0x64,0x2d,0x69,0x6e,0x70, +0x75,0x74,0x22,0x20,0x73,0x74,0x79,0x6c,0x65,0x3d,0x22,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x61,0x62,0x73, +0x6f,0x6c,0x75,0x74,0x65,0x3b,0x20,0x6f,0x70,0x61,0x63,0x69,0x74,0x79,0x3a,0x20,0x30,0x3b,0x22,0x20,0x6e,0x61,0x6d,0x65, +0x3d,0x22,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x66,0x69,0x6c,0x65,0x73,0x22,0x20,0x74,0x79,0x70,0x65,0x3d,0x22, +0x66,0x69,0x6c,0x65,0x22,0x20,0x6d,0x75,0x6c,0x74,0x69,0x70,0x6c,0x65,0x20,0x2f,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x69,0x6e,0x70,0x75,0x74,0x20,0x74,0x79,0x70,0x65,0x3d,0x22,0x62, +0x75,0x74,0x74,0x6f,0x6e,0x22,0x20,0x76,0x61,0x6c,0x75,0x65,0x3d,0x22,0x75,0x70,0x6c,0x6f,0x61,0x64,0x20,0x6d,0x33,0x75, +0x38,0x22,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x66,0x6f,0x72,0x6d,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c, +0x73,0x63,0x72,0x69,0x70,0x74,0x3e,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x63,0x75, +0x6d,0x65,0x6e,0x74,0x2e,0x67,0x65,0x74,0x45,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x42,0x79,0x49,0x64,0x28,0x22,0x70,0x6c,0x61, +0x79,0x6c,0x69,0x73,0x74,0x2d,0x75,0x70,0x6c,0x6f,0x61,0x64,0x2d,0x69,0x6e,0x70,0x75,0x74,0x22,0x29,0x2e,0x6f,0x6e,0x63, +0x68,0x61,0x6e,0x67,0x65,0x20,0x3d,0x20,0x28,0x65,0x29,0x20,0x3d,0x3e,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x64,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x2e,0x67,0x65,0x74,0x45,0x6c,0x65, +0x6d,0x65,0x6e,0x74,0x42,0x79,0x49,0x64,0x28,0x22,0x70,0x6c,0x61,0x79,0x6c,0x69,0x73,0x74,0x2d,0x75,0x70,0x6c,0x6f,0x61, +0x64,0x2d,0x66,0x6f,0x72,0x6d,0x22,0x29,0x2e,0x73,0x75,0x62,0x6d,0x69,0x74,0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20, +0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3c,0x2f,0x73,0x63,0x72,0x69,0x70, +0x74,0x3e,0x0a,0x20,0x20,0x20,0x20,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x3c,0x2f,0x64,0x69,0x76,0x3e,0x0a,0x7b,0x7b,0x20, +0x65,0x6e,0x64,0x20,0x7d,0x7d,0x0a, }}, "pages/delete_user.tmpl": &EmbeddedAsset{ ModTime: time.Unix(1585079143, 0), diff --git a/server/ctrladmin/ctrl.go b/server/ctrladmin/ctrl.go index ac3f47b..7f131af 100644 --- a/server/ctrladmin/ctrl.go +++ b/server/ctrladmin/ctrl.go @@ -24,10 +24,6 @@ import ( "senan.xyz/g/gonic/version" ) -func init() { - gob.Register(&Flash{}) -} - type CtxKey int const ( @@ -64,6 +60,22 @@ const ( prefixPages = "pages" ) +func funcMap() template.FuncMap { + return template.FuncMap{ + "noCache": func(in string) string { + parsed, _ := url.Parse(in) + params := parsed.Query() + params.Set("v", version.VERSION) + parsed.RawQuery = params.Encode() + return parsed.String() + }, + "date": func(in time.Time) string { + return strings.ToLower(in.Format("Jan 02, 2006")) + }, + "dateHuman": humanize.Time, + } +} + type Controller struct { *ctrlbase.Controller buffPool *bpool.BufferPool @@ -80,19 +92,9 @@ func New(base *ctrlbase.Controller) *Controller { tmplBase := template. New("layout"). Funcs(sprig.FuncMap()). - Funcs(template.FuncMap{ - "date": func(in time.Time) string { - return strings.ToLower(in.Format("Jan 02, 2006")) - }, - "noCache": func(in string) string { - parsed, _ := url.Parse(in) - params := parsed.Query() - params.Set("v", version.VERSION) - parsed.RawQuery = params.Encode() - return parsed.String() - }, - "dateHuman": humanize.Time, - "path": base.Path, + Funcs(funcMap()). // static + Funcs(template.FuncMap{ // from base + "path": base.Path, }) tmplBase = extendFromPaths(tmplBase, prefixPartials) tmplBase = extendFromPaths(tmplBase, prefixLayouts) @@ -127,8 +129,6 @@ type templateData struct { SelectedUser *db.User } -type adminHandler func(r *http.Request) *Response - type Response struct { // code is 200 template string @@ -142,8 +142,11 @@ type Response struct { err string } +type handlerAdmin func(r *http.Request) *Response + //nolint:gocognit -func (c *Controller) H(h adminHandler) http.Handler { +func (c *Controller) H(h handlerAdmin) http.Handler { + // TODO: break this up a bit return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { resp := h(r) session, ok := r.Context().Value(CtxSession).(*sessions.Session) @@ -217,26 +220,15 @@ const ( FlashWarning = FlashType("warning") ) -func firstExisting(or string, strings ...string) string { - for _, s := range strings { - if s != "" { - return s - } - } - return or -} - -func sessLogSave(s *sessions.Session, w http.ResponseWriter, r *http.Request) { - if err := s.Save(r, w); err != nil { - log.Printf("error saving session: %v\n", err) - } -} - type Flash struct { Message string Type FlashType } +func init() { + gob.Register(&Flash{}) +} + func sessAddFlashN(s *sessions.Session, messages []string) { sessAddFlash(s, messages, FlashNormal) } @@ -260,6 +252,12 @@ func sessAddFlash(s *sessions.Session, messages []string, flashT FlashType) { } } +func sessLogSave(s *sessions.Session, w http.ResponseWriter, r *http.Request) { + if err := s.Save(r, w); err != nil { + log.Printf("error saving session: %v\n", err) + } +} + // ## begin validation // ## begin validation // ## begin validation diff --git a/server/ctrladmin/ctrl_test.go b/server/ctrladmin/ctrl_test.go deleted file mode 100644 index 09fa916..0000000 --- a/server/ctrladmin/ctrl_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package ctrladmin - -import "testing" - -// silly test for a simple function. i was getting used to -// testing in go at the time. might aswell keep it though -func TestFirstExisting(t *testing.T) { - cases := []struct { - name string - values []string - or string - exp string - }{ - { - "none present", - []string{"one", "two", "three"}, "default", - "one", - }, - { - "first missing", - []string{"", "two", "three"}, "default", - "two", - }, - { - "all missing", - []string{"", "", ""}, "default", - "default", - }, - } - for _, tc := range cases { - tc := tc // pin - t.Run(tc.name, func(t *testing.T) { - actu := firstExisting(tc.or, tc.values...) - if actu != tc.exp { - t.Errorf("expected %q, got %q", tc.exp, actu) - } - }) - } -} diff --git a/server/ctrladmin/handlers.go b/server/ctrladmin/handlers.go index ba97022..3ec668e 100644 --- a/server/ctrladmin/handlers.go +++ b/server/ctrladmin/handlers.go @@ -13,6 +13,15 @@ import ( "senan.xyz/g/gonic/server/lastfm" ) +func firstExisting(or string, strings ...string) string { + for _, s := range strings { + if s != "" { + return s + } + } + return or +} + func (c *Controller) ServeNotFound(r *http.Request) *Response { return &Response{template: "not_found.tmpl", code: 404} } diff --git a/server/ctrlsubsonic/ctrl.go b/server/ctrlsubsonic/ctrl.go index b78d000..0b37246 100644 --- a/server/ctrlsubsonic/ctrl.go +++ b/server/ctrlsubsonic/ctrl.go @@ -84,9 +84,9 @@ func writeResp(w http.ResponseWriter, r *http.Request, resp *spec.Response) erro return ew.err } -type subsonicHandler func(r *http.Request) *spec.Response +type handlerSubsonic func(r *http.Request) *spec.Response -func (c *Controller) H(h subsonicHandler) http.Handler { +func (c *Controller) H(h handlerSubsonic) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { response := h(r) if response == nil { @@ -99,9 +99,9 @@ func (c *Controller) H(h subsonicHandler) http.Handler { }) } -type subsonicHandlerRaw func(w http.ResponseWriter, r *http.Request) *spec.Response +type handlerSubsonicRaw func(w http.ResponseWriter, r *http.Request) *spec.Response -func (c *Controller) HR(h subsonicHandlerRaw) http.Handler { +func (c *Controller) HR(h handlerSubsonicRaw) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { response := h(w, r) if response == nil { diff --git a/server/ctrlsubsonic/ctrl_test.go b/server/ctrlsubsonic/ctrl_test.go index cbc1db0..548cd5a 100644 --- a/server/ctrlsubsonic/ctrl_test.go +++ b/server/ctrlsubsonic/ctrl_test.go @@ -39,7 +39,7 @@ type queryCase struct { listSet bool } -func runQueryCases(t *testing.T, h subsonicHandler, cases []*queryCase) { +func runQueryCases(t *testing.T, h handlerSubsonic, cases []*queryCase) { for _, qc := range cases { qc := qc // pin t.Run(qc.expectPath, func(t *testing.T) { diff --git a/server/ctrlsubsonic/testdata/db b/server/ctrlsubsonic/testdata/db index 84547cb..dd41eac 100644 Binary files a/server/ctrlsubsonic/testdata/db and b/server/ctrlsubsonic/testdata/db differ